audit

audit is a command for Claude Code from fatihkan/badi. It costs 0 tokens per session (844 once invoked), scanned A, original, MIT.

A structured quality check for code, project files, or development processes. It can combine checks for secrets, performance, accessibility, domain health, commit format, and code problems.

In plain words
What is it for?
Use it to audit a file, module, whole codebase, or process at a chosen depth, from a quick scan to a comprehensive review.
Why use it?
It brings several common checks into one review and helps find issues that may be missed by looking at only one part of a project.

Command for Claude Code

Part of the badi plugin — 28 commands, 30 agents shipped together

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/fatihkan/badi/audit
Clone the repo
git clone --depth 1 https://github.com/fatihkan/badi

Made for: Claude Code.

Or install badi, the plugin that ships this one along with the rest of its 28 commands, 30 agents.

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 audit

README.md
[![agentmods](https://agentmods.dev/badge/commands/fatihkan/badi/audit.svg)](https://agentmods.dev/commands/fatihkan/badi/audit)
Your own site
<a href="https://agentmods.dev/commands/fatihkan/badi/audit"><img src="https://agentmods.dev/badge/commands/fatihkan/badi/audit.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 844 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 $0.00000 $0.00844
Opus 5 $0.00000 $0.00422
Sonnet 5 $0.00000 $0.00169
Haiku 4.5 $0.00000 $0.00084

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

Security

Grade A, and why

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 4d 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.

.claude/commands/audit.md · 115 lines

How it starts

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

Quality audit command. Runs a systematic audit over code, structure, or process.

Badi CLI Commands (v1.6+)

A Level T4 (Comprehensive) audit runs these CLI tools:

  • badi secret-scan --git — Secret scan + git history
  • badi lighthouse [url] — Performance + Core Web Vitals
  • badi a11y [url] — Accessibility (WCAG 2.1)
  • badi ssl/dns/whois [domain] — Domain health (if production exists)
  • badi commit --check — Last commit conventional format

Required Tools

  • Read (file reading)
  • Grep (code scan)
  • Glob (file discovery)
  • Bash (analysis tools)
  • Write (report writing)

Procedure (5 Steps)

Step 1: Define the Scope

Ask the user: "Pick the audit scope:"

  • File/Directory: A specific file or folder
  • Module: A whole module or feature
  • Project-Wide: The entire codebase
  • Process: CI/CD, test, deploy processes

Step 2: Pick the Audit Level (T1-T4)

T1 - Quick Scan (2-5 min)

  • Syntax and format checks
  • Obvious security issues (hardcoded secrets, SQL injection)
  • Missing files or broken imports
  • Lint rule violations

T2 - Standard Audit (5-15 min)

  • T1 + code quality metrics
  • Duplicated code (DRY violations)
  • Naming consistency
  • Comment and documentation gaps
  • Test coverage analysis

T3 - Deep Audit (15-30 min)

  • T2 + architectural fit analysis
  • Dependency graph review
  • Performance bottlenecks
  • Error handling patterns
  • Access control and authorization

T4 - Comprehensive Audit (30+ min)

  • T3 + security scan (OWASP Top 10)
  • Scalability assessment
  • Disaster recovery readiness
  • Compliance checks (licenses, GDPR/KVKK, etc.)
  • Technical debt inventory
  • Badi CLI Extras:
    • badi secret-scan --git — Secrets + git history
    • badi lighthouse [url] — Performance + SEO + A11y + Best Practices
    • badi a11y [url] — WCAG 2.1 detail
    • badi ssl/dns/whois [domain] — Production domain health
    • badi commit --check — Commit format compliance

Step 3: Delegate to the Audit Agent

Start the audit at the chosen level:

  • Mark every check item PASS / FAIL / WARN
  • Collect and classify the findings
  • Attach evidence (code lines, file paths)

Read the full file on GitHub · 115 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. 4d ago First seen · 115 lines · 0 tokens per session scan A 6d7058c3596c

Subscribe to this mod's changes

audit is a command published in the GitHub repository fatihkan/badi (7 stars, last pushed 17d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 844 tokens. 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.