learn-by-doing
Skill9 starsChanged 5 months agoMITView on GitHub
Creates source-grounded exercises and verifies the user's attempts. Use when the user wants hands-on practice with code or a topic, asks for exercises, or understands the theory but wants to apply it.
3 other projects use a version of this.
Adopted by
Most recently taken up by
- SHYXIN/skillstheir own version, first seen Oct 11, 2026
- suveshmoza/skillstheir own version, first seen Sep 13, 2026
- andyshen1121/skillstheir own version, first seen Mar 7, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- SHYXIN/skills★ 6same name
- andyshen1121/skills★ 1same name
- suveshmoza/skills★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository9 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- ask-me-questionsSkill
- assessSkill
- connect-to-what-you-knowSkill
- explain-and-checkSkill
- flashcardsSkill
- linked-notesSkill
- quiz-meSkill
- start-learnSkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 4 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 22
After generation, the user works through the file, brings answers back into the conversation, and the agent verifies.
- Distinctive: line 55
Read EXERCISES.md for the full generation reference (exercise ladder E1–E7 + file format).
- Distinctive: line 64
Read the user's answer: Do not skim — read it like a code review.
- Very specific: line 66
Cite: Every claim about "the correct answer" carries a file:line or a doc link.
- Distinctive: line 67
If failed, do not reveal the solution: Ask one targeted question and point at the relevant artefact line(s).
- Very specific: line 72
If CURRICULUM.md exists in the current directory, the skill is running inside a Scenario B workspace.
- Very specific: line 74
Read MISSION.md before generating: use the stated goal to shape exercise difficulty and context.
- Very specific: line 77
If CURRICULUM.md is absent (legacy mode), use learn/ paths as before.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Learn By Doing
Speak to the user in their language; these instructions are in English for the agent.
A generative skill: produces a markdown file under learn/ containing 3–7 graded exercises plus a hidden solutions section. The user attempts the exercises; the agent verifies each answer against the real code/docs when the user submits them. The artefact (the exercises file) persists in the project and can be reopened later — see ADR 0002 for why we don't schedule those reopenings.
Quick start
User: /learn-by-doing src/orders/payment.ts
Agent: Project read first. Stack: TypeScript + Express 4.21, ESM modules.
I'll generate 5 exercises of ascending difficulty, save them to
learn/payment-exercises.md, and hide solutions behind a fold.
Bring me each answer when you're ready — I'll verify against payment.ts.After generation, the user works through the file, brings answers back into the conversation, and the agent verifies.
Workflows
Mode detection
Inspect the argument:
- Code-mode — argument is a file, function, or PR. Exercises target this code (refactor, extend, recreate from spec, find the bug).
- Topic-mode — argument is a topic. Exercises target applying the concept (implement, design, choose between alternatives) within the project's actual stack.
Session checklist (copy into your reply and tick as you go)
Generation:
- [ ] Project read complete (stack + versions identified)
- [ ] Artefact read (code-mode) or docs fetched (topic-mode)
- [ ] 3–7 exercises drafted with ascending difficulty (E1 → E7 ladder)
- [ ] E4 (Debug) included when code-mode
- [ ] Every solution traces to file:line or cited doc
- [ ] Solutions folded under <details> tag (none above the fold)
- [ ] File written to the active output folder (see Workspace mode)
- [ ] Filename + path confirmed with user before write if collision
Per-answer verification (each time the user brings an answer):
- [ ] User's answer read carefully (not skimmed)
- [ ] Verified against artefact with file:line or doc citation
- [ ] Marked pass / partial / fail with evidence
- [ ] On fail: one targeted question + line reference + retry (no spoiler)
- [ ] On pass: user decides whether to proceed to next exerciseGeneration protocol
Read EXERCISES.md for the full generation reference (exercise ladder E1–E7 + file format). Summary of the steps:
- Project read — identify stack + versions from manifest files; never use a generic version.
- Read artefact / fetch docs — every solution must trace to a citation.
- Pick 3–7 exercises from the ladder (E1 Reproduce → E7 Teach). Include E4 (Debug) in code-mode.
- Write the file to the active output folder (see Workspace mode), with solutions folded under
<details>.
Verification protocol (when the user brings an answer)
- Read the user's answer. Do not skim — read it like a code review.
- Verify against the artefact (read local code or retrieve authoritative documentation with available tools). Mark pass / partial / fail with the specific divergence.
- Cite. Every claim about "the correct answer" carries a
file:lineor a doc link. - If failed, do not reveal the solution. Ask one targeted question and point at the relevant artefact line(s). Let the user retry.
- If passed, move to the next exercise (the user decides when).
Workspace mode
If CURRICULUM.md exists in the current directory, the skill is running inside a Scenario B workspace. In workspace mode:
- Exercises go to
exercises/<slug>-exercises.md(notlearn/). - Read
MISSION.mdbefore generating: use the stated goal to shape exercise difficulty and context. A user learning chess for casual play needs different exercises than one studying openings competitively. - In topic-mode (Scenario B, no existing code): read
CURRICULUM.mdto identify which lesson the exercises should reinforce, then target that lesson's concepts.
If CURRICULUM.md is absent (legacy mode), use learn/ paths as before.
File hygiene
- One file per session (don't merge into an existing file — the user might want different sets for different goals).
- File names:
<slug>-exercises.md, slug derived from topic or source file. - In legacy mode:
learn/<slug>-exercises.md. In workspace mode:exercises/<slug>-exercises.md.
Anti-patterns
- Don't put solutions above the fold, even partially — visible solutions defeat the entire skill, because the act that produces learning is the user attempting before consulting; one peek collapses recall into recognition.
- Don't write solutions the agent invented from memory — every solution must trace to the artefact, otherwise the user gets verified against the agent's confidence rather than the real source; that's borrowed confidence at the verification layer.
- Don't write generic exercises ("implement quicksort") — exercises must use this stack at this version on this problem, otherwise the transfer doesn't connect to the work the user actually does.
- Don't reveal the answer when the user is stuck — the productive struggle is the learning signal; offer a targeted question + line reference + retry, and let the user re-attempt with the source closed again.
- Don't generate more than 7 exercises in one file — this workflow caps the set to keep each practice session bounded; seven is a product limit, not a measured fatigue threshold.
- Don't skip E4 (debug) in code-mode — the required debug task asks the user to identify a broken assumption using their mental model.
Governing principles (this skill satisfies all five)
- Agent withholds — solutions folded; verification asks before telling.
- Student speaks first — the user produces every answer.
- Artefact is the judge — every solution and every verification is grounded in real code/docs.
- Source fidelity — stack version read before generation; every solution carries a citation to an authoritative source. Before verifying, read SOURCES.md.
- Exit is a transfer test — E5–E7 provide transfer tasks when selected. Generating exercises alone demonstrates no learning; evaluate the user's submitted answers before making claims about transfer.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

