Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

Codebase Audit: audit

БесплатноЗапускает вложенные скриптыНе проверен

Audit a codebase through every lens its stack calls for, verify each finding, cluster them by root cause, deliver the fixes as a ticketed map, and untangle…

orensegalот orensegal200 установок в других каталогах

Об этом скилле

Run an adversarial audit of this codebase and finish it. Report and deliver first; change source code only with --fix or once the user picks fixes.

You are the adversary. Every lens asks one question from a different angle: what input, timing, user or attacker makes this code give a wrong answer, lose data, leak data, or strand the user?

This folder holds everything the audit needs. Resolve these paths from this file's directory:

  • lenses/<lens>.md: one per lens. Its Fires: line says when the lens runs (always, or when <condition>). Each probe is either unconditional (always answered) or marked (when <condition>) (answered when the condition holds, otherwise closed as not applicable). Then the artifact the lens produces, and its done line.
  • scripts/scan.py: fingerprints the repo, routes lenses, and lists the project's own analyzers to run. scripts/signals.tsv: every detection and seed pattern; scripts/tools.tsv: every analyzer it knows. A project adds its own rows in docs/agents/audit-signals.tsv.
  • scripts/verify.py: checks findings files against the lens files. scripts/cochange.sh: files that change together.
  • DELIVER.md: hand-off notes, the audit map and its tickets.
  • UNTANGLE.md: the structural refactor, for --untangle and for structural tickets.

1. Scope

  • Arguments: a path (default: repo root); --lens a,b to run only those; --since REF to audit what changed since a ref (a PR base, or the last audit's commit); --fix; --untangle [area|ticket] to skip straight to UNTANGLE.md; --out DIR (default .audit/).
  • When no answer can arrive (CI, claude -p), unanswered questions stay on HANDOFF.md as open questions, delivery goes to the local tracker only, and source stays untouched unless a ticket is on the approved: line.
  • Create the output directory with a .gitignore containing *, so the audit touches no tracked file. When starting a new run (never when resuming), first move an earlier run's RUN.md, REPORT.md and findings/ to <out>/history/<its date>/, so the new run can compare against it.
  • Resume: if <out>/HANDOFF.md exists, continue from its next phase, leaving the run's files where they are. Tickets on its approved: line are cleared for source changes without asking again; work the first one on the frontier, one ticket per session, as DELIVER.md says. Any other ticket goes back to the user first. If an earlier run exists in history/, offer --since <its commit> and carry refuted.md forward.

Every phase below ends by rewriting <out>/HANDOFF.md as DELIVER.md describes.

2. Scan and recon

Run python3 scripts/scan.py <path> [--since REF] [--lens a,b] > <out>/SCAN.md, so SCAN.md is the script's raw output: stacks, packages, which lenses fire and why, hot spots, the execution plan, the analyzers to run, candidate sites per probe (hottest files first), and special-case counts.

Run each analyzer listed under Tools whose command is available, saving its output to <out>/tools/<tool>.txt. Their warnings are leads for the lens each row names, the same as scan sites; a tool that is missing or fails is noted in RECON.md, never installed.

Then write <out>/RECON.md, completing what a script cannot see. Finish only when every heading has an answer or none:

  • Boundaries: every place outside data enters (HTTP, webhooks, DB reads, files, env, deep links, push payloads, model output, user input).
  • Persistence: local stores, server DB, caches, queues, and which one owns each fact.
  • Critical paths: money, auth, data deletion, migrations, anything safety-related, the main user loop.
  • Commands: build, test, lint, run; whether tests pass now.
  • House rules: CLAUDE.md/AGENTS.md; the domain language in GLOSSARY.md (or GLOSSARY-MAP.md), used for every name in findings and fixes; ADRs, whose accepted risks stay settled unless the risk changed; the issue tracker in docs/agents/.
  • Conditions: for each firing lens, which conditional probes hold here, with evidence.
  • Lens overrides: a lens the scan skipped that recon shows is needed, or one fired by a false signal, with the reason.

Write <out>/RUN.md: commit, date, arguments, final lens list.

3. Hunt

Follow the scan's plan: sequential runs each lens here, one after another; parallel gives each lens a subagent, and a sharded lens one subagent per listed package. A host that caps concurrency runs waves, pairing the lenses with the fewest sites; a host without subagents runs everything in sequence.

Subagents start with no skills and none of this conversation, so each brief stands alone. It names: the lens file, this file (for Methods and Finding format), RECON.md, the lens's section of SCAN.md, the scope, and the output path <out>/findings/<lens>[-<package>].md. Hunters are read-only leaves: they read code, run tests, scripts and the app, write only their findings file and repros, and return to

Полный SKILL.md на ClawHub

Установить Codebase Audit: audit в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл Codebase Audit: audit?

Audit a codebase through every lens its stack calls for, verify each finding, cluster them by root cause, deliver the fixes as a ticketed map, and untangle the structure.

Как установить скилл Codebase Audit: audit?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл Codebase Audit: audit запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить Codebase Audit: audit с