codebase-audit

codebase-audit is a skill for Claude Code, Codex from NitorCreations/nitor-agent-skills. It costs 153 tokens per session (2,895 once invoked), scanned A, original, MIT.

A read-only codebase review that produces a written audit with evidence, ratings, priorities, suggested fixes, and a verification plan. A codebase is the full collection of files that make up a software project.

In plain words
What is it for?
Use it to assess a project for complexity, quality, security, test coverage, or performance, with findings saved in an audit document.
Why use it?
It gives you a consistent way to find and document issues across an entire project without changing the code. The report helps decide what to address first.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions CLAUDE.md; mentions AGENTS.md.

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 skills/nitorcreations/nitor-agent-skills/codebase-audit
Any agent
npx skills add NitorCreations/nitor-agent-skills --skill codebase-audit
Clone the repo
git clone --depth 1 https://github.com/NitorCreations/nitor-agent-skills

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/nitorcreations/nitor-agent-skills/codebase-audit.svg)](https://agentmods.dev/skills/nitorcreations/nitor-agent-skills/codebase-audit)
Your own site
<a href="https://agentmods.dev/skills/nitorcreations/nitor-agent-skills/codebase-audit"><img src="https://agentmods.dev/badge/skills/nitorcreations/nitor-agent-skills/codebase-audit.svg" alt="Measured on agentmods" height="20"></a>
Per session 153 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,895 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.1 $0.00153 $0.02895
Opus 5 $0.00077 $0.01448
Sonnet 5 $0.00031 $0.00579
Haiku 4.5 $0.00015 $0.00290

Measured 5d ago against content hash fcb0cd35fd83, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, 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 5d 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.

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

How it starts

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

Codebase Audit

A read-only harness that turns "audit this project" into a consistent, scannable *_AUDIT.md report: findings with file:line evidence, a rating, a one-line fix, a prioritized execution order, and a verification plan. Every run starts fresh and rewrites the report from scratch — it does not read, reuse, or carry over a previous audit.

When to use / not use

  • Use for whole-project assessment that produces a document: "audit the codebase", "find complexity / smells", "quality audit", "where are the security gaps".
  • Don't use for a single diff/PR (use a diff-level review skill/command if your setup has one) or to apply fixes. This skill writes a report and stops — it ends by offering to fix, never by fixing.

Step 0 — Pick the lens

If the user didn't say, ask which lens (see Lens Packs below). One report = one lens. Name the output docs/COMPLEXITY_AUDIT.md, docs/QUALITY_AUDIT.md, docs/SECURITY_AUDIT.md, etc. Create the docs/ directory if it does not exist.

The method

  1. Survey. Get the shape before diving in — adapt commands to the project's language(s):
    • git ls-files | grep -vE 'node_modules|vendor|dist|build|\.venv' for the tree.
    • Line counts of source, sorted desc. Match the project's source extensions (ts|tsx|js|py|go|rb|java|kt|cs|rs|php|...): git ls-files | grep -E '\.(ts|tsx|js|py|go|...)$' | grep -vE 'node_modules|vendor|test|spec|stories' | xargs wc -l | sort -rn | head -40
    • Rank hotspots by churn × size, not size alone — the riskiest files are the big ones that also change the most. Get churn from history and prefer files high on both lists: git log --format= --name-only --since='12 months ago' | grep -E '\.(ts|tsx|js|py|go|...)$' | sort | uniq -c | sort -rn | head -40. Point the fan-out (step 4) at that intersection first.
    • Read the project's manifest / build config (package.json, pyproject.toml/requirements.txt, go.mod, pom.xml/build.gradle, Cargo.toml, *.csproj, …), type/lint/format config, and CI workflows. Identify the stack first; everything below adapts to it.
    • Capture a metrics baseline (see report skeleton): test-coverage % if the tool reports it, total source LOC, dependency count, and the lens's key signal count (e.g. type suppressions). Captured consistently each run, these numbers let a reader compare report versions in git for a measurable delta, not just prose — without this run needing to read the prior audit.
  2. Check for context docs FIRST. Glob *.md for AGENTS.md, CLAUDE.md, DESIGN.md, ARCHITECTURE.md. Read them. Cross-reference, never duplicate — if an item is already tracked there, point at it instead of re-listing it. State this in the report's intro. Ignore any prior docs/*_AUDIT.md — do not read it or treat it as a baseline. This run produces a brand-new audit; if a docs/<LENS>_AUDIT.md already exists it is overwritten wholesale.
  3. Run the project's own analyzers first. Before (or alongside) reading code, run whatever static analysis the stack already has and fold the real output into findings — a tool hit is reproducible signal, stronger than model judgment. Use what's installed: eslint, tsc --noEmit, ruff/mypy, gosec/govulncheck, semgrep, bandit, cargo clippy, npm audit/pip-audit, the project's coverage runner, etc. Don't install heavyweight tools or fail the audit if none exist — note their absence as a finding (missing CI gate). Cite analyzer output as evidence like any other finding, and de-dupe it against what the agents find.
  4. Fan out. Launch ≤3 Explore agents IN PARALLEL (one message), each scoped to a slice of the lens's dimensions (see packs). Tell each: read files in full, quote code, give file:line references, do NOT propose fixes — just catalog. For signal-counting (type suppressions, casts, debug prints, TODO/FIXME, swallowed errors — pick patterns that fit the project's language) run targeted grep yourself in parallel — and sanity-check counts (a greedy regex inflates them; verify suspicious numbers with a tighter pattern).
  5. Catalog. Every finding needs: a file:line, a quoted snippet or precise description, and why it matters (the failure it invites), not just what it is.
  6. Rate. Use the lens's rating vocabulary (below), consistently. Higher = worse.
  7. Prioritize. Sort into a summary table by impact × recurrence. Recurrence matters: a small smell repeated ×5 outranks a medium one-off.
  8. Propose. One refined proposal per finding (or per cluster of identical findings), with concrete step-by-step fix instructions that reuse existing utilities where they exist.
  9. Plan the order. Sequence the proposals as independently shippable, behavior-preserving steps — easiest/highest-leverage first; note dependencies between them.
  10. Verify. A section describing how to prove no regression: the project's test/lint/build commands, any visual/manual checks the stack supports (e.g. Storybook or visual diffs for UI), and any lens-specific reproduction (e.g. for a prod-only bug, how to reproduce it locally).

Read the full file on GitHub · 188 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. 5d ago First seen · 188 lines · 153 tokens per session scan A fcb0cd35fd83

Subscribe to this mod's changes

codebase-audit is a skill published in the GitHub repository NitorCreations/nitor-agent-skills (2 stars, last pushed 23d ago), licensed MIT. It adds 153 tokens to every session and 2,895 once invoked, about $0.0008 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.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

local-ai-agents

Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…

microsoft/ai-agents-for-beginners · 200 tokens

chronicle

Analyze Copilot session history for standup reports, usage tips, session search, and session reindexing. Use when the user asks for a standup, daily summary, usage tips, workflow recommendations, wants to search or find past sessions by keyword/file/PR, wants to reindex their session store, or asks about deleting…

microsoft/vscode · 72 tokens

chat-pet-sprite-creation

Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.

microsoft/vscode · 53 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens