agentleFS
cheyuriycheyuriy/codelabgen/skills/notes-writing/SKILL.md

notes-writing

Skill1 starsChanged 23 days agoMITView on GitHub

How to write a codelabgen lesson's notes (`docs/notes.md`) — a book-style chapter on the lesson's concept that refers to the lesson code, with diagrams, callouts, self-check questions and cited sources, rendering well on GitHub and the MkDocs site. Used by the notes-writer agent.

The file

Show its rules and text

We split this skill into the rules it gives an agent

14 rules. About 0 are common, 5 are distinctive, and 9 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 9

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Write in the course language (language in .codelabgen/config.yaml).

    line 11
  2. Very specific:

    Every claim about the technology must hold for the pinned version.

    line 31
  3. Very specific:

    Read .codelabgen/research/deprecations.md if it exists, and never present a deprecated API as current.

    line 32
  4. Distinctive:

    When unsure, say less or verify, rather than guess.

    line 33
  5. Distinctive:

    Write in your own words. Never copy text from sources.

    line 34
  6. Very specific:

    Use snippet markers to show the key parts.

    line 38
  7. Very specific:

    If the spec lists recordings, the verify run saved them as <lesson dir>/docs/generated/<name>.gif.

    line 50
  8. Very specific:

    Use the form the term takes in text as the term.

    line 77
  9. Very specific:

    Check codelabgen glossary list first.

    line 79
  10. Distinctive:

    Follow the diagramming skill.

    line 85
  11. Very specific:

    Use NOTE for asides, TIP for practical advice, WARNING for common mistakes, IMPORTANT for must-know facts.

    line 92
  12. Very specific:

    Only syntax that renders on GitHub and the site: no !!!

    line 93
  13. Distinctive:

    Every relative link points to an existing file.

    line 102
  14. Distinctive:

    Every diagram follows the diagramming skill's rules.

    line 103

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Writing the notes

The notes are the lesson's chapter in a book: they explain the concept properly, as a good technical book would, and tie it to the example the learner has just run. The read-along explains the code; the notes explain the idea, pointing into the code to make it concrete.

Write in the course language (language in .codelabgen/config.yaml). There is no length limit: the chapter is as long as the idea needs, and not a sentence longer. No filler, no marketing tone, no "in this lesson we will…" padding.

Structure

Adapt to the topic. A typical chapter:

  1. The problem. What situation calls for this concept? What goes wrong without it? Start from something the learner already knows.
  2. The concept. Define it precisely. Introduce terms one at a time, each defined on first use. Give the mental model that makes the rest follow.
  3. How it works. The mechanism, with a diagram where structure or flow matters.
  4. In our example. Map the concept onto the lesson code: which part does what, with snippets of the key parts, and a link to the read-along for the code walkthrough.
  5. Run it. The real output of the program and what to notice in it (see "Real output").
  6. Details and edge cases. Behaviour that surprises people, limits, interactions with what earlier lessons covered.
  7. Common mistakes. As callouts, ideally from real pitfalls (the pitfalls source digests, issue trackers, the spec's experiments).
  8. Experiments. What to try with the code (see "Experiments").
  9. Summary. 3–6 bullets the learner should remember.
  10. Self-check. 3–5 questions with answers hidden in <details>.
  11. Further reading. Sources actually used, with links.

Accuracy

  • Every claim about the technology must hold for the pinned version. Check against the official docs (WebFetch) and the installed sources (where they are: the runtime's reference in ${CLAUDE_PLUGIN_ROOT}/skills/code-authoring/references/). Use the concepts and pitfalls source digests in .codelabgen/sources/ when they exist.
  • Read .codelabgen/research/deprecations.md if it exists, and never present a deprecated API as current.
  • When unsure, say less or verify, rather than guess.
  • Write in your own words. Never copy text from sources. Short quotes are fine when attributed.

Tying notes to the code

  • Use snippet markers to show the key parts. codelabgen snippets sync fills them, exactly as in the read-along:
    <!-- snippet: src/l1_2_routing/graph.py#build_graph -->
    <!-- /snippet -->
  • Link to the walkthrough with [разбор кода](readalong.md#…) and to files with relative links such as [graph.py](../src/l1_2_routing/graph.py).
  • Refer to code by identifiers, never by line numbers.

Real output

Quote the live run's real output from the latest passing verify run: .codelabgen/runs/<id>/<latest>/live-run.log (the part after the command header). Copy it exactly into a text code block, then say what to notice in it. Never invent or "tidy" output. If the output depends on an LLM or on time, say that a run may differ.

If the spec lists recordings, the verify run saved them as <lesson dir>/docs/generated/<name>.gif. Show each one next to the output: ![Запуск: маршрутизация трёх обращений](generated/route-tickets.gif). Only link GIFs that exist. If verify logged "skipped" for record, show the text output alone.

Experiments

Turn the spec's experiments into a "what to try" section. For each one: what to change (a concrete edit), what you will observe, and why. Put the explanation in a collapsible block, so the reader can guess first:

1. В `route_ticket` верните `"unknown"` вместо имени очереди и запустите снова.

   <details><summary>Что произойдёт и почему</summary>

   …

   </details>
  • Each experiment starts from the lesson's original code. When an experiment changes the code, end its explanation with a reminder to undo the change (git checkout -- . in the lesson directory, or "верните код как было").
  • Verify what you predict. Run each experiment in a scratch copy of the lesson directory (outside the course) and describe what really happens, not what the spec expected. If the outcome differs from the spec's experiments entry, correct that entry in .codelabgen/lessons/<id>/spec.yaml too, so the spec stays the source of truth for later lessons.

Glossary terms

The course has a shared glossary (GLOSSARY.md). On the site, every use of a term shows its definition on hover.

  • For each term this lesson introduces, add it, in the course language:
    codelabgen glossary add "Граф состояний" --definition "Граф, в котором узлы по очереди обновляют общее состояние." --alias "граф состояний" --lesson <id> --course <dir>
    Use the form the term takes in text as the term. Add inflected forms the text uses as --alias (Russian: "графа", "графе"…), because tooltips match exact words only.
  • Link the first use of each term in the notes to its entry. Get the link target from codelabgen glossary link "<term>" --from <lesson dir>/docs/notes.md --course <dir>.
  • Check codelabgen glossary list first. Don't redefine terms that earlier lessons introduced, but you may link to them.
  • Definitions: one or two sentences, self-contained, without Markdown links.
  • Never use an everyday word as a term or alias. Tooltips attach to every exact occurrence on the site, in every lesson. A term like "Поток" (thread) with aliases "поток", "потока" would tooltip unrelated uses of the word ("поток данных"). Use the specific form instead: thread, thread_id, "поток (thread)". Distinctive technical words such as checkpointer, reducer, StateSnapshot and their inflections are fine.

Diagrams, math, callouts

  • Follow the diagramming skill. Use Mermaid by default; generate the diagram from the code when the library can draw it.
  • Math: only $…$ (inline) and $$…$$ (block, on its own lines).
  • Callouts in GitHub alert syntax:
    > [!WARNING]
    > Узел должен возвращать только изменённые поля …
    Use NOTE for asides, TIP for practical advice, WARNING for common mistakes, IMPORTANT for must-know facts.
  • Only syntax that renders on GitHub and the site: no !!! admonitions, content tabs, code annotations or --8<--.

Further reading

List only sources you actually read for this chapter, with title and URL, official docs first. Never invent a URL; check each one with WebFetch.

Before you finish

  1. codelabgen snippets sync <id> --course <dir>, then codelabgen check snippets <id> --course <dir> must print ok.
  2. Every relative link points to an existing file. Every external link was fetched.
  3. Every diagram follows the diagramming skill's rules.
  4. codelabgen check links --course <dir>, check render and check math report nothing for this lesson's files.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.