audit-codebase

A codebase health check that reviews a project across seven areas, such as secrets, tests, and other engineering practices. It gives each area a score and lists specific findings.

In plain words
What is it for?
Use it to review an entire project, or selected areas, before maintenance, security work, or a major release.
Why use it?
It helps you find weaknesses that may be easy to miss when reviewing files one by one. A prioritized plan shows what to improve first.

Command

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 commands/florianbruniaux/claude-code-plugins/audit-codebase
Clone the repo
git clone --depth 1 https://github.com/FlorianBruniaux/claude-code-plugins
Per session 15 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,894 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 3 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.00015 $0.03894
Opus 5 $0.00008 $0.01947
Sonnet 5 $0.00003 $0.00779
Haiku 4.5 $0.00002 $0.00389

Measured 2d ago against content hash 4f55df291f28, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade B, and why

audit-codebase scanned grade B with 3 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.

Reads agent configuration directorieslowAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

HOOKS_CFG=$(grep -c "hooks" .claude/settings.json 2>/dev/null || echo "0")

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

Enumerates other installed skillslowAgent snooping

Other skills' SKILL.md files reveal prompts, capabilities and secrets that should be invisible to peers.

SKILLS=$(find .claude/skills -name "*.md" 2>/dev/null | wc -l)

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

grep -rn -E '\b(eval|exec|execSync|Function\(|setTimeout\([^,]*[+`]|setInterval\([^,]*[+`])' \
plugins/ai-methodology/commands/audit-codebase.md · 342 lines

How it starts

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

Codebase Health Audit

Score your codebase across 7 health categories, identify weak spots, and get a prioritized progression plan. Each category is scored 1-10 with specific, actionable findings.

Time: 3-8 minutes depending on codebase size | Scope: Full project

Instructions

You are a senior engineering consultant performing a codebase health assessment. Analyze the project across all 7 categories (or a subset if $ARGUMENTS specifies categories), score each one, and produce a progression plan.

If $ARGUMENTS contains category names (e.g., "secrets security tests"), only audit those categories. Otherwise, audit all 7.


Category 1: Secrets (Weight: 15%)

Scan for hardcoded credentials, API keys, and sensitive data in code.

# API keys and tokens in code
grep -rn --include="*.{js,ts,py,go,java,rb,php,yaml,yml,json,toml,env,cfg,ini,conf}" \
  -E '(?i)(api[_-]?key|apikey|secret[_-]?key|password|passwd|token|bearer)\s*[=:]\s*["'\''"][^"'\'']{8,}' \
  --exclude-dir={node_modules,vendor,.git,dist,build,target,__pycache__,.venv} . 2>/dev/null | head -20

# Known provider patterns
grep -rn -E 'sk-[a-zA-Z0-9]{20,}|ghp_[a-zA-Z0-9]{36}|AKIA[A-Z0-9]{16}|xox[bps]-[a-zA-Z0-9\-]{20,}' \
  --exclude-dir={node_modules,vendor,.git,dist,build,target} . 2>/dev/null | head -10

# .env files committed
find . -name ".env*" -not -name ".env.example" -not -path "*/node_modules/*" -not -path "*/.git/*" -type f 2>/dev/null

# .gitignore coverage
[ -f ".gitignore" ] && {
  for pattern in ".env" "*.pem" "*.key" "*.p12"; do
    grep -q "$pattern" .gitignore 2>/dev/null && echo "OK: $pattern in .gitignore" || echo "MISSING: $pattern not in .gitignore"
  done
}

Scoring:

  • 10: Zero secrets, .gitignore covers all sensitive patterns, .env.example exists
  • 7-9: No secrets in code, minor .gitignore gaps
  • 4-6: 1-3 potential secrets found (may be false positives), or .env committed
  • 1-3: Multiple secrets in code, private keys committed, no .gitignore protection

Read the full file on GitHub · 342 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 First seen · 342 lines · 15 tokens per session scan B 4f55df291f28

Subscribe to this mod's changes

audit-codebase is a command published in the GitHub repository FlorianBruniaux/claude-code-plugins (40 stars, last pushed 2mo ago), licensed MIT. It adds 15 tokens to every session and 3,894 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it B with 3 findings (reads agent configuration directories, enumerates other installed skills, runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.