Command Palette

Search for a command to run...

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

codebase-audit

БесплатноБез исполняемых скриптовНе проверен

Long-running, resumable adversarial audit of a whole codebase. Splits the repo into partitions, runs /adversarial-reviewer --codebase on each, then…

mhylleот mhylle★ 20 звёзд на GitHub

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

Codebase Audit

Contents

Long-running comprehensive adversarial audit. Orchestrates per-partition reviews through /adversarial-reviewer --codebase, then synthesizes findings into a written report. Designed for methodical full coverage, not strategic sampling — use when the user wants the whole thing reviewed and is willing to spend the tokens and time.

Positioning

Skill What it does Coverage Output When
/devflow:code-review Per-phase quality gate Changed files Verdict + notes During implementation
/adversarial-reviewer (diff) Hostile pre-merge review Changed files BLOCK/CONCERNS/CLEAN Before a merge
/adversarial-reviewer --codebase Adversarial sample of repo 5-10 files per persona HIGH/MEDIUM/LOW-RISK + most-concerning area Quick whole-repo sanity check
/codebase-audit Methodical full audit Every partition Written report + risk register Onboarding / due diligence / tech-debt review
/code-quality-audit Metrics: coverage, complexity, cycles, mutation Whole repo (metric-based) Numeric gate Quantitative health

Pair codebase-audit with code-quality-audit for a complete picture: this skill gives you the qualitative adversarial read; code-quality-audit gives you the quantitative one.

Usage

/codebase-audit                        # Audit CWD
/codebase-audit src/                   # Scope to a subtree
/codebase-audit --resume               # Pick up from last checkpoint
/codebase-audit --only api             # Re-run a specific partition
/codebase-audit --force                # Ignore existing partition reports (re-review everything)

Expect 200K-500K tokens and 30-60 minutes of wall clock for a typical ~500-file repo. This is a deliberate investment. Confirm with the user before kicking off if the cost would surprise them.

Workflow

Step 1: Scope and map

Determine the scope root (path argument, or CWD). Build the map:

  1. git ls-files | wc -l — total file count (or find . -type f if not a git repo).
  2. git ls-files | head -500 + tree -L 3 — structural overview.
  3. Read: README.md, CLAUDE.md, package.json / pyproject.toml / Cargo.toml / go.mod, top-level *.config.*.
  4. git log --pretty=format: --name-only --since=180.days | sort | uniq -c | sort -rn | head -50 — recent churn.
  5. Locate test directories; compute rough test-to-source ratio.
  6. Detect monorepo structure (packages/, apps/, workspace configs) — these are natural partition boundaries.

Write a one-page codebase map summarizing what you learned. This goes into the audit directory so future steps and the user can reference it.

Step 2: Partition plan — STOP for user approval

Create the audit workspace:

docs/audits/YYYY-MM-DD-<repo-name>/
├── map.md                     # from Step 1
├── plan.md                    # from Step 2 (this step)
├── partitions/                # per-partition reports (populated in Step 3)
└── REPORT.md                  # final synthesis (produced in Step 5)

Propose a partition plan in plan.md. Partition strategy, in priority order:

  1. Monorepo workspaces (packages/*, apps/*) — each workspace is one partition.
  2. Top-level src directories (src/api, src/domain, src/ui, etc.) — each is one partition.
  3. By concern when the repo is flat — group files by feature / module using directory names and import graphs.

Each partition should be 50-150 files. Too small = wasted orchestration overhead. Too large = exceeds /adversarial-reviewer --codebase's sampling sweet spot (which expects ~300-500 files max).

Record each partition with:

  • Name (short, kebab-case)
  • Path(s) (glob-compatible)
  • File count
  • Rationale (why this is a coherent chunk)

Then stop and show the plan to the user. This is the token-commitment checkpoint. Ask:

"Here's the partition plan: N partitions, estimated cost ~XYZ tokens. Approve, modify, or narrow scope?"

Do not proceed to Step 3 without explicit user approval.

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

Установить codebase-audit в Claude Code и Claude Desktop

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

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

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

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

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

Read
Write
Edit
Grep
Glob
Bash
Skill
TaskCreate
TaskUpdate
TaskList
TaskGet

FAQ

Что делает скилл codebase-audit?

Long-running, resumable adversarial audit of a whole codebase. Splits the repo into partitions, runs /adversarial-reviewer --codebase on each, then synthesizes a cross-partition risk register and a written remediation report. Use for onboarding audits of an inherited codebase, pre-acquisition due diligence, periodic tech-debt health checks, or when the user asks for a comprehensive, thorough, exhaustive or deep review of the whole codebase ("full codebase audit", "code due diligence", "tech debt audit", "what am I inheriting"). Differs from /adversarial-reviewer --codebase, which samples the repo in one pass, and from /code-quality-audit, which measures coverage, complexity, cycles and mutation scores.

Как установить скилл codebase-audit?

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

Скилл codebase-audit запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

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

Сравнить codebase-audit с