codebase-profiler

codebase-profiler is an agent for Claude Code from shenchangmin/cairnkit. It costs 42 tokens per session (238 once invoked), scanned A, original, MIT.

A bounded codebase review that describes a project's architecture, modules, coding conventions, and recurring pitfalls. It writes a structured profile rather than permanent knowledge entries and avoids secret material.

In plain words
What is it for?
Use it to map dependency direction, note naming and testing practices, identify sharp edges, and record which areas were not reviewed.
Why use it?
It gives later documentation work an overview of how the project is organised without searching the entire codebase indefinitely.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the cairnkit plugin — 2 skills, 7 commands, 11 agents shipped together

Good fit Use it to map dependency direction, note naming and testing practices, identify sharp edges, and record which areas were not reviewed.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/shenchangmin/cairnkit/codebase-profiler
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/shenchangmin/cairnkit

Made for: Claude Code.

Or install cairnkit, the plugin that ships this one along with the rest of its 2 skills, 7 commands, 11 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 codebase-profiler

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

Your own site · 80×15
<a href="https://agentmods.dev/agents/shenchangmin/cairnkit/codebase-profiler"><img src="https://agentmods.dev/badge/agents/shenchangmin/cairnkit/codebase-profiler.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 42 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 238 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.00042 $0.00238
Opus 5.5 $0.00017 $0.00095
Sonnet 5.5 $0.00008 $0.00048
Haiku 4.5 $0.00004 $0.00024

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

Security

Grade A, and why

codebase-profiler 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 1mo 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-profiler.md · 23 lines

What it actually says

codebase-profiler

Profile the project within ~60 searches (stop when the budget is spent). Write docs/knowledge-import/02-profile.md:

  • Architecture layers + dependency direction.
  • Conventions actually followed (naming, error handling, testing).
  • Recurring pitfalls / sharp edges.

Secret boundary

Never read or record known secret files such as .env, .env.*, private keys (*.pem, *.key, *.p12, *.pfx), credential stores, token/cookie dumps, or files explicitly marked secret. If a normal source file unexpectedly contains credential-like material, never print or copy the secret value: note only the affected path with a redacted warning and exclude that material from the profile.

Stay within the search budget; note what you did NOT cover. Return a one-line summary.

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. 1mo ago First seen · 23 lines · 42 tokens per session scan A 265feaa95b1f

Subscribe to this mod's changes

codebase-profiler is an agent published in the GitHub repository shenchangmin/cairnkit (1 stars, last pushed 2mo ago), licensed MIT. It adds 42 tokens to every session and 238 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

Other agents, from other repositories

integration-reviewer

Read-only for repo state (no commits, no source edits that survive) fresh-context reviewer for the merged integration diff across all tasks in an orchestration run — running checks may temporarily mutate the working tree, always restored exactly. Invoked at Phase 5 so the coordinator's own degraded peak context never…

choiyounggi/dev-loop · 81 tokens

test-quality-auditor

Read-only for repo state (no commits, no source edits that survive) verifier that audits one task's diff and tests for quality — running the tests (step 4) DOES temporarily mutate the working tree, always restored exactly. Invoked between self-review and done so the session that wrote the code does not grade its own…

choiyounggi/dev-loop · 88 tokens

integration-reviewer-r1

R1/R0 tier copy (one effort step lower, never below high) of the integration-reviewer agent. Read-only for repo state (no commits, no source edits that survive) fresh-context reviewer for the merged integration diff across all tasks in an orchestration run — running checks may temporarily mutate the working tree…

choiyounggi/dev-loop · 106 tokens

task-reviewer-r1

R1/R0 tier copy (one effort step lower, never below high) of the task-reviewer agent. Read-only for repo state (no commits, no source edits that survive) fresh-context reviewer for ONE task's worktree diff in an orchestration run — running checks may temporarily mutate the working tree, always restored exactly.…

choiyounggi/dev-loop · 105 tokens

task-reviewer

Read-only for repo state (no commits, no source edits that survive) fresh-context reviewer for ONE task's worktree diff in an orchestration run — running checks may temporarily mutate the working tree, always restored exactly. Invoked at Phase 4 so the coordinator never reads a per-task diff; writes reviews/ -rN.md…

choiyounggi/dev-loop · 80 tokens

code-pattern-analyzer

Analyze code edit patterns semantically using Claude's understanding. Use this agent to classify edit patterns, detect coding practices, and understand semantic intent across all languages.

h315uk3/symbiosis · 36 tokens