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 skills add closedloop-ai/claude-plugins --skill prevent-recurrencegit clone --depth 1 https://github.com/closedloop-ai/claude-pluginsWrote 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/closedloop-ai/claude-plugins/prevent-recurrence)<a href="https://agentmods.dev/skills/closedloop-ai/claude-plugins/prevent-recurrence"><img src="https://agentmods.dev/badge/skills/closedloop-ai/claude-plugins/prevent-recurrence/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/closedloop-ai/claude-plugins/prevent-recurrence"><img src="https://agentmods.dev/badge/skills/closedloop-ai/claude-plugins/prevent-recurrence.svg" alt="Reviewed on agentmods" width="80" 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.1 | $0.00131 | $0.02216 |
| Opus 5.5 | $0.00052 | $0.00886 |
| Sonnet 5.5 | $0.00026 | $0.00443 |
| Haiku 4.5 | $0.00013 | $0.00222 |
Grade B, and why
prevent-recurrence scanned grade B with 1 finding 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 10d 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.
Reads agent configuration directoriesmediumAgent snooping
.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.
- Harness check: find which agent harnesses work here (`CLAUDE.md`, `.claude/`, How it starts
The opening of the file, as written. The whole thing — 159 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Prevent Recurrence
A fixed instance is not a fixed mistake. Use this whenever correcting an issue or failure reveals a reusable lesson. The correction may involve code, setup, measurement, validation, workflow, or another agent or system mistake. It assumes nothing about the repository beyond step 3's findings.
Skip it for ordinary feature work, rejected review findings, and external outages or flaky infrastructure with no agent or system mistake, unless they expose a missing guard.
1. Fix the instance
- Reproduce the failure. Where practical, write a test at the observable surface (public function, route, CLI, rendered output) that fails on the current code, then fix the code and watch it pass. If not (prose, config, a one-off migration), say why in the closeout.
- Write the mistake as a class in one sentence: "did X when Y, causing Z". The class sentence, not the instance, drives what follows.
2. Find the class
- Search for the same shape: the same call, import, literal, pattern, or missing pairing; twin implementations of the same behavior (retries, recovery, another platform); and code from the same template, with text search and any code-intelligence tool available.
- Fix the other instances in the same change when they are small and in the same area. Otherwise list each one with its path for step 6.
- Keep the search commands for the closeout; one that found every instance with few false positives can seed a step 4 static check.
3. Learn the repository's own mechanisms
Find what exists before choosing a prevention; never assume a mechanism.
- Read the root and nearest instruction files for the changed paths, plus contributing and testing docs. If a rule already covers this mistake, step 5 applies.
- Find the lint configuration, custom rules, source-gate or policy scripts, allowlists and baselines, and what CI runs.
- Learn the test conventions and existing guard tests (tests that scan source files or iterate a registry usually host a new guard).
- Read review checklists and PR templates; start from any prevention a review already classified, and verify it.
- Harness check: find which agent harnesses work here (
CLAUDE.md,.claude/,AGENTS.md,.codex/,.agents/) and which instruction files each loads for the changed paths, and when:- Claude Code at launch:
CLAUDE.mdfrom its working directory up (AGENTS.mdif there is none) and.claude/rules/**/*.mdwithoutpaths:. On demand: a subdirectory'sCLAUDE.mdon a read, write or edit there (itsAGENTS.mdon a read, if it has noCLAUDE.md), and apaths:rule on a read, write or edit of a matching file. - Codex at start, once per run, in trusted projects only: one
AGENTS.override.md,AGENTS.mdor configured fallback per directory from the project root to its working directory, up toproject_doc_max_bytes(default 32768) in total. Not loaded: files below its working directory, path-scoped text, or.claude/rules(its.rulesfiles are command policy). - Both pass a PreToolUse or PostToolUse hook's
additionalContextto the model.
- Claude Code at launch:
What ships with it
1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 10d ago Changed · +9 lines · -2 tokens per session scan A → B 5acb96571451
- 1mo ago Changed · +1 lines · +17 tokens per session 8b351fa7ec7e
- 1mo ago First seen · 149 lines · 116 tokens per session scan A f5a14bb74db1
prevent-recurrence is a skill published in the GitHub repository closedloop-ai/claude-plugins (122 stars, last pushed 3d ago), licensed Apache-2.0. It adds 131 tokens to every session and 2,216 once invoked, about $0.0005 per session on Opus 5.5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-10.
prevent-recurrence compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| prevent-recurrenceclosedloop-ai/claude-plugins | Skill | 122 | 3d ago | Apache-2.0 | B | 131 | Claude Code |
| systematic-debuggingNousResearch/hermes-agent | Skill | 267k | today | MIT | A | 16 | Claude Code, Codex |
| node-inspect-debuggerNousResearch/hermes-agent | Skill | 267k | today | MIT | A | 19 | Claude Code, Codex |
| inspecting-hermes-desktop-domNousResearch/hermes-agent | Skill | 267k | today | MIT | A | 20 | Claude Code, Codex |
| agent-introspection-debuggingaffaan-m/ECC | Skill | 313k | 7d ago | MIT | A | 46 | Claude Code, Codex |
| agent-merge-conflict-arbiterNousResearch/hermes-agent | Skill | 267k | today | MIT | A | 19 | Claude Code, Codex |
| git-advanced-workflowswshobson/agents | Skill | 43k | 6d ago | MIT | A | 54 | Claude Code |