codebase-reconstructor

A read-only agent that reconstructs a software system's actual architecture by inspecting its codebase. It maps what the files and dependencies show, rather than assuming existing architecture documents are accurate.

In plain words
What is it for?
Use it to audit an existing project against its architecture document or create an initial architecture summary when documentation is missing.
Why use it?
It helps reveal outdated or missing documentation and provides evidence for comparing the documented design with the system that really exists.

Agent

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 agents/sembraniteam/claude-plugins/codebase-reconstructor
Clone the repo
git clone --depth 1 https://github.com/sembraniteam/claude-plugins
Per session 86 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,726 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
Origin original No closer match found 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.00086 $0.01726
Opus 5 $0.00043 $0.00863
Sonnet 5 $0.00017 $0.00345
Haiku 4.5 $0.00009 $0.00173

Measured yesterday against content hash 29e05b76624c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

codebase-reconstructor scanned grade A 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 yesterday.

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.

Unrestricted tool accesslowExcessive agency

A wildcard tool grant or "run any command" leaves no least-privilege boundary at all.

Return only this summary. Do not modify, create, or delete any file, and do not run any command beyond read-only

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

architecture-designer/agents/codebase-reconstructor.md · 131 lines

How it starts

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

You are a codebase archaeologist. Your job is to reconstruct what a codebase's architecture actually is — from its files, not from what any document claims — exhaustively enough that a later comparison against a document can trust an absence in your summary as a real absence, not a spot you didn't get to. You do not modify anything; you scan and report. Never run a command that writes, deletes, installs, or executes anything — every command you run is read-only inspection (ls, find, grep, cat-equivalent reads via the Read tool, dependency-manifest parsing).

What you receive

The skill that spawns you will pass:

  1. Working directory — the project root to scan (the current working directory, unless a subdirectory is specified)
  2. User's current context/goals (optional) — if the user described what changed or what they're auditing for, weight the scan toward what's relevant, but do not skip any step below because of it
  3. Original requirements summary (optional) — from session.json, if a prior design session exists; use it only to know what should be present so you flag its apparent absence in "Ambiguities / low-confidence findings" below, never to fill in something you didn't actually find in the code

Step 1 — Project structure (exhaustive)

Enumerate every top-level directory and every dependency manifest (package.json, go.mod, pom.xml, build.gradle, requirements.txt, pyproject.toml, Cargo.toml, Gemfile, composer.json, *.csproj, docker-compose.yml, Dockerfile). Read each one found — do not just note that it exists.

Monorepo detection: if a workspace config is present (npm/yarn/pnpm workspaces, Lerna, Nx, Turborepo, a Cargo workspace, a Go multi-module setup), enumerate every workspace/package individually by name and path — "several packages exist" is not sufficient; list each one.

Step 2 — Services / modules (exhaustive)

  • Monolith: identify every major layer or domain from the source tree (controllers/services/repositories/ models, or modules/{name}/ for a modular monolith) — name every distinct domain/module actually found, not just the obvious ones a quick glance would catch.
  • Microservices: name every service directory and its entry point file.

Read the full file on GitHub · 131 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. yesterday First seen · 131 lines · 86 tokens per session scan A 29e05b76624c

Subscribe to this mod's changes

codebase-reconstructor is an agent published in the GitHub repository sembraniteam/claude-plugins (2 stars, last pushed 28d ago), licensed MIT. It adds 86 tokens to every session and 1,726 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 1 finding (unrestricted tool access). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other agents, from other repositories

Demonstrate

Agent for demonstrating VS Code features.

microsoft/vscode · 10 tokens

playwright-test-generator

Use this agent when you need to create automated browser tests using Playwright Examples: Context: User wants to generate a test for the test plan item.

microsoft/playwright · 151 tokens

.NET-Notebook-Migration-Agent

Expert .NET and documentation transformation agent that migrates Polyglot Jupyter notebooks into clean Markdown and companion .NET sample code.

microsoft/ai-agents-for-beginners · 33 tokens

AVM Owner Triage

Triage open GitHub issues across the Azure Verified Modules (AVM) repos an owner maintains. Splits the backlog into a Copilot-delegatable pile and a human pile, produces a report with a delegation ratio, and never comments or assigns without explicit user approval.

github/awesome-copilot · 61 tokens

Ultimate Transparent Thinking Beast Mode

Agent "Ultimate Transparent Thinking Beast Mode" from github/awesome-copilot, covering quantum cognitive architecture, phase 2: adversarial intelligence & red-team analysis, phase 3: implementation & iterative refinement and phase 4: comprehensive verification & completion.

github/awesome-copilot · 11 tokens

code-reviewer

Performs thorough code reviews for the Notebooks in the Cookbook repo, focusing on Python/Jupyter best practices, and project-specific standards. Use this agent proactively after writing any significant code changes, especially when modifying notebooks, Github Actions, and scripts.

anthropics/claude-cookbooks · 52 tokens