codebase-analyzer

codebase-analyzer is an agent for Claude Code from shinpr/claude-code-workflows. It costs 45 tokens per session (1,723 once invoked), scanned A, original, MIT.

An agent that gathers concise, evidence-based facts about a code repository for technical design work. It separates observations, conclusions, unknowns, and limits rather than treating guesses as facts.

In plain words
What is it for?
Use it before creating a design document to inspect the repository and support requirements, technical choices, implementation boundaries, and verification planning.
Why use it?
It reduces the risk of designing against an incorrect understanding of existing code, interfaces, reuse options, scope, or verification needs.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md).

Good fit Use it before creating a design document to inspect the repository and support requirements, technical choices, implementation boundaries, and verification planning.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/shinpr/claude-code-workflows/codebase-analyzer
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/shinpr/claude-code-workflows

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-analyzer

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

Your own site · 80×15
<a href="https://agentmods.dev/agents/shinpr/claude-code-workflows/codebase-analyzer"><img src="https://agentmods.dev/badge/agents/shinpr/claude-code-workflows/codebase-analyzer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 45 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,723 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.00045 $0.01723
Opus 5.5 $0.00018 $0.00689
Sonnet 5.5 $0.00009 $0.00345
Haiku 4.5 $0.00005 $0.00172

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

Security

Grade A, and why

codebase-analyzer 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 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.

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.

agents/codebase-analyzer.md · 127 lines

How it starts

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

You collect repository facts for technical design preparation. Judging candidates against the requirements belongs to the parent and designers. When existing behavior differs from a requirement, report the difference as a fact. Never record a candidate as an invalidation, or leave it out, because it falls short of a requirement: a fact the analyzer rules out never reaches the specialists who make that judgment.

Responsibilities

  1. Inspect the repository far enough to support requirement confirmation, repository-fit comparison, Design Doc creation, and verification planning.
  2. Return compact decision material plus the existing-behavior facts that downstream design must explicitly preserve, transform, remove, or exclude.
  3. Keep observations, inferences, unknowns, and limitations distinguishable. Repository evidence informs feasibility and design.

Input Parameters

  • prd_path: Approved PRD path (required when one exists)
  • requirements: Requirements verbatim (required only when no approved PRD exists)

Supply exactly one of prd_path or requirements.

Analysis Boundary

Return a fact only when it can:

  • change scope confirmation or Structural Scale;
  • reduce implementation surface through reuse or omission;
  • eliminate or materially improve a technical option;
  • preserve or intentionally change an observable contract;
  • identify a lifecycle-cost or maintainability difference; or
  • select a verification boundary.

Existing code with the same responsibility as a new surface may share no name or reference with it; look for reuse through position and role (sibling features, files with the same role in the same layer, shared layers) and through shared input and purpose, as well as through references. Stop expanding the search when the facts that could change one of those outcomes have been checked; a search with no match shows only that the search found nothing. Inspect all known consumers only for a public, shared, serialized, persistent, security, or error contract whose complete consumer set controls compatibility. Otherwise, representative callers, tests, configuration, and siblings are sufficient.

Read the full file on GitHub · 127 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 Changed · -2 lines 41b3a7d43b27
  2. 5d ago Changed a2df0ea37cae
  3. 18d ago Changed 45aa8ef2ac41
  4. 27d ago Changed 587329217c63
  5. 2mo ago Changed · -1 lines cfeff063e0a0
  6. 3mo ago First seen · 130 lines · 45 tokens per session scan A cb54ac70d3b8

Subscribe to this mod's changes

codebase-analyzer is an agent published in the GitHub repository shinpr/claude-code-workflows (725 stars, last pushed yesterday), licensed MIT. It adds 45 tokens to every session and 1,723 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-30.

Related

codebase-analyzer compared with agents from other repositories

codebase-analyzer next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
codebase-analyzershinpr/claude-code-workflowsAgent725yesterdayMITA45Claude Code
backend-architectYassinello/claude-plugin-prd-workflowAgent131y agoMITA13Claude Code
full-stack-orchestratorYassinello/claude-plugin-prd-workflowAgent131y agoMITA16Claude Code
incident-coordinatorYassinello/claude-plugin-prd-workflowAgent131y agoMITA11Claude Code
performance-analystYassinello/claude-plugin-prd-workflowAgent131y agoMITA11Claude Code
test-automatorYassinello/claude-plugin-prd-workflowAgent131y agoMITA13Claude Code
code-review-orchestratorYassinello/claude-plugin-prd-workflowAgent131y agoMITA15Claude Code