agentleFS
dagarre00dagarre00/claude-code-template/.agents/skills/gotcha-recording/SKILL.md

gotcha-recording

Skill1 starsChanged 3 months agoMITView on GitHub

How to capture a project-specific failure mode in docs/wiki/gotchas.md so the next agent avoids it. Use right after being burned by something non-obvious that others will hit. Trigger on "gotcha", "burned by", "footgun", "got bitten", "edge case", "surprising behavior".

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Not for general language or framework facts, one-off typos, or anything the existing docs already say.

    line 15

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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

Recording a Gotcha

A gotcha is a project-specific trap that would burn the next agent. Generic discipline issues belong in .agents/rules.md; project traps go in docs/wiki/gotchas.md.

When

Record it when, this session, you spent real time on a problem with a surprising cause, a passing test masked broken behavior, a tool or library quirk specific to this setup bit you, a config file or env var had non-obvious effects, or two wiki pages contradicted each other in practice.

Not for general language or framework facts, one-off typos, or anything the existing docs already say.

Procedure

  1. Append an entry under the most relevant section of docs/wiki/gotchas.md — under ## Critical if it is severe (silent data corruption, a security risk):

    ### <Short, scannable title>
    
    **When:** <the exact situation that surfaces it>
    **Symptom:** <what you saw>
    **Cause:** <what was actually happening>
    **Fix:** <what to do>
    **Related:** [[entities/<slug>]], [[concepts/<pattern>]]

    One paragraph per field at most — more is a concept page, not a gotcha. Impersonal voice ("Session fixtures leak state", not "I found…"). Link the entity that surfaces it. No known fix → Fix: TBD plus a wiki-todo. If the gotcha shows a wiki page is wrong, fix that page and add a Why: line here.

  2. A gotcha that implies a missing skill or command → a line for docs/wiki/wiki-todos.md.
  3. Size check. Count the entries (**When:** lines). At 20 or more, add the wiki-todo - [ ] YYYY-MM-DD agent: gotchas.md has N entries — compact it during the next wiki health pass. A long gotchas file is one nobody reads.
  4. Ship it with the change that discovered it, never on its own: leave gotchas.md edited beside that case's test, code and entity page, and list it with them in your report.

Wiki-todo lines go in the file if it is yours to edit, otherwise under Follow-ups: in your report.

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.