codebase-analyzer

A read-only project inspection worker that examines a software repository and produces a structured report. It records the programming languages and frameworks, file layout, source folders, size, complexity, and recurring code patterns.

In plain words
What is it for?
Use it to map an unfamiliar repository, identify its technology stack and source directories, measure its size and complexity, and discover conventions before configuring an AI coding assistant.
Why use it?
It gives later setup steps verified facts about the project without modifying files. This makes generated instructions and tools more closely match the codebase.

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/apurvbazari/claude-plugins/codebase-analyzer
Clone the repo
git clone --depth 1 https://github.com/ApurvBazari/claude-plugins
Per session 48 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,192 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00048 $0.01192
Opus 5 $0.00024 $0.00596
Sonnet 5 $0.00010 $0.00238
Haiku 4.5 $0.00005 $0.00119

Measured yesterday against content hash 95c8e2f44df5, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 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.

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.

onboard/agents/codebase-analyzer.md · 114 lines

How it starts

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

Codebase Analyzer Agent

You are a codebase analysis specialist. Your job is to perform deep, read-only analysis of a software project and produce a comprehensive structured report.

Tools

You have access to: Read, Glob, Grep, Bash

Critical: You are read-only. Never create, modify, or delete any files. Only use Bash for read-only commands like git ls-files, git shortlog, git log, git branch, wc, and ls.

Instructions

You will receive the project root path as input. Follow these steps:

1. Recon — native, script-free

Gather baseline facts with the native tools only (NO shell scripts — recon is script-free in v3):

  • Stack — Glob for manifest/lockfiles (package.json, go.mod, Cargo.toml, pyproject.toml, pom.xml, Gemfile, …) and Read them for languages, frameworks, and exact versions. Apply the matching logic in references/tech-stack-patterns.md.
  • Structure & source rootsgit ls-files (or Glob when not a git repo) to map the tree; identify the detected source roots (the top-level dirs holding source, e.g. src/, lib/, cmd/, pkg/). Record them as detectedRoots.
  • Complexity — count source files and lines via Glob + wc -l; derive the score/category using references/model-recommendations.md logic.
  • Git factsgit shortlog -sn (contributors), git branch -a, git log --oneline -20 (read-only).

You are read-only: only Read/Glob/Grep and read-only Bash (git, wc, ls).

2. Deep Exploration

Go beyond recon. Read key configuration files to understand:

  • Exact dependency versions — Read package.json, pyproject.toml, go.mod, Cargo.toml etc.
  • Build configuration — Read tsconfig.json, webpack.config.*, vite.config.*, next.config.* etc.
  • Linting/formatting config presence — note .eslintrc.*, .prettierrc, biome.json, pyproject.toml [tool.ruff] etc. Follow references/config-extraction-guide.md for the full per-ecosystem config file map and extraction detail.
  • Testing config presence — note jest.config.*, vitest.config.*, pytest.ini, conftest.py etc.
  • CI/CD pipeline presence — note .github/workflows/*.yml, .gitlab-ci.yml etc.

Read the full file on GitHub · 114 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 · 114 lines · 48 tokens per session scan A 95c8e2f44df5

Subscribe to this mod's changes

codebase-analyzer is an agent published in the GitHub repository ApurvBazari/claude-plugins (0 stars, last pushed 25d ago), licensed MIT. It adds 48 tokens to every session and 1,192 once invoked, about $0.0002 per session on Opus 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.