Use case
Audit your codebase from Claude Code. No API key.
Drive a full multi-LLM audit through your existing Claude.ai subscription. Tool use, real-time PostToolUse and Stop hooks, Opus deliberation pass — without a single API token billed on top.
Why use Claude Code as the runner
If you already pay for Claude.ai, your Pro / Max subscription unlocks a generous Claude Code budget. Anatoly runs on top of that runtime: every read, grep, file walk, RAG query and finding-resolution round-trip flows through Claude Code instead of an API key. Same audit pipeline. Zero tokens billed on top.
The first run is heavy — full embedding, all seven axes, deliberation pass. Every run after that is incremental: SHA-256 cached, unchanged files cost $0, and the hook only re-audits what you just edited.
One command to install the hook
$ npx anatoly hook init → writing .claude/settings.json (PostToolUse, Stop) → default anti-loop: max_stop_iterations 3 ✓ hook installed · close & reopen Claude Code to activate $ npx anatoly run → provider · claude-code (subscription) → axes (parallel) · sonnet 4.6 · 7/7 OK → deliberation · opus 4.7 · 22 → 11 confirmed ✓ .anatoly/runs/2026-05-05_104210/public_report.md
The save → audit → fix loop
Once the hook is installed, the loop runs automatically as you save files inside Claude Code. The anti-loop guard caps it at three cycles per file so it never spins on itself.
loop until file is clean · anti-loop guard built in
What the hook config looks like
{ "hooks": { "PostToolUse": [{ "matcher": "Edit|Write", "hooks": [{ "type": "command", "command": "npx anatoly hook on-edit", "async": true }] }], "Stop": [{ "hooks": [{ "type": "command", "command": "npx anatoly hook on-stop", "timeout": 180 }] }] } }
What the integration gives you
- Hook-driven loop - install once, audits run on every Edit/Write. Anti-loop guard prevents runaway.
- Findings in your editor session - the agent surfaces newly-detected issues directly inside Claude Code, with file + line + evidence so you can fix or dismiss in place.
- Opus deliberation, on-subscription - the three-tier finding refinement pass (auto-resolution, inter-axis contradiction detection, then Opus with full tool access) runs on the same subscription budget.
- Same incremental cache - SHA-256 cached re-runs mean unchanged files cost nothing, regardless of where the inference lands.
Mix it with other providers
You're not locked in. Set the cross-cutting routing once, then override the heavier axes individually - useful when you want Opus on Correction but Sonnet everywhere else, or when you bring in a local model alongside Claude.
routing: generation: quality: anthropic/claude-sonnet-4-6 deliberation: anthropic/claude-opus-4-6 fast: anthropic/claude-haiku-4-5-20251001 evaluation: axes: correction: enabled: true model: anthropic/claude-opus-4-6 # override quality routing utility: true # inherits routing.generation.quality
Who this fits
- Senior engineers — maintaining a brownfield repo, who want a continuous audit loop without spinning up a separate API budget.
- Solo founders — shipping fast with Claude Code, who want to know what their codebase actually contains.
- Auditors & consultants — billing fixed-fee engagements, who'd rather amortize a Claude Max subscription than a per-token bill.
Other use cases
Lovable · Cursor · v0 · Bolt
Vibe-coded site audit
Audit codebases shipped by Lovable, Cursor, v0, Bolt or Windsurf. Surface the duplicates, dead code and silent bugs they leave behind.
Air-gapped · regulated
Local LLM code audit
Run the full audit on a model you host. With local RAG, no source byte ever leaves your network — works with Ollama, LM Studio, vLLM.
NDA · M&A · litigation
Tech due diligence
Reports that survive counter-expertise. Every finding pinned to file, line, and evidence — for M&A, expert witness, compliance.
Pipeline · PR gate
AI code audit in your CI
Run Anatoly on every pull request. Structured exit codes, --plain logs, the full report as a build artifact — GitHub Actions or GitLab CI.