Free and open source — MIT licensed. Built to be auditable.
Your codebase has rules your AI agent doesn't know. Install one skill — it enforces them on every edit it makes.
Two commands to install everywhere:
npm install -g code-auditor-mcpcode-audit install --agent allClaude Code, Cursor, Codex, Gemini CLI, and any SKILL.md agent. Blocking hooks on Claude Code and Codex; MCP reporting everywhere. code-audit install --list shows the matrix.
Audit the whole codebase to clean up your code, and let your agent keep it clean on every edit. Either way, the analysis is deterministic.
code-audit auditRun it against any TypeScript, JavaScript, Go, or CSS/SCSS project and get a complete, structured report of everything that's wrong. Fix the real problems, baseline the rest, and start from a clean slate.
Tree-sitter and ast-grep do the analysis — findings are identical every run, with any model or with none at all.
HTML · JSON · CSV · SARIF 2.1.0File, line, severity, rule id, and a message for every finding. Baseline the known issues as debt and only the new ones stand out.
code-audit changed --fail-on criticalOnce installed, your agent audits only the files it just touched. Critical violations are caught and fixed before they reach the repo — without re-reading the whole codebase, so model costs stay low.
code-audit install --agent claudeDrops a SKILL.md plus a PostToolUse hook into your agent — Claude Code and Codex.
code-audit changed --fail-on criticalOnly the files that changed, not the whole project. The hook fires after every Write and Edit.
no-lodash · critical · src/utils/format.ts:3The agent reads the rule id, severity, file, line, and message — fixes it — and only passing code reaches your repo.
TypeScript, JavaScript, Go, and CSS/SCSS — parsed with tree-sitter and ast-grep grammars.
Thirteen analyzers across TypeScript, JavaScript, Go, and CSS/SCSS — the bugs your agent introduces and your review misses.
`SELECT * FROM users WHERE id = ${id}`String-built queries. The data-access analyzer flags injection, tenant leaks, and N+1s before they reach review.
SELECT * FROM orders // no org filterA multi-tenant query missing WHERE org_id = ?. One customer's data, another customer's screen.
import _ from "lodash"You banned lodash. The agent imports it anyway. It finds out in the edit, not the PR.
a.ts → b.ts → a.tsBroken tree-shaking and undefined at import time, caught before it ships.
The five principles, enforced mechanically.
Copy-paste, caught before it's debt.
SQL injection, tenant leaks, N+1s.
Undocumented exports are future bugs.
The mistakes that survive review.
Queries referencing columns that don't exist.
Your team's rules, enforced as hard invariants.
When schema and code disagree.
Endpoints, fields, auth vs the contract.
Cycles, coupling, hubs, orphans.
Token drift, z-index sprawl.
Mines your code's conventions, flags deviations.
What's visible only across boundaries.
Your agent runs code-audit changed on the files it just touched, not the whole project. Each analyzer returns structured violations — file, line, severity, rule id, and a message the agent can read and fix.