Learn
Deep-dive into source code, papers, or references and distill key insights into a visual HTML document.From its SKILL.md
npx -y skills add junjzhang/riff --skill learnAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
2.0 KB, as published. Nobody here has run it
Learn
Research a codebase area, algorithm, or external reference and produce a structured learning document. The goal is to build shared understanding between human and agent before making changes.
Input
The user points at what to study. Examples:
/riff:learn src/models/shared/activation/offload.py/riff:learn how torchtune does activation offloading/riff:learn the reconcile system
Process
- Read sources: Read the target files, follow imports, trace the call chain. For external references, use WebSearch/WebFetch.
- Create workspace: Ensure
.workspace/{topic-slug}/exists. Add.workspace/to.gitignoreif missing. - Write
learn.htmlin the workspace folder.
Output Structure
- Title + subtitle — what was studied and why
- Overview — 2–3 sentence summary of the component/algorithm
- Data Flow / Architecture — ASCII diagram of the key data structures and their relationships
- Key Mechanisms — each mechanism as an
<h3>section:- What it does (1–2 sentences)
- Code snippet showing the core logic (with file:line reference)
- Why it matters / subtle invariants
- Edge Cases & Gotchas — things that would surprise a reader
- Comparison (optional) — if studying an external reference, side-by-side table of their approach vs ours
- Open Questions — things that remain unclear or need the user's input
Style
Use the Tokyo Night dark theme. Inline the full CSS from templates/style.css as a <style> block.
Rules
- HTML only, self-contained
- Show code, not just describe it — include actual snippets with
file:linereferences lang="zh-CN"— Chinese explanations, English technical terms- Footer:
{project} / {topic} / .workspace/{folder}/learn.html - After writing, tell the user the path and highlight 1–2 most surprising findings