code-kata
Skill0 starsChanged 56 days agoMITView on GitHub
Anki-driven code kata workflow for building procedural programming skills through spaced repetition. Use when the user invokes /code-kata new, /code-kata start, or /code-kata done to manage coding practice sessions.
In this repository7 other files it gives its agents.
- AGENTS.mdAGENTS.md
- ankifySkill
- anki-refineSkill
- grill-meSkill
- md-code-tourSkill
- newsletterSkill
- task-assessorSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
19 rules. About 0 are common, 7 are distinctive, and 12 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
12
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 12
All kata live under a single root (default: code_katas/ in the working directory):
- Distinctive: line 61
Micro-Kata: All files are complete and correct.
- Very specific: line 72
Full-Kata: All files are complete _except_ the primary implementation file, which is left blank (empty or with only the necessary #includes …
- Very specific: line 79
Create code_katas/<kata-name>/sessions.md with empty sections.
- Very specific: line 111
If code_katas/ does not exist or contains no kata, say so.
- Very specific: line 121
Verify code_katas/<name>/ exists with kata.md and scaffold/.
- Very specific: line 122
Create code_katas/<name>/YYYY-MM-DD/ (today's date).
- Very specific: line 124
Get the current time by running
date +%H:%M: before writing anything. Never guess or approximate the time. - Distinctive: line 145
Debrief: Read the user's code (the file they edited).
- Distinctive: line 150
Evaluate for knowledge gaps: Read the full Sessions table to check for patterns:
- Distinctive: line 154
If a gap is detected, surface a specific hypothesis: _"It looks like the indexing for shared memory padding keeps causing issues — this …
- Distinctive: line 156
Offer to create a knowledge note: Ask the user explicitly: _"Want me to add a knowledge-type Anki note for this gap?"_
- Very specific: line 160
Invoke the
ankifyskill: before writing any notes. This loads the exact format rules. - Very specific: line 161
Read the ## Knowledge Notes section of sessions.md.
- Distinctive: line 162
Check for semantic duplicates (same underlying concept, even if worded differently).
- Very specific: line 164
Frontmatter: If sessions.md does not yet have a frontmatter block (i.e., the file does not start with ---), prepend one before writing the …
- Very specific: line 193
Root-first: All commands operate from the project root.
- Very specific: line 194
Scaffold is immutable: Never modify files in scaffold/.
- Distinctive: line 195
No silent writes: Never append a knowledge note without explicit user confirmation.
≈ “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
Code-Kata Skill
A workflow that uses Anki as a task scheduler and hands-on kata practice as the execution mechanism. Anki decides what to practice; this skill manages the actual practice sessions.
Directory Layout
All kata live under a single root (default: code_katas/ in the working directory):
code_katas/
<kata-name>/
kata.md # Anki note source + acceptance criteria (ankify format)
sessions.md # Session history + knowledge-gap Anki notes
scaffold/ # Complete compilable project with one "hole"
YYYY-MM-DD/ # Full copy of scaffold + user's code for that sessionCommands
/code-kata new
Purpose: Design a new kata from scratch — both the Anki card content and the compilable scaffold.
Steps:
- Ask the user:
- What topic / direction are you currently studying?
- Micro-Kata (~5 min, one tricky logic block) or Full-Kata (~15–20 min, complete implementation)?
- Generate
code_katas/<kata-name>/kata.mdin ankify Context-Extended format, with a fixed frontmatter block at the top:
---
ankideck: codekata
---
#### [Micro-Kata | Full-Kata]: [concise task description]
[Setup constraints: what file to edit, what function signature is provided, time limit, etc.]
---
Acceptance Criteria:
1. [criterion]
2. [criterion]
Expected Output:
[exact stdout the binary should produce, or a tolerance spec like "matches CPU reference within 1e-4"]
Performance Target (optional):
[e.g., "achieves >80% of theoretical memory bandwidth on an A100"]- Generate
code_katas/<kata-name>/scaffold/— a fully compilable project with one hole:Micro-Kata: All files are complete and correct. In exactly one file, replace the target logic with a clearly bounded TODO block:
// ---- TODO: implement [specific task] ---- // [one-line hint about what belongs here, e.g., function signature or key constraint] // ---- END TODO ----The surrounding context (variable names, thread layout, call sites) is intentionally visible — this is by design for CUDA and other context-heavy code.
- Full-Kata: All files are complete except the primary implementation file, which is left blank (empty or with only the necessary
#includes / header guard). - Both types must include a working build system (CMakeLists.txt preferred for CUDA/C++ projects, Makefile acceptable) and a verification harness that:
- Runs the binary
- Checks output against the expected result specified in
kata.md - Exits non-zero on failure
- Create
code_katas/<kata-name>/sessions.mdwith empty sections. Do not add frontmatter yet — it will be added the first time a knowledge note is written:
## Sessions
| Date | Start | End | Duration | Score | Notes |
| ---- | ----- | --- | -------- | ----- | ----- |
## Knowledge Notes/code-kata list
Purpose: List all kata in the current workspace so the user can choose what to practice.
Steps:
- Enumerate all subdirectories of
code_katas/that contain akata.mdfile. - For each kata, read its
sessions.mdand extract:- Total session count
- Last session date and score
- Print a table:
Kata Sessions Last session Last score
──────────────── ────────── ────────────── ──────────
matmul-naive 1 2026-03-28 again
matmul-tiled 1 2026-03-28 —- If
code_katas/does not exist or contains no kata, say so.
/code-kata start <name>
Purpose: Begin a new practice session for an existing kata.
Steps:
- Verify
code_katas/<name>/exists withkata.mdandscaffold/. - Create
code_katas/<name>/YYYY-MM-DD/(today's date). - Copy all files from
scaffold/into the new dated directory. - Get the current time by running
date +%H:%Mbefore writing anything. Never guess or approximate the time. Append a new row to the Sessions table insessions.mdwith today's date and the retrieved start time. Leave End, Duration, Score, Notes blank:| 2026-03-23 | 14:32 | — | — | — | — | - Tell the user which file to open and what the TODO block or blank file is.
/code-kata done <name> [again|hard|good|easy]
Purpose: Close a session, verify the code, debrief, and evaluate for knowledge gaps.
Steps:
- Record end time. Get the current time by running
date +%H:%Mbefore writing anything. Never guess or approximate the time. Fill in End, Duration, and Score for today's row insessions.md. - Compile and run.
cdintocode_katas/<name>/YYYY-MM-DD/and build with the scaffold's build system.- Run the binary.
- Report: compiled? (how many attempts?), ran without crash?, output matched expected?
- Debrief. Read the user's code (the file they edited). Give specific, targeted feedback:
- What did they get right?
- Where did friction likely occur (e.g., boundary conditions, index arithmetic)?
- Any correctness issues beyond what the test caught?
Evaluate for knowledge gaps. Read the full Sessions table to check for patterns:
- Two or more consecutive
againscores → strong signal of a declarative knowledge gap. - A single
againor repeatedhardwith similar friction notes → weaker signal, worth flagging.
If a gap is detected, surface a specific hypothesis: "It looks like the indexing for shared memory padding keeps causing issues — this might be a gap in understanding bank conflicts."
- Two or more consecutive
Offer to create a knowledge note. Ask the user explicitly: "Want me to add a knowledge-type Anki note for this gap?"
If yes:
- Invoke the
ankifyskill before writing any notes. This loads the exact format rules; do not rely on memory. - Read the
## Knowledge Notessection ofsessions.md. - Check for semantic duplicates (same underlying concept, even if worded differently). If a duplicate exists, say so and skip.
- Otherwise, generate one or more atomic notes in ankify format and append them under
## Knowledge Notesinsessions.md. - Frontmatter: If
sessions.mddoes not yet have a frontmatter block (i.e., the file does not start with---), prepend one before writing the note. Infer the appropriate deck from the note's subject matter (e.g., CUDA content →md2anki::cuda):--- ankideck: md2anki::<topic> ---
- Invoke the
Scoring Rubric Reference
| Score | Meaning |
again | Severely over time; logic deadlock; or consulted a previous dated directory |
hard | Finished solo, but heavy API/doc lookups and significant time overrun |
good | Finished within target time; minor typos fixed quickly by intuition |
easy | Flowed naturally; possibly a better implementation than previous attempts |
Anki Integration
This skill never touches Anki directly. The markdown files are the single source of truth:
kata.md→ import into Anki as the kata scheduling note (user's own markdown→Anki tooling handles this)- Knowledge notes in
sessions.md→ import into the theory deck the same way
The ankify format used throughout this skill is defined in the ankify skill.
Key Principles
- Root-first: All commands operate from the project root. Never assume the user has
cd'd into a subdirectory. - Scaffold is immutable: Never modify files in
scaffold/. Each dated directory is a self-contained, independent snapshot. - No silent writes: Never append a knowledge note without explicit user confirmation.
- Deduplication is semantic: Two notes cover the same gap even if phrased differently — check meaning, not string equality.
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.

