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.
In this repository24 other files it gives its agents.
- code-authoringSkill
- codelabgen-orchestratorSkill
- course-extensionSkill
- curriculum-designSkill
- diagrammingSkill
- example-designSkill
- lesson-reviewSkill
- readalong-writingSkill
- runtime-strategySkill
- site-assemblySkill
- source-articlesSkill
- source-books-coursesSkill
- source-digestSkill
- source-evaluationSkill
- source-github-reposSkill
- source-official-blogSkill
- source-official-docsSkill
- source-package-internalsSkill
- source-papers-specsSkill
- source-qaSkill
- source-talks-workshopsSkill
- source-universitySkill
- state-protocolSkill
- topic-extractionSkill
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
- Very specific: line 11
Write in the course language (language in .codelabgen/config.yaml).
- Very specific: line 31
Every claim about the technology must hold for the pinned version.
- Very specific: line 32
Read .codelabgen/research/deprecations.md if it exists, and never present a deprecated API as current.
- Distinctive: line 33
When unsure, say less or verify, rather than guess.
- Distinctive: line 34
Write in your own words. Never copy text from sources.
- Very specific: line 38
Use snippet markers to show the key parts.
- Very specific: line 50
If the spec lists recordings, the verify run saved them as <lesson dir>/docs/generated/<name>.gif.
- Very specific: line 77
Use the form the term takes in text as the term.
- Very specific: line 79
Check codelabgen glossary list first.
- Distinctive: line 85
Follow the diagramming skill.
- Very specific: line 92
Use NOTE for asides, TIP for practical advice, WARNING for common mistakes, IMPORTANT for must-know facts.
- Very specific: line 93
Only syntax that renders on GitHub and the site: no !!!
- Distinctive: line 102
Every relative link points to an existing file.
- Distinctive: line 103
Every diagram follows the diagramming skill's rules.
≈ “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
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:
- The problem. What situation calls for this concept? What goes wrong without it? Start from something the learner already knows.
- 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.
- How it works. The mechanism, with a diagram where structure or flow matters.
- 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.
- Run it. The real output of the program and what to notice in it (see "Real output").
- Details and edge cases. Behaviour that surprises people, limits, interactions with what earlier lessons covered.
- Common mistakes. As callouts, ideally from real pitfalls (the
pitfallssource digests, issue trackers, the spec's experiments). - Experiments. What to try with the code (see "Experiments").
- Summary. 3–6 bullets the learner should remember.
- Self-check. 3–5 questions with answers hidden in
<details>. - 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 theconceptsandpitfallssource digests in.codelabgen/sources/when they exist. - Read
.codelabgen/research/deprecations.mdif 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 syncfills 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: . 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
experimentsentry, correct that entry in.codelabgen/lessons/<id>/spec.yamltoo, 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:
Use the form the term takes in text as the term. Add inflected forms the text uses ascodelabgen glossary add "Граф состояний" --definition "Граф, в котором узлы по очереди обновляют общее состояние." --alias "граф состояний" --lesson <id> --course <dir>--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 listfirst. 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 ascheckpointer,reducer,StateSnapshotand 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:
Use> [!WARNING] > Узел должен возвращать только изменённые поля …NOTEfor asides,TIPfor practical advice,WARNINGfor common mistakes,IMPORTANTfor 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
codelabgen snippets sync <id> --course <dir>, thencodelabgen check snippets <id> --course <dir>must printok.- Every relative link points to an existing file. Every external link was fetched.
- Every diagram follows the diagramming skill's rules.
codelabgen check links --course <dir>,check renderandcheck mathreport nothing for this lesson's files.
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.

