CodeDebrief
Local-first static analysis that turns source code into deterministic, source-grounded workflow maps for coding agents via MCP.
Install / Use
claude mcp add ferdinandobons -- npx -y github:ferdinandobons/CodeDebriefIf the server publishes to npm under a different name, use that package instead — check the repo README.
MCP Server
Model Context Protocol server
Quality Score
Category
AutomationSupported Platforms
Our assessment of CodeDebrief
CodeDebrief scores 82/100 on our quality scale, 1210th of 1,753 Automation skills we index.
Its MCP Server is 25 KB long, well organised into 31 sections with 20 code examples: a thorough specification that gives an agent plenty to work with.
It has 42 GitHub stars, so there is little community track record yet; judge it on its content.
Maintenance, license and trust
- The repository was last updated about 3 months ago. That is recent enough to be usable, but agent tooling moves fast, so check the instructions against your agent's current version.
- Our last check on 2026-09-21 found the source still online.
- It is released under the Apache-2.0 license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 95/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
Safety scan
No issues foundOur scan of the first 100 KB of the file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful.
AI review by kimi-k2.7-code on 2026-09-25. Automated pattern scan on 2026-09-25. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.
CodeDebrief compared with similar skills
All 4 of these similar skills score higher than CodeDebrief; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| CodeDebrief (this skill)by ferdinandobons | 82 | 42 | 3mo ago | MCP Server |
| Agent-Reachby Panniantong | 100 | 85.7k | 12d ago | CLAUDE.md |
| headroomby headroomlabs-ai | 100 | 73.9k | today | CLAUDE.md |
| rufloby ruvnet | 100 | 73.4k | today | CLAUDE.md |
| CowAgentby zhayujie | 100 | 47.1k | today | CLAUDE.md |
Frequently asked questions
- How do I install CodeDebrief?
- Run
claude mcp add ferdinandobons -- npx -y github:ferdinandobons/CodeDebrief. The install tabs above show the steps for each supported agent. - Which AI agents does CodeDebrief work with?
- It is written for Claude Code and Claude Desktop, as a MCP Server file. Other agents that read the same format can often use it too.
- Is CodeDebrief safe to use?
- Our scan of the first 100 KB of the file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful. It is Apache-2.0-licensed and scores 95/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is CodeDebrief still maintained?
- The repository was last updated about 3 months ago. That is recent enough to be usable, but agent tooling moves fast, so check the instructions against your agent's current version.
Skill content
View source on GitHubCodeDebrief turns a local codebase into deterministic workflow flowcharts that coding agents can inspect, render, expand, translate, and explain. It statically maps entrypoints, decisions, branches, internal calls, returns, exceptions, and outcomes before the agent answers, so the visual explanation is grounded in reusable artifacts instead of a fresh best-effort reconstruction.
The analyzer, artifacts, viewer, and MCP server are local-first and do not require an LLM provider key. CodeDebrief is not a documentation generator, a bug finder, a generic graph database, or an LLM enrichment service; it is a workflow navigation layer for understanding how code paths actually connect.

Example output: a compact presentation layer generated from local CodeDebrief artifacts. Canonical workflow visuals are vertical by default; horizontal diagrams are used when the user explicitly asks for a compact overview.
Status: pre-1.0 alpha. The model is versioned, but schema and MCP payloads may evolve before 1.0. Latest release: v0.17.0.
Quick Start
CodeDebrief requires Python 3.10 or newer. Install it from PyPI with uv:
uv tool install codedebrief
codedebrief setup claude
Replace claude with codex, gemini, or cursor for another supported agent surface.
To analyze only selected folders while keeping codedebrief-out in the current project
root, pass them during setup:
codedebrief setup claude --source backend/ frontend/
For a multi-repo workspace, create or choose one folder to hold CodeDebrief config and
artifacts, then point --source at the repos:
mkdir pipeline-map
cd pipeline-map
codedebrief setup claude --source ../ingest-service ../transform-service ../warehouse-ui
Scope size matters. Pointing CodeDebrief at the whole repository or at many large folders
can materially increase setup, update, and MCP response times because there are more
files to hash, parse, link, and search. Prefer the smallest source roots that still contain
the workflows you want agents to explain.
MCP responses are bounded by token_budget. If an agent passes an explicit budget,
CodeDebrief honors it. For broad agent_context requests that use the default budget,
CodeDebrief automatically raises the effective budget on large projects so the first slice
has enough room without forcing the agent to retry with a bigger request.
After setup, ask ordinary questions:
Show me the checkout workflow.
Which branches handle a failed payment?
What workflows are affected by this file?
Where is this status handled?
Expand this workflow one level deeper.
For manual exploration:
codedebrief view
setup keeps CodeDebrief-owned config and artifacts in codedebrief-out/ by default:
codedebrief-out/
├── codedebrief.toml optional project config created by setup
├── codedebrief.html local interactive full-project viewer
├── codedebrief.md reviewable Mermaid flowcharts
├── codedebrief.json canonical model for MCP, CI, scripts, and the viewer
├── codedebrief.hash.json model hash sidecar for faster MCP cold starts
└── codedebrief.errors.jsonl saved CLI/MCP diagnostics, when errors occur
Provider-required files still live where the client expects them, for example .mcp.json,
AGENTS.md, CLAUDE.md, GEMINI.md, .cursor/rules/codedebrief.mdc, and agent skill
directories.
For explicit refresh during development:
codedebrief update
codedebrief validate --check-sync
The default CLI output is intentionally compact. Add --verbose to setup, update,
validate, or doctor when you need detailed progress and file paths.
To inspect saved local errors from failed CLI/MCP operations:
codedebrief doctor --errors
codedebrief doctor --errors --clear
To remove CodeDebrief from the current project folder:
codedebrief clear
clear removes codedebrief-out/, legacy root codedebrief.toml, .codedebriefignore,
installed CodeDebrief skills, MCP server entries, and managed instruction blocks. It asks
for confirmation by default; use codedebrief clear --yes in scripts.
To install a pinned GitHub release instead:
uv tool install "git+https://github.com/ferdinandobons/CodeDebrief.git@v0.17.0"
Or install from a source checkout:
git clone https://github.com/ferdinandobons/CodeDebrief.git codedebrief
cd codedebrief
uv tool install .
Why It Exists
A coding agent can reconstruct a workflow from raw source, but that reconstruction normally depends on the searches it performs, the files it selects, and the context it has room to read. Repeating that process is slow, and less obvious branches or cross-file paths can be left out.
CodeDebrief creates a reusable navigation layer before the agent explains anything:
- entrypoints, decisions, branches, calls, outcomes, and source ranges;
- domain concepts such as statuses, roles, permissions, enums, and feature flags;
- affected-workflow context for changed files, symbols, flows, and dependency paths;
- canonical visual slices with stable diagram hashes;
- optional language-friendly labels derived as a presentation layer from analyzer facts.
Where It Fits
CodeDebrief does not replace maintained project documentation. Documentation should capture architecture, intent, invariants, conventions, operational knowledge, and why important decisions were made.
CodeDebrief serves a faster and narrower need: inspecting the workflow encoded in the current source while brainstorming, debugging, planning a change, or reviewing impact. Use it to:
- visualize one focused part of a workflow on demand;
- follow decisions and internal calls across files;
- inspect workflows affected by a file, symbol, or planned change;
- give a coding agent a shared structural slice to reason over immediately.
Documentation explains the system over time. CodeDebrief provides an on-demand visual slice of the current source when you need to reason about it. Any agent-written explanation or language-friendly label is a presentation layer over the analyzer-generated flowchart, not the source of the flowchart itself.
The generated agent instructions treat CodeDebrief artifacts as part of done for
workflow-relevant changes: after meaningful source, route, config, or agent-instruction
edits, run codedebrief update and codedebrief validate --check-sync before finalizing
or committing so MCP answers, Markdown summaries, and codedebrief view use current
graphs.
What You Can Verify
A returned workflow_slice can expose:
- source ranges for modeled steps;
- explicit decisions, branches, calls, and outcomes;
- callers, callees, and unresolved-call context;
- omissions caused by token budget, ambiguity, stale artifacts, or unsupported capabilities;
- stable handles for expanding the slice, tracing a path, or opening the related visual.
These signals make the source-level model inspectable. They do not prove business correctness or runtime behavior.
Map First, Then Explain
Once setup has configured the project MCP server and agent instructions, supported
agents should start code-logic questions with MCP agent_context. The agent receives a
bounded workflow_slice before deciding whether it needs more source, a deeper slice, or a
path trace.
Show me a visual workflow for the invitation system.
Explain this code path with a source-grounded flowchart.
Which workflows are affected by this change?
Where is this status handled?
Expand the omitted branches in this workflow_slice.
Rewrite the diagram labels in plain English.
The agent can explain the flowchart, but the static analyzer creates the underlying map.
Setup
Supported targets:
codedebrief setup codex
codedebrief setup claude
codedebrief setup claude --source backend/ frontend/
codedebrief setup claude ../my-app --source backend-api frontend/src
codedebrief setup claude ../pipeline-map --source ../repo-a ../repo-b
codedebrief setup cursor --full
The selected target controls which files are written:
| Target | Files |
| --- | --- |
| codex | AGENTS.md, .agents/skills/codedebrief/SKILL.md, project MCP config |
| claude | CLAUDE.md, .claude/skills/codedebrief/SKILL.md, project MCP config |
| gemini | GEMINI.md, .gemini/skills/codedebrief/SKILL.md, .gemini/settings.json MCP config |
| cursor | .cursor/rules/codedebrief.mdc, project MCP config |
setup <target> writes only that target's files. Run it separately for each agent
surface you want to configure.
setup creates codedebrief-out/codedebrief.toml when needed, installs the selected
agent instruction file, installs a provider-native CodeDebrief skill where supported,
registers project-scoped MCP where supported, generates initial artifacts, runs doctor,
and validates the result. Use --source to set source_roots before that initial artifact
generation starts.
On Windows, run setup in the same environment that will run the coding agent when
possible. If you run setup from WSL inside a /mnt/c/... project, CodeDebrief writes
JSON MCP configs that launch the server through wsl.exe with --cd <project> and
bash -lc "codedebrief mcp .",
so Windows-native agent clients do not receive a raw WSL path as their command target.
The gemini target follows Gemini CLI / Antigravity conventions: GEMINI.md provides
project context, .gemini/skills/codedebrief/SKILL.md provides provider-native workflow
guidance, and .gemini/settings.json registers the project-scoped CodeDebrief MCP server.
Agent Workflow
For natural-language questions, agents should start with MCP agent_context.
agent_context returns a workflow_slice with:
- normalized intent and task type;
- primary and supporting flows;
- ordered source-grounded steps;
- decision nodes, branches, values, and outcomes;
- calls, callers, callees, and unresolved call context;
- domain logic for relevant state-like concepts;
- source ranges the agent can cite;
- visual handles for
snapshot_sliceandcodedebrief view; - omissions caused by token budget, ambiguity, stale artifacts, or unsupported capability;
- follow-up tools for expansion, path tracing, focused explanation, and snapshots.
When a user asks for a visual workflow, the agent should first render the deterministic Mermaid visual returned by CodeDebrief:
- Render
workflow_slice.presentation.canonical_visual.diagramexactly as returned only when the client renders Mermaid inline. - If the client cannot render Mermaid inline, use
snapshot_slicewithinclude_svg=falseand provide the returned.mmdor Mermaid Markdown artifact before prose. Do not paste a long Mermaid code block as the primary visual unless the user asks
Truncated for display — read the full file on GitHub.
Related Skills
Agent-Reach
85.7kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
headroom
73.9kCompress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.
ruflo
73.4k🌊 The original agent harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, federation, vector RAG integration, and native Claude Code / Codex / Hermes and many more Integrated
CowAgent
47.1kOpen-source super AI assistant & Agent Harness. Plans tasks, runs tools and skills, self-evolves with memory and knowledge. Multi-agent, multi-model, multi-channel. Lightweight, extensible, one-line install.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
