Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/sjarmak/coding-agent-workflows/failure-mode-capturenpx skills add sjarmak/coding-agent-workflows --skill failure-mode-capturegit clone --depth 1 https://github.com/sjarmak/coding-agent-workflowsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/sjarmak/coding-agent-workflows/failure-mode-capture)<a href="https://agentmods.dev/skills/sjarmak/coding-agent-workflows/failure-mode-capture"><img src="https://agentmods.dev/badge/skills/sjarmak/coding-agent-workflows/failure-mode-capture.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00092 | $0.00943 |
| Opus 5 | $0.00046 | $0.00472 |
| Sonnet 5 | $0.00018 | $0.00189 |
| Haiku 4.5 | $0.00009 | $0.00094 |
Grade A, and why
failure-mode-capture scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 85 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Failure-Mode Capture
Turn a real incident into a one-line prevention in AGENTS.md, so the next agent
doesn't repeat it. This is how the failure-mode layer accumulates — deliberately,
one verified lesson at a time, not by dumping everything that ever went wrong.
Read context-layering first: AGENTS.md owns project-wide preventions; area-only
lessons go in that area's COMPASS.md; host/session habits stay in memory.
When to use
- Right after a bug, regression, or near-miss whose cause generalizes
- The user says "capture this" / "don't let this happen again" / "add a guardrail"
- A code review surfaces a repeated mistake worth encoding once
ZFC boundary
- Mechanism: read AGENTS.md and the memory files, run the similarity scan, count lines against the budget, write the entry.
- Model: decide whether the lesson generalizes, which layer it belongs in, whether it duplicates an existing entry, and how to phrase the prevention.
How it works
1. Phrase the prevention (model)
One line: the action to avoid, then the consequence it prevents. Concrete and checkable.
Don't run migrations against the read replica — it has no write grant and fails silently mid-batch.
If you can't name a concrete consequence, it's not a failure-mode prevention — it's a style preference, and belongs in the bundle or a code review, not here.
2. Decide the layer (model)
- Generalizes across the repo → AGENTS.md failure-mode log.
- Specific to one area → that area's COMPASS.md "Failure modes seen here".
- A local command or personal habit → memory, not here.
3. Dedup guard against memory (mechanism + model)
First, if CLAUDE.md is a symlink to AGENTS.md (a single-source project per
context-layering), there is no separate memory layer — the dedup is moot and you
simply append to the one file. Otherwise, scan CLAUDE.md and any instinct store
for an overlapping fact (mechanical similarity flag over the candidate text). If a
match surfaces:
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 4d ago First seen · 85 lines · 92 tokens per session scan A c5dfd56938cf
failure-mode-capture is a skill published in the GitHub repository sjarmak/coding-agent-workflows (2 stars, last pushed 1mo ago), licensed MIT. It adds 92 tokens to every session and 943 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
deep-init
Generate an agent-agnostic, two-tier context layer for a codebase — a lean, always-loaded CLAUDE.md plus a deep, on-demand .ai/docs/ layer (business rules, live DB schema + ORM drift, cross-component workflows, and the WHY: ADRs + a knowledge log), every claim grounded to file:line and verified to exist. Built for…
context-engineering
Optimizes agent context setup. Use when starting a new session, when agent output quality degrades, when switching between tasks, or when you need to configure rules files and context for a project.
comet-memory
使用于 Comet 需要根据有界语义评审包判断是否值得保存个人记忆、候选、更新、遗忘或跳过时。.
recall-memory
Recall relevant long-term memories on demand. Given a topic or question, judges relevance from pre-loaded metadata, loads only relevant files, and returns a concise summary to the main agent.
planning-with-files
Persistent file-based planning for multi-step AI-agent work. Keeps taskplan.md, findings.md, and progress.md on disk; lifecycle hooks inject selected project planning context. Automatic recovery reads project planning files only. Explicit session-catchup.py --metadata reads same-project local agent session records and…
immune
Hybrid adaptive memory: Cheatsheet (positive patterns pre-generation) and Immune (negative patterns post-generation) with Hot/Cold tiered auto-learning. Triggers on: "scan for errors", "immune scan", "check output quality", "antibody scan". NOT for PR review (use pr-review) or repo audits (use repo-sentinel).