Skip to content
Skills Library
Education · Learning & explanation

learn-by-doing

/learn-by-doing

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.

Licence
MIT
Last repository change
23.09.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
4
Scripts
0
HTML comments
0
URLs in SKILL.md
1
Deprecation

No signals detected. Repository changed on 23.09.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

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.

Original author description

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.

How it works

  1. Quick start
  2. Workflows
  3. Anti-patterns
  4. Governing principles (this skill satisfies all five)
Original SKILL.md headings · 97 lines, 986 words
SKILL.md preview
---
name: learn-by-doing
description: "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."
---

# 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](https://github.com/Ic3b3rg/learn-skills/blob/master/docs/adr/0002-no-scheduling-no-monolithic-scores.md) 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 exercise
```

### Generation protocol

Read [EXERCISES.md](EXERCISES.md) for the full generation reference (exercise ladder E1–E7 + file format). Summary of the steps:

1. **Project read** — identify stack + versions from manifest files; never use a generic version.
2. **Read artefact / fetch docs** — every solution must trace to a citation.
3. **Pick 3–7 exercises** from the ladder (E1 Reproduce → E7 Teach). Include E4 (Debug) in code-mode.
4. **Write the file** to the active output folder (see Workspace mode), with solutions folded under `<details>`.

### Verification protocol (when the user brings an answer)

1. **Read the user's answer.** Do not skim — read it like a code review.
2. **Verify against the artefact** (read local code or retrieve authoritative documentation with available tools). Mark **pass / partial / fail** with the specific divergence.
3. **Cite.** Every claim about "the correct answer" carries a `file:line` or a doc link.
4. **If failed, do not reveal the solution.** Ask one targeted question and point at the relevant artefact line(s). Let the user retry.
5. **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` (not `learn/`).
- Read `MISSION.md` before 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.md` to 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)

1. **Agent withholds** — solutions folded; verification asks before telling.
2. **Student speaks first** — the user produces every answer.
3. **Artefact is the judge** — every solution and every verification is grounded in real code/docs.
4. **Source fidelity** — stack version read before generation; every solution carries a citation to an authoritative source. Before verifying, read [SOURCES.md](SOURCES.md).
5. **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.
Files in this package (4)
  • EXERCISES.md 2 KB
  • SKILL.md 7 KB
  • SOURCES.md 5 KB
  • agents/openai.yaml 1 KB

Versions

The database has no other skills named learn-by-doing.

Database snapshot: 13.11.2026 · package version 0aaeed7c1f56 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 3 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100gf-learn
    SystemVerilog learning mode — generates exercises, reviews solutions, and teaches RTL design patterns. Use when the user wants to learn SystemVerilog, practice hardware design, get exercises, or understand verification methodology.
  • 100causal-exercises
    Generates practice exercises with simulated data and known ground truth across all causal inference methods. Use when user says "practice", "exercise", "simulate", "learn causal inference", or "test my skills". Not for real data analysis.
  • 100learn
    Help a user learn a topic through adaptive tutoring, lesson planning, practice, retrieval checks, explanations, study guides, or exercises. Use when the user asks to learn, understand, practice, drill, review, study, or be tutored on something.
  • 100learn
    Help a user learn a topic through adaptive tutoring, lesson planning, practice, retrieval checks, explanations, study guides, or exercises. Use when the user asks to learn, understand, practice, drill, review, study, or be tutored on something.
  • 100learn
    Help a user learn a topic through adaptive tutoring, lesson planning, practice, retrieval checks, explanations, study guides, or exercises. Use when the user asks to learn, understand, practice, drill, review, study, or be tutored on something.
  • 96k-teach
    Create or revise source-grounded lessons, exercises, learning pages, WeChat articles/drafts, and HTML slide decks. Use for teaching content, learning assets, official-account content, or PPT-style presentations.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.