failure-domain-log
Use when a refusal fires, a bug recurs, the agent makes a mistake the user has to correct twice, or the user explicitly invokes /failure-log.
Skill by drumfiend21
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/drumfiend21-failure-domain-log
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: writing, agent-building
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/failure-domain-log
What's inside
- Skill name
failure-domain-log- Description
- Use when a refusal fires, a bug recurs, the agent makes a mistake the user has to correct twice, or the user explicitly invokes /failure-log. Pattern from Geoffrey Huntley's "failure-domain documentation" + Stack Overflow's Mar 2026 guidance + Boris Cherny's recurring tip — when the model makes the same mistake twice, write it down so future sessions don't repeat it. Appends to the project's CLAUDE.md (or creates one if missing).
- License
- Apache-2.0
- Instructions
- 113 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# Failure-domain log
The model just made a mistake. Or the user just had to correct
something for the second time. Or a refusal fired and the underlying
issue was real. The lesson goes into the project's CLAUDE.md so the
next session doesn't repeat it.
## When this skill fires
- Explicit user invocation: "log this as a failure domain" /
"/failure-log" / "add this to CLAUDE.md."
- Implicit: when the model has just been corrected for the second
time on the same kind of issue in the same project (the model
should self-trigger this).
## The discipline
Cursor's official best-practice guidance — converged across the
field by 2026 — is: **"only add a rule after the agent makes the
same mistake twice."** This skill operationalizes that.
## Process
### 1. Articulate the failure
What did the model do that was wrong? What's the specific shape of
the mistake (not just "it was wrong" but "it kept using
queryAllByText instead of getByRole")?
Write a 1-3 sentence root cause. The format:
> When working on X, the model tends to do Y. The correct approach
> is Z, because W.
### 2. Find the right place in CLAUDE.md
Look for an existing section that fits:
- "Known landmines" section?
- "Anti-patterns" section?
- "Conventions" section?
- A file-specific section ("the 5,792-line component")?
If a fitting section exists, append to it. If not, add a new section
under "Lessons learned (failure-domain log)".
### 3. Write the entry
```markdown
- **<short title>** (added YYYY-MM-DD)
- When: <under what circumstances does this come up>
- Mistake: <what the model tends to do>
- Correct: <what to do instead>
- Why: <the reason, in one sentence>
- Source: <link to PR/commit/conversation if useful>
```
Example (real one from this project's history):
```markdown
- **Permissive test assertions** (added 2026-04-30)
- When: writing tests for React components.
- Mistake: using `screen.queryAllByText(/x/).length > 0` style
assertions.
- Correct: use `screen.getByRole('button', { name: /x/ })` with
exact element queries.
- Why: permissive assertions pass against broken UIs and provide
no regression value. Pattern proven during Phase 4
decomposition.
```
### 4. Commit
A failure-log entry should be a tiny standalone commit:
```
docs(failure-log): <short title>
Added a failure-domain entry to CLAUDE.md after the model repeated
the same mistake (specifics in the entry).
Assisted-by: Claude (claude-tdd-pro 0.3.0)
```
### 5. Re-read CLAUDE.md at session start
The whole point: future sessions read CLAUDE.md. Each entry is
worth maybe 50 tokens of context but saves potentially thousands
of tokens of correction back-and-forth.
## What to ALSO do (when applicable)
- If the failure suggests a missing skill / rule / hook: propose
upstreaming to `claude-tdd-pro` (open an issue against the plugin
repo).
- If the failure was caused by an anti-pattern that should be in
CONVENTIONS.md (and re-synced to Cursor/Copilot/etc): add it
there, then re-run `/sync-rules`.
- If the failure was security-shaped: add to the secret-scan
patterns or expand the protected-branch list.
## Constraints
- **Don't expand the log unbounded**. CLAUDE.md should stay
readable in a single page; if it grows to multiple pages, time
to reorganize (move per-area lessons into per-area sub-files).
- **One entry per failure domain**, not per occurrence. Update an
existing entry with a date suffix if the same domain comes up
again with new nuance.
- **Stay specific**. Vague entries ("be careful with this file")
don't help — concrete entries with the mistake / correct / why
do.From drumfiend21/claude-tdd-pro, Apache-2.0.
More from drumfiend21/claude-tdd-pro
- 0.474score
bug-fix-discipline
drumfiend21
Use when the user reports a BUG (existing behavior is wrong) — phrases like "X breaks when Y", "this used to work", "got an error/exception/500"…
SkillCFreshness: CClaude Code +9 - 0.474score
google-style-py
drumfiend21
Auto-attaches when Python files are touched.
SkillCFreshness: CClaude Code +9 - 0.474score
google-style-ts
drumfiend21
Auto-attaches when JS/TS files are touched.
SkillCFreshness: CClaude Code +9 - 0.474score
ide-rules-export
drumfiend21
X-6 per §23 — one-way IDE rules export.
SkillCFreshness: CClaude Code +9 - 0.474score
agent-continuity
drumfiend21
H-13 long-running agent harness continuity per §26 v1.11.
SkillCFreshness: CClaude Code +9 - 0.474score
tdd-pro-bash32-portability
drumfiend21
macOS bash 3.2 + BSD-tool portability checklist for substrate writing in claude-tdd-pro.
SkillCFreshness: CClaude Code +9 - 0.474score
adr-writer
drumfiend21
Use when the user explicitly invokes /adr or asks to "record an architecture decision" / "write an ADR." Produces an MADR-format Architecture Decision Record.
SkillCFreshness: CClaude Code +9 - 0.471score
local-llm
drumfiend21
Local-LLM fallback for cheap-operation routing — Ollama, llama.cpp, LM Studio.
SkillCFreshness: CClaude Code +9 - 0.471score
architect
drumfiend21
Interactive architecture elicitation.
SkillCFreshness: CClaude Code +9 - 0.471score
feature
drumfiend21
TDD green-phase implementer.
SkillCFreshness: CClaude Code +9 - 0.471score
tdd-pro-cl-workflow
drumfiend21
The per-CL workflow loop for developing the claude-tdd-pro plugin.
SkillCFreshness: CClaude Code +9 - 0.471score
tdd-pro-batch-cl
drumfiend21
Substrate-touch CL batching convention for claude-tdd-pro.
SkillCFreshness: CClaude Code +9
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- May 4, 2026 (5 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- Apache-2.0
- Repository
- github.com/drumfiend21/claude-tdd-pro
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from drumfiend21
- 0.474score
google-style-py
drumfiend21
Auto-attaches when Python files are touched.
SkillCFreshness: CClaude Code +9 - 0.474score
google-style-ts
drumfiend21
Auto-attaches when JS/TS files are touched.
SkillCFreshness: CClaude Code +9 - 0.474score
adr-writer
drumfiend21
Use when the user explicitly invokes /adr or asks to "record an architecture decision" / "write an ADR." Produces an MADR-format Architecture Decision Record.
SkillCFreshness: CClaude Code +9 - 0.474score
bug-fix-discipline
drumfiend21
Use when the user reports a BUG (existing behavior is wrong) — phrases like "X breaks when Y", "this used to work", "got an error/exception/500"…
SkillCFreshness: CClaude Code +9 - 0.474score
agent-continuity
drumfiend21
H-13 long-running agent harness continuity per §26 v1.11.
SkillCFreshness: CClaude Code +9 - 0.474score
ide-rules-export
drumfiend21
X-6 per §23 — one-way IDE rules export.
SkillCFreshness: CClaude Code +9
Cite this page
failure-domain-log skill. Agent Mart. https://agentmart.dev/skills/drumfiend21-failure-domain-log (last updated 2026-10-24)