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 xobotyi/cc-foundry --skill debriefgit clone --depth 1 https://github.com/xobotyi/cc-foundryWrote 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/xobotyi/cc-foundry/debrief)<a href="https://agentmods.dev/skills/xobotyi/cc-foundry/debrief"><img src="https://agentmods.dev/badge/skills/xobotyi/cc-foundry/debrief/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/xobotyi/cc-foundry/debrief"><img src="https://agentmods.dev/badge/skills/xobotyi/cc-foundry/debrief.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.00043 | $0.03903 |
| Opus 5.5 | $0.00017 | $0.01561 |
| Sonnet 5.5 | $0.00009 | $0.00781 |
| Haiku 4.5 | $0.00004 | $0.00390 |
Grade B, and why
debrief 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 1mo 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.
repository's `.claude/settings.json` for a project lesson, in `~/.claude/settings.json` for a personal one. How it starts
The opening of the file, as written. The whole thing — 228 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Debrief
This workflow finds corrections in the session transcripts and in auto memory, and writes each durable lesson into the file the agent reads next time. Run phases 1 to 3 without stopping; the only stop is the gate in phase 4.
Phase 1 — Collect
The argument is $ARGUMENTS. An empty argument means this session only: --session ${CLAUDE_SESSION_ID}. Otherwise it
names a window, repositories, or both.
The window:
- a day count such as
14d, or a date —--since <the window> all, or no window — every transcript: no flag
The repositories:
- none named — the current repository: no flag
- one or more paths or names — one
--project <path>each, in place of the current repository;.names the current one. Resolve a name with--list-projects, which prints the last activity date, the session count, and the path of every repository that has transcripts. Ask the user when a name matches more than one path. everywhere— every repository:--all-projects
Run
node ${CLAUDE_SKILL_DIR}/scripts/extract-corrections.mts <flags> --context "${TMPDIR:-/tmp}/debrief-${CLAUDE_SESSION_ID}" > "${TMPDIR:-/tmp}/debrief-${CLAUDE_SESSION_ID}.jsonl".
The script reads the transcripts and auto memory under ~/.claude/projects/ and prints a count per signal to stderr. A
non-zero exit ends the workflow: report the script's message.
Each line of the output file is one candidate. Every candidate carries signal, text, and at; the signal decides
the rest:
- A correction —
rejection(the user refused a tool call),interjection(the user sent a message while a tool call waited for approval, so the harness refused the call),interrupt(the user stopped the agent),rewind(the user discarded the agent's work and re-prompted),mid-turn(the user steered while the agent worked),follow-up(any other prompt).textis the user's words;saidis the end of the agent's last text before them, where the question the user answered sits;didis the agent's last tool calls;skillslists the skills loaded in the session;projectandsessionlocate it. retraction— the agent withdrew its own earlier claim or work.textstarts at the line that withdraws it.compaction-loss— after a compaction, the agent read its own transcript to recover what the summary dropped.textlists the reads, with<transcript>for the file;countsays how many.tool-error— an error the agent made and fixed on its own, repeated across sessions.textis the error;countandsessionssay how often it recurred;didis the failing call andfixthe call that next succeeded with the same tool;projectslists the repositories. A shell dialect error — a zsh glob, a BSDsed, a missing GNU tool — groups under its trap's name, such asBash: zsh-nomatch, whether the command ran or not.procedure— a run of steps the agent repeated insessionssessions.textjoins the steps with>;skillslists up to three skills loaded in most of those sessions;projectslists the repositories.memory— an entry of the repository's auto memory, present only where auto memory is on.textis its description and body,typeits memory type,fileits path,projectits repository.
What ships with it
30 files 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.
- scripts/check-hook.mts 2.4 KB
- scripts/check-hook.test.mts 783 B
- scripts/extract-corrections.mts 4.9 KB
- scripts/extract-corrections.test.mts 25 KB
- scripts/lib/calls.mts 3.8 KB
- scripts/lib/calls.test.mts 3.3 KB
- scripts/lib/errors.mts 4.9 KB
- scripts/lib/errors.test.mts 2.3 KB
- scripts/lib/extract.mts 4.1 KB
- scripts/lib/files.mts 761 B
- scripts/lib/hooks.mts 7.9 KB
- scripts/lib/hooks.test.mts 5.7 KB
- scripts/lib/json.mts 1.1 KB
- scripts/lib/loaded.mts 4.9 KB
- scripts/lib/loaded.test.mts 4.7 KB
- scripts/lib/memory.mts 4.4 KB
- scripts/lib/procedures.mts 8.0 KB
- scripts/lib/procedures.test.mts 7.1 KB
- scripts/lib/projects.mts 5.2 KB
- scripts/lib/replay.mts 22 KB
- scripts/lib/replay.test.mts 20 KB
- scripts/lib/session.mts 13 KB
- scripts/lib/session.test.mts 9.1 KB
- scripts/lib/skills.mts 1.6 KB
- scripts/lib/text.mts 1.3 KB
- scripts/lib/text.test.mts 1.2 KB
- scripts/lib/transcript.mts 9.8 KB
- scripts/lib/transcript.test.mts 6.3 KB
- scripts/replay.mts 6.3 KB
- scripts/replay.test.mts 5.5 KB
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.
- 1mo ago Changed · +74 lines · +3 tokens per session 38ff49cb75aa
- 1mo ago Changed df9eb6f3b9eb
- 1mo ago First seen · 154 lines · 40 tokens per session scan B 7b108b816750
debrief is a skill published in the GitHub repository xobotyi/cc-foundry (23 stars, last pushed yesterday), licensed MIT. It adds 43 tokens to every session and 3,903 once invoked, about $0.0002 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-25.
debrief compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| debriefxobotyi/cc-foundry | Skill | 23 | yesterday | MIT | B | 43 | Claude Code |
| esp32-expertjohnkozaris/jko-claude-plugins | Skill | 11 | 29d ago | MIT | A | 137 | Claude Code |
| reflectsneg55/agent-starter | Skill | 77 | today | MIT | A | 37 | Claude Code |
| remembersneg55/agent-starter | Skill | 77 | today | MIT | A | 38 | Claude Code |
| evolving-statusclaude-world/director-mode-lite | Skill | 81 | 1mo ago | MIT | A | 17 | Claude Code |
| dreamsneg55/agent-starter | Skill | 77 | today | MIT | B | 27 | Claude Code |
| performance-auditgreglas75/zuvo | Skill | 8 | today | MIT | A | 90 | Claude Code |