CodeDebrief CLAUDE.md

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

Install

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.

agentmods
npx agentmods add instructions/ferdinandobons/codedebrief/claude-md
Clone the repo
git clone --depth 1 https://github.com/ferdinandobons/CodeDebrief
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. Scan, not verified.
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 $0.01455 $0.01455
Opus 5 $0.00727 $0.00727
Sonnet 5 $0.00291 $0.00291
Haiku 4.5 $0.00145 $0.00145

Measured 2d ago against content hash 38a2de68040c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 2d 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. 2d 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 2mo ago), licensed Apache-2.0. It adds 1,455 tokens to every session, about $0.0073 per session on Opus 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

Other instructions, from other repositories