codebase-audit
Skill2 starsChanged 5 months agoMITView on GitHub
Produce a rated, prioritized, written audit of an existing codebase and save it to a *_AUDIT.md file. Use when the user asks to "audit", "review the codebase for", "find smells / complexity / issues", or "assess quality / security / test coverage / performance" of a whole project — NOT a single diff or PR (use a diff-level review skill for that). Takes a LENS argument: complexity | architecture | quality | security | testing | performance | a11y (default: ask). Read-only on source: it catalogs, rates, and plans in the report — it never edits source. Each run writes a fresh report from scratch, overwriting any prior audit of the same lens.
28 other projects use a version of this.
Adopted by
Most recently taken up by
- lothlorienblade/agent-skillstheir own version, first seen Nov 8, 2026
- TidalPaladin/skillstheir own version, first seen Nov 8, 2026
- kekzl/imptheir own version, first seen Nov 7, 2026
- velonx/agent-skillstheir own version, first seen Nov 1, 2026
- TencentCloudBase/CloudBase-AI-Toolkittheir own version, first seen Oct 30, 2026
- frostney/pascal-mcp-sdktheir own version, first seen Oct 21, 2026
Used with
Projects with it also use cloud-api-recipe-authoring, codebuddy-ide-mcp-upgrade and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
TencentCloudBaseSkillcloud-api-recipe-authoring
Author or revise a cloud-api-operations recipe (config/source/skills/cloud-api-operations/references/recipes/). Encodes why the long tail of control-plane capabilities is deliberately NOT wrapped as MCP/CLI tools, the API-first admission test for whether a capability deserves a recipe, the negative and positive lists, the fixed recipe structure, the writing rules distilled from writing-for-agents, the user-facing copy red lines, and the product regeneration/verification pipeline. Also routes contributors (and their agents) to the contribution flow and the pre-PR self-test protocol in references/contributing.md. Use when adding a recipe, judging whether a scenario belongs in the recipe set, updating the recipes index, re-checking existing recipes against the admission test, or onboarding someone who wants to submit one.
Also in 3 projects that use this
TencentCloudBaseSkillcodebuddy-ide-mcp-upgrade
升级 CodeBuddy IDE(genie 扩展)内置的 CloudBase MCP,以及 MCP 发版时同步 IDE 侧白名单。当用户提到「更新 IDE 里的 MCP」「内置 MCP 版本太老」「IDE 集成的 CloudBase 功能不足」「改工具白名单 toolWhiteList」「把新 bundle 打进 CodeBuddy」「白名单漂移」「MCP 发版要同步什么」时使用。覆盖:解包定位内置 bundle 与内嵌配置、重新构建 mcp bundle、生成新的工具白名单与系统提示词、安全注入 IDE 并备份、用 MCP 协议验证工具清单、人工端到端验收、一键回滚。
Also in 3 projects that use this
frostneySkillnative-nostalgia-stack
Applies the user's FreePascal toolchain and its build, formatting, hook, and test contracts while leaving project-specific mechanics local. Use when scaffolding or working in a FreePascal project that follows this toolchain.
Also in 3 projects that use this
frostneySkillsoftware-engineering-excellence
Applies the user's engineering standards during substantial technical work: preserve scope, use current evidence, delegate independent parts, and complete authorized outcomes. Use during substantial implementation, debugging, refactoring, or multi-part delivery work.
Also in 3 projects that use this
withpiperSkillroadmap-review
Audit roadmap health — issues, dependency order, spec coverage, doc freshness. Use when speccing a new initiative. Use when /phase-plan output looks suspicious. Use before /roadmap-create reruns.
Also in 3 projects that use this
zaxbysauceSkillpr-review-fix
Codex adapter for addressing pull request review feedback in opencode-swarm. Use when the user asks to fix PR review comments, requested changes, reviewer findings, CI-review notes, or a pasted review summary with low false-positive tolerance.
Also in 3 projects that use this
- +6 more from TencentCloudBase
Other versions28 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 28
- TencentCloudBase/CloudBase-AI-ToolKit★ 1.2ksame name
- TencentCloudBase/CloudBase-MCP★ 1.2ksame name
- TencentCloudBase/CloudBase-AI-Toolkit★ 1.2ksame name
- kekzl/imp★ 77same name
- mhylle/claude-skills-collection★ 20same name
- myatminlu/vector-skills★ 18same name
- sohei56/maul-team★ 17same name
- GoldenWing-360/claude-security-skills★ 16same name
- rommelporras/kiro-config★ 13same name
- frostney/pascal-mcp-sdk★ 2same name
18 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository2 other files it gives its agents.
- npm-supply-chain-auditSkill
- pr-review-responseSkill
The file
We split this skill into the rules it gives an agent
11 rules. 0 are common, 5 are distinctive, and 6 are very specific to this project.
0
Common
Most of the 28 edited versions we read keep these.
5
Distinctive
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 30
If the user didn't say, ask which lens (see Lens Packs below).
- Very specific: line 32
Create the docs/ directory if it does not exist.
- Very specific: line 45
Read the project's manifest / build config (package.json, pyproject.toml/requirements.txt, go.mod, pom.xml/build.gradle, Cargo.toml, …
- Distinctive: line 57
Run the project's own analyzers first: Before (or alongside) reading code, run whatever static analysis the stack already has and fold the …
- Very specific: line 70
Catalog: Every finding needs: a file:line, a quoted snippet or precise description, and _why it matters_ (the failure it invites), not just …
- Distinctive: line 72
Rate: Use the lens's rating vocabulary (below), consistently.
- Distinctive: line 109
Keep it scannable: a reader should get the whole picture from the rubric + table, then drill into findings.
- Distinctive: line 123
Add a _Recurrence_ column.
- Distinctive: line 175
Read-only on source: Read-only analysis is fine — running linters, type-checkers, security scanners, dependency/coverage tools, and git …
- Very specific: line 181
Evidence over assertion: Every finding cites file:line.
- Very specific: line 186
Always start fresh: Never read or carry over a prior docs/*_AUDIT.md.
“Common” is measured: kept by at least 6 in 10 of the 28 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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
- 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.
- Check for context docs FIRST. Glob
*.mdforAGENTS.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 priordocs/*_AUDIT.md— do not read it or treat it as a baseline. This run produces a brand-new audit; if adocs/<LENS>_AUDIT.mdalready exists it is overwritten wholesale. - 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. - Fan out. Launch ≤3
Exploreagents IN PARALLEL (one message), each scoped to a slice of the lens's dimensions (see packs). Tell each: read files in full, quote code, givefile:linereferences, 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 targetedgrepyourself in parallel — and sanity-check counts (a greedy regex inflates them; verify suspicious numbers with a tighter pattern). - 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. - Rate. Use the lens's rating vocabulary (below), consistently. Higher = worse.
- Prioritize. Sort into a summary table by impact × recurrence. Recurrence matters: a small smell repeated ×5 outranks a medium one-off.
- 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.
- Plan the order. Sequence the proposals as independently shippable, behavior-preserving steps — easiest/highest-leverage first; note dependencies between them.
- 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).
Report skeleton (write this to docs/<LENS>_AUDIT.md)
# <Lens> Audit
**Date / Scope / Method** (one line each)
> Cross-references: which existing docs this complements and does NOT duplicate.
> Scope & confidence: what was examined in full vs. sampled vs. not looked at, which analyzers
> ran, and a false-positive caveat. Don't imply coverage you didn't achieve.
## Metrics baseline (coverage %, source LOC, dep count, lens signal counts)
## How to read the ratings (the rubric — define every scale explicitly)
## Summary table (sorted by priority; columns vary by lens)
## Findings (grouped by priority/severity)
### <ID> — <title> file:line
Smell · Why it matters · Proposal · Steps · Effort/Rating
## What's genuinely good (verified strengths — keep the report honest & balanced)
## Suggested execution order (numbered, shippable, dependency-aware)
## Verification (commands + manual/visual + lens-specific repro)Keep it scannable: a reader should get the whole picture from the rubric + table, then drill into findings. Use IDs (H1, P0-1, …) so findings are referenceable from PRs.
Lens Packs
Each pack = the dimensions to scan + the rating vocabulary to use.
complexity / simplification
Dimensions: duplication (copy-pasted state machines, mock/real twins, mobile/desktop twins), god-functions/components, deep nesting, derived-state-stored-in-state, prop drilling, parallel lists that must stay in sync, magic numbers/strings, dead code, hidden contracts. Rating: two axes, 1–5 each, higher = worse — Complexity (structural / effort to untangle) and Cognitive load (cost to a reader). Add a Recurrence column. Priority = blend, weighted by recurrence.
architecture
Zooms out from complexity (which is in-the-small) to structure-in-the-large. Dimensions:
module/package boundaries & separation of concerns, dependency direction (layering violations,
domain importing infrastructure, circular dependencies), coupling & cohesion, god-modules/packages,
public API surface & leaky abstractions, dependency-graph health (fan-in/fan-out hotspots), and
drift from any stated architecture (ARCHITECTURE.md, ADRs). Use a dependency tool where one fits
the stack to ground findings — madge --circular / dependency-cruiser (JS/TS), import-linter
(Python), go mod graph / go list, jdeps (JVM) — and cite its output as evidence.
Rating: boundary-violation severity (High/Med/Low) × blast radius (how many modules/files
depend on the offender). Lead with a one-line description of the intended architecture vs. reality.
quality
Dimensions: type safety (untyped escapes / casts / suppressions, strictness), error handling & resilience (swallowed errors, missing recovery boundaries, uniform failure handling), testing (coverage gate, edge/failure paths), security & data hygiene (committed fixtures/PII, secret/token exposure, input validation, dev-only paths that break in prod), accessibility where there's a UI (lint enforcement + runtime focus), tooling & CI, dependency health, consistency, documentation. Rating: a per-dimension scorecard (A–F) + per-finding severity (🔴 High / 🟠 Medium / 🟡 Low) with an Effort (S/M/L). Lead with an overall grade and a one-line verdict.
security
Delegate the structured analysis to the access-control-analysis and stride skills if
present; this skill frames the scope and writes them up. Dimensions: trust boundaries,
authn/authz checkpoints, secret handling, input validation, dependency CVEs, dev/prod config
drift. Rating: severity (Critical/High/Medium/Low) + likelihood.
testing
Delegate to test-strategy if present. Dimensions: what's tested vs. what's risky-and-untested,
coverage gate, happy-path bias, flaky/over-mocked tests, missing failure-path & edge tests.
Rating: per-area risk (High/Med/Low) × current coverage (None/Thin/Good).
performance
Dimensions: O(n·m) loops, repeated work that could be cached/memoized, N+1 queries &
over-fetching, missing pagination/batching, missing DB indexes, blocking/serial I/O that could be
concurrent, connection/resource pooling, and (for UI) bundle/image weight & render thrash.
Rating: impact (1–5) × likelihood-of-hot-path (1–5).
a11y
Cross-reference any DESIGN.md WCAG section. Dimensions: lint enforcement (jsx-a11y etc.),
focus management on dismiss/close, alt/aria/roles, contrast, keyboard nav. Rating: WCAG
level (A/AA/AAA) + severity.
Hard rules
- Read-only on source. Read-only analysis is fine — running linters, type-checkers, security
scanners, dependency/coverage tools, and
githistory queries (step 3) is expected. But never mutate: no--fix/autoformat, no edits to source, no installs that change lockfiles, no commits. The only file you write is thedocs/*_AUDIT.mdreport. A prior audit of the same lens is simply overwritten — git history preserves the old version, so no backup is needed. End by offering to implement fixes as a separate, explicit step. - Evidence over assertion. Every finding cites
file:line. Don't claim a bug you haven't located in the code. - Be honest both ways. Include a "what's genuinely good" section; don't manufacture findings to pad the report, and don't soften a real one.
- Don't repeat existing docs. Cross-reference them.
- Always start fresh. Never read or carry over a prior
docs/*_AUDIT.md. Write the report from scratch each run, overwriting any existingdocs/<LENS>_AUDIT.md.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

