CodeDebrief: Instructions file for Claude Code

CLAUDE.md

CodeDebrief CLAUDE.md is an instructions file for Claude Code from ferdinandobons/CodeDebrief. It costs 1,455 tokens per session, scanned C, a copy of CodeDebrief AGENTS.md, Apache-2.0.

A set of instructions for CodeDebrief, a tool that keeps software decision flows connected to the source code. A decision flow shows how code behavior and choices relate across a project.

In plain words
What is it for?
Use it when investigating substantial code changes, tracing dependencies, answering questions about a workflow, or presenting a workflow visually.
Why use it?
It tells the coding agent where to look for context about behavior, decisions, workflows, and changed code before searching files broadly.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md.

This is ferdinandobons/CodeDebrief's own configuration. It tells Claude Code how to work on CodeDebrief itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything CodeDebrief configures →

Reuse

Borrowing it

Nothing to install: this file belongs to ferdinandobons/CodeDebrief. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/ferdinandobons/CodeDebrief/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/ferdinandobons/CodeDebrief

Made for: Claude Code.

Wrote 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.

agentmods badge for CodeDebrief CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/ferdinandobons/codedebrief/claude-md/github.svg)](https://agentmods.dev/instructions/ferdinandobons/codedebrief/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/ferdinandobons/codedebrief/claude-md"><img src="https://agentmods.dev/badge/instructions/ferdinandobons/codedebrief/claude-md/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.

agentmods 80×15 button for CodeDebrief CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/ferdinandobons/codedebrief/claude-md"><img src="https://agentmods.dev/badge/instructions/ferdinandobons/codedebrief/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,455 This file is loaded in full into every session.
When invoked 1,455 The same file — it is already loaded in full.
Security scan C 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin 100% copy Near-identical to another mod in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.01455 $0.01455
Opus 5.5 $0.00582 $0.00582
Sonnet 5.5 $0.00291 $0.00291
Haiku 4.5 $0.00145 $0.00145

Measured 2mo ago against content hash 38a2de68040c, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade C, and why

CodeDebrief CLAUDE.md scanned grade C 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 2mo 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.

Hidden instructionshighPrompt injection

Directives inside HTML comments, invisible characters or bidirectional overrides are read by the model and not by the person reviewing the file.

<!-- codedebrief:instructions:start -->
Origin

This is a copy

100% identical to CodeDebrief AGENTS.md — 4 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

CLAUDE.md · 106 lines

How it starts

The opening of the file, as written. The whole thing — 106 lines — stays where its author put it; the contents beside it link to each section on GitHub.

CodeDebrief

This project uses CodeDebrief to keep decision flows synchronized with the source code.

For codebase questions about behavior, decisions, workflow structure, or changed-code context:

  1. Prefer the CodeDebrief MCP agent_context tool before broad file-by-file searches.
  2. Use agent_context for substantial changes, passing changed files, selected code, current file, flow id, symbol, or dependency path when available; inspect its returned workflow_slice before answering.
  3. When the user asks to show a workflow, flusso, visual flow, canvas, or workflow_slice, prefer the canonical Mermaid visual: render workflow_slice.presentation.canonical_visual.diagram exactly as returned only when the client renders Mermaid inline. If the client cannot render Mermaid inline, or if Mermaid would appear as a raw code block, call snapshot_slice with include_svg=false and provide artifact.mermaid_path, artifact.mermaid_markdown_path, or artifact.mermaid_open_command as the visual result before prose. Do not paste a long Mermaid code block as the primary visual unless the user explicitly asks for raw or copyable Mermaid. Do not render snapshot.svg inline by default; SVG artifacts are for explicit SVG requests or local inspection because their layout can differ from Mermaid. Keep CodeDebrief visuals vertical/top-to-bottom by default. Use a horizontal layout only when the user explicitly asks for a compact horizontal overview. Inspect the full returned workflow_slice before deciding what to show. Choose the first visible depth yourself: show the clearest useful subset, then say that the displayed diagram is a bounded summary and can be expanded. After the visual, include a short high-level written flow in the user's language, derived only from returned ordered steps, primary/supporting flows, decisions, domain logic, source ranges, and focused follow-up payloads. Keep it compact and explain the happy path first, adding only the branches needed by the request. If the CodeDebrief result is too large, saved externally, truncated, or missing the exact canonical visual, retry with a smaller token_budget and narrower flow_id, symbol, current_file, or scope; do not recover by listing flows and hand-building a diagram. Do not synthesize a new Mermaid diagram and do not add limits, error codes, branches, or service steps that are absent from the workflow_slice payload. Do not read source files to rebuild, relabel, or extend the diagram; source reads are only follow-up explanation after the deterministic visual is shown and must not change displayed nodes, edges, labels, or branches. If neither exact canonical Mermaid nor a returned Mermaid artifact can be used, say so and provide viewer_targets instead of creating a replacement Mermaid diagram. If the user asks for a more language-friendly version, rewrite the technical block labels and the high-level written flow in simple wording using the language of the user's request. This is allowed only as a separate presentation layer derived from returned node, edge, decision, step, and source fields. End visual answers with concise options in the user's language: simplify labels and written flow, expand omitted nodes/branches/adjacent flows, or explore a related area. Show raw JSON or YAML only when explicitly requested.
  4. Use expand_slice, workflow_path, snapshot_slice, explain_flow, explain_node, or explain_edge only when the first slice needs more precise context.
  5. Use codedebrief view ... only when a human wants the manual UI flowchart.

When helping a user set up or learn CodeDebrief:

  1. Start with codedebrief --help, then use codedebrief <command> --help for the specific command you plan to run or recommend.
  2. Use codedebrief doctor when install, dependency, or parser capability issues are unclear.
  3. Do not ask for LLM provider keys for the primary workflow. Language-friendly labels and high-level written flows are presentation layers derived from deterministic workflow facts.
  4. codedebrief setup <target> updates only that target's files. Run the command separately for each agent surface you want to configure, preserving any target-specific frontmatter and local notes.

Read the full file on GitHub · 106 lines

Changes

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.

  1. 2mo ago First seen · 106 lines · 1,455 tokens per session scan C 38a2de68040c

Subscribe to this mod's changes

CodeDebrief CLAUDE.md is an instructions file published in the GitHub repository ferdinandobons/CodeDebrief (42 stars, last pushed 4mo ago), licensed Apache-2.0. It adds 1,455 tokens to every session, about $0.0058 per session on Opus 5.5. A static security scan graded it C with 1 finding (hidden instructions). It is 100% identical to CodeDebrief AGENTS.md, differing in 4 lines, and is treated as a copy.

Related

CodeDebrief CLAUDE.md compared with instructions from other repositories

CodeDebrief CLAUDE.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
CodeDebrief CLAUDE.mdferdinandobons/CodeDebriefInstructions file424mo agoApache-2.0C1,455Claude Code
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143kyesterdayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode