bf-codebase-analyst

bf-codebase-analyst is an agent for Claude Code from chan4lk/specclaw. It costs 29 tokens per session (1,131 once invoked), scanned A, original, MIT.

An analysis agent that examines an existing codebase and writes a grounded report about its technologies, dependencies, architecture, subject area, risks, and possible first changes. It reads project files rather than relying only on directory names or configuration summaries.

In plain words
What is it for?
Use it at the start of work on an existing repository to create a codebase report. It is useful for understanding the technology stack, layout, dependencies, tests, and areas of risk.
Why use it?
It gives a new team member a structured view of an unfamiliar or older codebase. Requiring findings to be supported by the actual files helps avoid assumptions about how the project works.

Agent for Claude Code

Written for Claude Code: $CLAUDE_PLUGIN_ROOT variable. Also seen: model in frontmatter; mentions subagents.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the specclaw-bf plugin — 15 skills, 14 agents shipped together

Good fit Use it at the start of work on an existing repository to create a codebase report. It is useful for understanding the technology stack, layout, dependencies, tests, and areas of risk.

Compare 6 agents from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add chan4lk/specclaw
Claude Code
/plugin install specclaw-bf

Made for: Claude Code.

Or install specclaw-bf, the plugin that ships this one along with the rest of its 15 skills, 14 agents.

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 bf-codebase-analyst

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

Your own site · 80×15
<a href="https://agentmods.dev/agents/chan4lk/specclaw/bf-codebase-analyst"><img src="https://agentmods.dev/badge/agents/chan4lk/specclaw/bf-codebase-analyst.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 29 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,131 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.00029 $0.01131
Opus 5.5 $0.00012 $0.00452
Sonnet 5.5 $0.00006 $0.00226
Haiku 4.5 $0.00003 $0.00113

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

Security

Grade A, and why

bf-codebase-analyst 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 4d 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.

plugins/specclaw-bf/agents/bf-codebase-analyst.md · 81 lines

How it starts

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

Identity

You are bf-codebase-analyst, a specclaw subagent. You analyze an existing codebase and produce a structured .specclaw/analysis/codebase-report.md.

Inputs

You will be invoked with these context blocks in your prompt:

  • Collected facts (JSON) — a file path (.specclaw/analysis/.collect/analyze.json) you read yourself with your Read tool, not inline JSON in the prompt — the output of specclaw-bf-analyze-codebase collect: a repo-relative file enumeration, a top-two-level directory summary, detected manifests (path, ecosystem type, raw content, a dependency-name list, and a version signal where one was cheaply available), LOC totals per file extension, detected test-location directories, and a discovered_docs digest (project documentation auto-discovered by specclaw-discover-context).
  • Target path — the path (repository root or a subdirectory) that was analyzed.

Before producing any findings, read the report scaffold at $CLAUDE_PLUGIN_ROOT/templates/codebase-report.md. Use this as the structural template; do not invent new sections.

The collected JSON payload is a starting map — file paths, manifest contents, raw facts — not a substitute for reading real files. Before asserting anything about architecture, domain, or risk, use your own Read tool to open the files that matter: manifests you want full context on, suspected entry points, README/doc files, and files whose names suggest domain entities.

Rubric

Analyze across these six dimensions. For each, produce zero or more findings.

# Dimension What to check / produce
1 Tech Stack Languages, frameworks, and runtimes evident from detected manifests, LOC-by-extension, and entry-point files you opened. Distinguish the primary stack from incidental/generated files. If no manifests were detected, say so explicitly rather than guessing a stack.
2 Dependencies Key dependencies (and version signals, where present) from each detected manifest's dependency list. Only characterize a dependency's role or age if you opened the manifest yourself and can quote it.
3 Architecture Module/directory structure inferred from the top-level directory summary and file tree, confirmed by opening a representative sample of files to check the layout does what the names imply (e.g. does src/services/ actually hold service classes). Maps to the report's "Structure/Architecture" section.
4 Domain What business or problem domain the code serves, inferred from naming, README/doc content, and domain-entity-shaped files you opened directly. Every finding here is an inference — see the Domain Inference Rule below.
5 Risks Tech debt, fragile patterns, missing or thin test coverage (cross-reference test_locations from the collected facts), undocumented or risky-looking code you opened. Maps to the report's "Risks/Tech-Debt" section.
6 Suggested First Changes Concrete, evidence-based entry points for someone starting work in this codebase — e.g. "start with X because Y" — grounded in files you actually opened.

Read the full file on GitHub · 81 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. 4d ago Changed · -42 tokens per session bde65cef9fb3
  2. 26d ago Changed e355a5468737
  3. 1mo ago First seen · 81 lines · 71 tokens per session scan A 0744304714c4

Subscribe to this mod's changes

bf-codebase-analyst is an agent published in the GitHub repository chan4lk/specclaw (13 stars, last pushed today), licensed MIT. It adds 29 tokens to every session and 1,131 once invoked, about $0.0001 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-09-05.

Related

Other agents, from other repositories

alchemist

Creative technologist who sees the browser as an unexplored physics engine. Consult when building UI that needs to feel alive - scroll-driven reveals, morphing transitions, spatial animation systems, anything where the interaction itself IS the product. Thinks in weight, tension, and breath before thinking in code.…

drobins25/craft · 355 tokens

implementer

Use this agent when implementing story chunks, building features from specs, or continuing active story implementation. Owns the implement → validate → refine loop for each chunk. Produces pristine, production-ready code that matches locked patterns and design tokens. Context: Orchestrator is implementing a story and…

drobins25/craft · 292 tokens

style-analyzer

Use this agent after UI implementation or when the user requests design consistency audits. Ensures visual consistency, catches design drift from locked tokens, identifies technical debt in UI code, and guards the integrity of the design language. Context: Multiple UI components were built during the cycle. user…

drobins25/craft · 203 tokens

become-researcher

Psychological material collector for /craft:become. Gathers the raw perceptual material from which an expert's mind can be reconstructed - beliefs, scar tissue, axioms, refusals, and emotional patterns. NOT a fact-finder. The crystallizer agent consumes this output directly. Context: Orchestrator is running…

drobins25/craft · 226 tokens

playwright-browser

Interactive browser automation agent powered by playwright-cli. Owns a live browser session - navigates pages, clicks elements, fills forms, reads accessibility snapshots, and reports findings as concise summaries. Designed for interactive steering via SendMessage - the agent remembers what it has seen and done across…

drobins25/craft · 233 tokens

maze-architect

Route planner for perpendicular PR review. Reads a raw diff with ZERO intent context (no story files, no commit messages, no PR descriptions) and generates 2-4 questions that the code demands answers to. These questions become coordinates for parallel maze-runner review agents. The architect throws the frisbee blind …

drobins25/craft · 157 tokens