codebase-audit

codebase-audit is a skill for Claude Code, Codex from majiayu000/spellbook. It costs 176 tokens per session (2,550 once invoked), scanned A, original, MIT.

A read-only method for auditing an entire codebase across contracts, data integrity, errors, security, architecture, technical debt, configuration, and caching. It produces prioritized findings and a repair roadmap.

In plain words
What is it for?
Use it for a full codebase health check, design review, architecture analysis, hidden-bug search, or a quick audit of a project.
Why use it?
It helps reveal problems that cross file or subsystem boundaries, while requiring serious findings to be checked before reporting them. It also compares results with earlier audits when available.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions subagents.

Good fit Use it for a full codebase health check, design review, architecture analysis, hidden-bug search, or a quick audit of a project.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/majiayu000/spellbook/codebase-audit
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.

Any agent
npx skills add majiayu000/spellbook --skill codebase-audit
Clone the repo
git clone --depth 1 https://github.com/majiayu000/spellbook

Made for: Claude Code, Codex.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/majiayu000/spellbook/codebase-audit"><img src="https://agentmods.dev/badge/skills/majiayu000/spellbook/codebase-audit.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 176 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,550 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00176 $0.02550
Opus 5.5 $0.00070 $0.01020
Sonnet 5.5 $0.00035 $0.00510
Haiku 4.5 $0.00018 $0.00255

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

Security

Grade A, and why

codebase-audit 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 12d ago.

The scan reads SKILL.md. This mod also ships 9 executable files (evals/fixture/app/__init__.py, evals/fixture/app/config.py, evals/fixture/app/handlers.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

skills/codebase-audit/SKILL.md · 151 lines

How it starts

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

Codebase Audit — Adaptive Deep Analysis

Comprehensive codebase audit that adapts its agent configuration to the project's tech stack, forces structured findings, adversarially verifies Critical/High findings before they enter the report, diffs against the previous audit's ledger (resolved / still-open / new), and outputs a severity-sorted report plus a phased repair roadmap.

Core Principles

  1. READ-ONLY — Audit agents must never create, modify, or delete files in the target. Every agent prompt starts with the read-only preamble in references/agent-prompts.md.
  2. Inherit the session model — Omit the model param on all agents so they inherit the session model (usually the strongest available). Only override upward if the session model is clearly weak for cross-file reasoning. Never hardcode a specific model name in this skill.
  3. Depth over breadth — Fewer agents with broader merged scopes beat many shallow agents. Each agent traces issues across file boundaries.
  4. Adaptive — Agent count and dimensions vary by stack and mode.
  5. Verified findings — Critical/High findings must survive an adversarial verify pass. Medium findings pass through but are labeled unverified in the report.

Operating Contract

  • Direct actions: read-only inspection, local dependency audits, report writing under the target, and ledger updates under <target>/.audit/ after the user invokes this skill.
  • Escalate before: editing audited project source files, dependency manifests, .gitignore, CI config, remote issues, PR state, or anything outside the requested audit/report scope.
  • Secret evidence: retain file:line and the surrounding code, but replace credential values with [REDACTED] in findings, reports, and ledger entries; never reproduce the literal. This redacted snippet satisfies the code-evidence requirement.
  • Evidence-backed pushback: challenge "all clear" or "resolved" only with file evidence, dependency-audit output, verifier results, or ledger spot-checks.
  • Feedback loop: promote repeated misses into prompt updates, ledger matching rules, or fixture eval cases rather than leaving them as session-only notes.

Read the full file on GitHub · 151 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. 12d ago Changed · +1 lines 77bbe19ddedd
  2. 1mo ago First seen · 150 lines · 176 tokens per session scan A f7113c99023c

Subscribe to this mod's changes

codebase-audit is a skill published in the GitHub repository majiayu000/spellbook (288 stars, last pushed yesterday), licensed MIT. It adds 176 tokens to every session and 2,550 once invoked, about $0.0007 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

Other skills, from other repositories

ai-development-guide

Applies language-agnostic and backend technical decision criteria, anti-pattern detection, debugging, and quality gates. Use when reviewing general/backend implementation choices, code smells, failures, or implementation completeness.

shinpr/claude-code-workflows · 43 tokens

workflow

A workflow skill for embedded-device projects that plans and runs building, flashing, debugging, observing, and diagnosis tasks.

zhinkgit/embeddedskills · 88 tokens

cheese

Route an idea, path, pull request, issue, failure, question, or bare /cheese to the correct workflow skill. Use this skill for /cheese, routing requests, help requests, or opening messages without a named workflow skill.

paulnsorensen/easy-cheese · 53 tokens

x-bug2rag

A knowledge-capture tool that turns reusable bug explanations into a local RAG collection, meaning a searchable store of text that an agent can retrieve later. It records the trigger, incorrect implementation, correct implementation, and observable difference.

KtKID/x-dev-pipeline · 255 tokens

x-cr

A software-correctness investigation skill for finding why code behaves differently from what was expected. It uses evidence from code paths, specifications, tests, logs, and changes to assess possible causes.

KtKID/x-dev-pipeline · 183 tokens

x-fix

A bug-fixing skill with separate paths for directly reported bugs, correctness-review findings, and failed verification or quality-gate reports. It records completed fixes and their validation in project reports.

KtKID/x-dev-pipeline · 181 tokens