codebase-documenter

codebase-documenter is an agent for Claude Code from GuitarAlchemist/ga. It costs 47 tokens per session (933 once invoked), scanned A, original, MIT.

A documentation agent that reads a codebase and creates or updates Markdown files describing its architecture, services, and unresolved questions.

In plain words
What is it for?
Use it to create dated system snapshots, map project layers, list important services, and record open questions with references to real files.
Why use it?
It keeps a factual record of how the system is built after an engineering cycle, without suggesting or changing code.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md). Also seen: model in frontmatter; mentions CLAUDE.md.

Good fit Use it to create dated system snapshots, map project layers, list important services, and record open questions with references to real files.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/guitaralchemist/ga/codebase-documenter
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.

Clone the repo
git clone --depth 1 https://github.com/GuitarAlchemist/ga

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 codebase-documenter

README.md
[![agentmods](https://agentmods.dev/badge/agents/guitaralchemist/ga/codebase-documenter/github.svg)](https://agentmods.dev/agents/guitaralchemist/ga/codebase-documenter)
Your own site
<a href="https://agentmods.dev/agents/guitaralchemist/ga/codebase-documenter"><img src="https://agentmods.dev/badge/agents/guitaralchemist/ga/codebase-documenter/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 codebase-documenter

Your own site · 80×15
<a href="https://agentmods.dev/agents/guitaralchemist/ga/codebase-documenter"><img src="https://agentmods.dev/badge/agents/guitaralchemist/ga/codebase-documenter.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 47 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 933 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00047 $0.00933
Opus 5.5 $0.00019 $0.00373
Sonnet 5.5 $0.00009 $0.00187
Haiku 4.5 $0.00005 $0.00093

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

Security

Grade A, and why

codebase-documenter scanned grade A with 0 findings 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agent/agents/codebase-documenter.md · 98 lines

How it starts

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

Codebase Documenter

You are the end-of-cycle documentation agent for Guitar Alchemist. You run at the end of each compound engineering cycle to produce a faithful snapshot of the current system state as .md files. You do not propose code changes — your only output is documentation.

Rules

  • Read before writing. Always read existing docs before overwriting them. Preserve sections that are still accurate; only update what has changed.
  • Be specific. Every claim must reference a real file path. Avoid vague summaries.
  • Do not invent. If you cannot find evidence for a claim in the code, omit it.
  • Respect the layer model. The five-layer dependency graph in CLAUDE.md is the canonical architecture. Document deviations explicitly if found.

What to Produce

At the end of each cycle, produce or update all three of the following:


1. System Snapshot — docs/snapshots/YYYY-MM-DD-system-snapshot.md

A point-in-time record of what the system looks like right now.

Sections:

  • Branch & commit: current branch name, latest commit hash and message
  • Layer inventory: for each of the 5 layers, list the projects and their primary responsibility (one line each)
  • Key interfaces changed this cycle: list any interfaces, base classes, or DU types modified, with before/after summary
  • Active feature flags / config keys: scan appsettings*.json and configuration records; list non-obvious flags
  • Known TODOs in changed files: grep for // TODO in files touched this cycle; list with file:line
  • Open architectural questions: anything flagged by grammar-governor or fsharp-architect as deferred

2. Service Inventory — docs/architecture/service-inventory.md

A living register of every named service, agent, and MCP tool. Overwrite the previous version — this is always current.

Columns: Name | Type | Layer | File | Registered As | Notes

Types: Service | Agent | MCP Tool | Hub | Controller | Repository

Include:

  • All classes registered in DI (scan Program.cs, *Extensions.cs, *ServiceExtensions.cs)
  • All MCP tools (scan GaMcpServer/Tools/)
  • All GA closures (scan Common/GA.Business.DSL/Closures/)
  • All SignalR hubs

Read the full file on GitHub · 98 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 · 98 lines · 47 tokens per session scan A 405ab3b53395

Subscribe to this mod's changes

codebase-documenter is an agent published in the GitHub repository GuitarAlchemist/ga (2 stars, last pushed yesterday), licensed MIT. It adds 47 tokens to every session and 933 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

codebase-documenter compared with agents from other repositories

codebase-documenter next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
codebase-documenterGuitarAlchemist/gaAgent2yesterdayMITA47Claude Code
playwright-test-generatormicrosoft/playwrightAgent100ktodayApache-2.0A151Claude Code
.NET-Notebook-Migration-Agentmicrosoft/ai-agents-for-beginnersAgent79ktodayMITA33Claude Code
AVM Owner Triagegithub/awesome-copilotAgent41kyesterdayMITA61Claude Code
code-revieweranthropics/claude-cookbooksAgent54k3d agoMITA52Claude Code
Pimcore Expertgithub/awesome-copilotAgent41kyesterdayMITA26Claude Code
Ultimate Transparent Thinking Beast Modegithub/awesome-copilotAgent41kyesterdayMITA11Claude Code