pattern-card
Skill2 starsChanged 28 days agoMITView on GitHub
Record what a just-finished debugging session taught as a numbered card in PATTERNS.md. Use right after a bug is fixed and its root cause is known, or when the user asks to record, document, or register a pattern or incident.
In this repository6 other files it gives its agents.
- templates/AGENTS.mdAGENTS.md
- templates/CLAUDE.mdCLAUDE.md
- absence-checkSkill
- canon-upkeepSkill
- harness-setupSkill
- independent-reviewSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 3 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 14
Read PATTERNS.md: its index, the highest card number, and any card that already covers this area.
- Distinctive: line 29
Add the card number to the index row for the touched area (create the row if needed).
- Distinctive: line 31
If the prevention rule can be enforced by a hook, test, or linter, propose that too - and say so in the card.
- Distinctive: line 37
Do not copy the prevention rule into the main rules file.
≈ “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
Write a pattern card
The moment debugging ends is when the knowledge is cheapest to capture. A card moves the reason a fix exists out of someone's head and into the repo, so the next session does not "clean up" the guard and reopen the bug.
Steps
- Read
PATTERNS.md: its index, the highest card number, and any card that already covers this area. If an existing card covers the same root cause, extend that card instead of adding one. Draft the card from this session's actual evidence:
### PATTERN-<NN>: <one-line name of the failure> - **Symptom:** what was actually seen - error text, wrong output, crash - not the cause. Several symptoms with one cause? List them all; co-occurrence is a clue. - **Debug path:** what was checked, in order, including the dead ends. - **Root cause:** one or two sentences. Cannot state it that tightly? It is not found yet. - **Prevention rule:** a concrete, checkable rule. "Be careful" is not a rule; "always pass `**kwargs` to the worker callback" is. (learned <version or date>)- Add the card number to the index row for the touched area (create the row if needed). A card missing from the index is a card nobody will read.
- If the prevention rule can be enforced by a hook, test, or linter, propose that too - and say so in the card.
- Show the card and the index change before saving.
Rules
- Do not copy the prevention rule into the main rules file; link the card number instead.
- Past roughly 25 cards, split into per-area files and keep
PATTERNS.mdas the index.
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.

