Best for
- 全面代码库审计 — 自适应并行深度分析(前后端契约、数据完整性、异常处理/安全、架构/技术债、配置/缓存),结构化 findings + 对抗验证 + 基线对比,输出按严重程度排序的统一报告和修复路线图。支持 quick 快速体检模式。Use when user asks to audit, analyze, or review an entire codebase for design issues, find hidden bug…
majiayu000/spellbook/skills/codebase-audit/SKILL.md
Use it for engineering and design tasks; the detail page covers purpose, installation, and practical steps.
Decision brief
Comprehensive codebase audit that adapts its agent configuration to the project's tech stack, forces structured findings, adversarially verifies Critical/High findings before they enter the report, diffs against the previous audit's ledger (resolved / still-open / new), and outp…
Compatibility matrix
| Platform | Status | Evidence | What to check |
|---|---|---|---|
| Codex | Not declared | No explicit evidence | Portability before use |
| Claude Code | Not declared | No explicit evidence | Portability before use |
| Cursor | Not declared | No explicit evidence | Portability before use |
| Gemini CLI | Not declared | No explicit evidence | Portability before use |
Installation
The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.
npx skills add https://github.com/majiayu000/spellbook --skill "skills/codebase-audit"Inspect the Agent Skill "codebase-audit" from https://github.com/majiayu000/spellbook/blob/01c5d88b0139a80ac38bfe7206ea99f28b0fc999/skills/codebase-audit/SKILL.md at commit 01c5d88b0139a80ac38bfe7206ea99f28b0fc999. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.
Workflow
1. Stack detection: package.json/tsconfig.json → TS/JS; pyproject.toml/requirements.txt → Python; Cargo.toml → Rust; go.mod → Go; multiple → full-stack. 2. Size estimate: tokei (fallback: find -name '.' | xargs wc -l), excluding vendored/generated code. If effective size ≥ 400K…
1. Stack detection: package.json/tsconfig.json → TS/JS; pyproject.toml/requirements.txt → Python; Cargo.toml → Rust; go.mod → Go; multiple → full-stack. 2. Size estimate: tokei (fallback: find -name '.' | xargs wc -l), excluding vendored/generated code. If effective size ≥ 400K…
Pick the configuration by detected stack. Full prompt templates in references/agent-prompts.md; prepend the read-only preamble and inject {TARGETDIR} / {STACKINFO} into each.
Preferred — Workflow tool (skill invocation is the user's opt-in): use the script in references/workflow-template.md. It schema-forces every finder's output into structured findings, then pipelines each dimension's Critical/High findings straight into adversarial verify agents (…
Dedup: - Same file + same line → merge. - Same root cause found by multiple agents → keep the most detailed, note cross-agent confirmation (raises confidence). - Severity conflicts → use the highest.
Permission review
The documentation asks the agent to read local files, directories, or repositories.
Previous finding with no current match → open the file and spot-check before marking `resolved`; if still present but missed, re-add as `still-open`.Evidence record
| Signal | Value | Evidence type | Meaning |
|---|---|---|---|
| Quality score | 88/100 | Computed | Documentation, specificity, maintenance, and trust rules |
| Repository stars | 249 | Source | Repository attention, not individual Skill quality |
| Compatibility | 0 platforms | Source | Declared in the catalog source record |
| Usage guide | automated source guide | Editorial | Generated or reviewed according to the visible evidence level |
Pinned source
Comprehensive codebase audit that adapts its agent configuration to the project's tech stack, forces structured findings, adversarially verifies Critical/High findings before they enter the report, diffs against the previous audit's ledger (resolved / still-open / new), and outputs a severity-sorted report plus a phased repair roadmap.
references/agent-prompts.md.model param on all agents so they inherit the session model (usually the strongest available). Only override upward if the session model is clearly weak for cross-file reasoning. Never hardcode a specific model name in this skill.unverified in the report.<target>/.audit/ after the user invokes this skill..gitignore, CI config, remote issues, PR state, or anything outside the requested audit/report scope.{TARGET_DIR}, not the assistant's incidental cwd.evals/expected-findings.json or eval README files when auditing the planted-bug fixture.resolved.| Mode | Trigger | Agents | Verify pass | Ledger |
|---|---|---|---|---|
| full (default) | plain invocation, "全面审查" | 3–5 by stack (+ optional dims) | yes | yes |
| quick | "quick" in args, "快速体检" | 2 (Silent Degradation & Security; Data Integrity & Registry) | no — all findings labeled unverified | yes |
Optional dimensions (full mode only, enable when user asks or the repo obviously needs them):
tests — test quality: assertion strength, skip markers, coverage of critical paths (Agent 6)concurrency — races, blocking calls in async, leaked tasks/goroutines (Agent 7)package.json/tsconfig.json → TS/JS; pyproject.toml/requirements.txt → Python; Cargo.toml → Rust; go.mod → Go; multiple → full-stack.tokei <target> (fallback: find <target> -name '*.<ext>' | xargs wc -l), excluding vendored/generated code. If effective size ≥ 400K LOC, split each agent's scope by top-level directory and note the split in the report.node_modules/, vendor/, target/, dist/, build/, .git/, lockfiles, generated code.<target>/.audit/findings.json if it exists — this is the previous audit baseline (format: references/ledger-format.md).{TARGET_DIR} (never the assistant's incidental cwd), run each matching tool and feed raw output to the Error Handling & Security prompt:
cargo auditnpm auditpyproject.toml / setup.py): pip-audit .requirements.txt): pip-audit -r requirements.txtpip-audit .govulncheck ./...
If a required tool is unavailable, the report must state 依赖审计降级跳过: <tool>; never omit the degradation silently.Pick the configuration by detected stack. Full prompt templates in references/agent-prompts.md; prepend the read-only preamble and inject {TARGET_DIR} / {STACK_INFO} into each.
Full-Stack (5 agents) — frontend + backend both present:
| # | Dimension | Scope (merged) |
|---|---|---|
| 1 | Frontend-Backend Contract | Type consistency + rendering pipeline + serialization boundaries. Reads BOTH sides. |
| 2 | Data Integrity & Flow | End-to-end pipeline tracing, field dropping, declaration-execution gaps, registry coverage alignment. |
| 3 | Error Handling & Security | Silent degradation, exception patterns, secrets, injection, unsafe deserialization. |
| 4 | Architecture & Code Quality | Layer violations, god objects, duplication/drift, extension cost, registry cross-reference. |
| 5 | Config & Persistence | Config completeness, cache key/integrity, DB schema, temp files, state persistence. |
Backend-Only (4 agents): replace #1 with "API Contract & Data Integrity" (which absorbs #2's data-flow/registry scope — do NOT also dispatch #2); keep #3–#5. Frontend-Only (3 agents): Component Architecture & Rendering; Error Handling & Code Quality; Config & Build. Quick mode (2 agents): Silent Degradation & Security (= #3); Data Integrity & Registry (= #2 core).
Fallback-path agent types (when using the Agent tool instead of Workflow): agent availability is environment-specific — check the subagent registry visible in the current session and use only type names that appear there. Never invent aliases (there is no generic reviewer type). If no specialized type matches, use general-purpose (or the environment's default catch-all) for every dimension; the prompts are self-contained. See the example mapping in references/agent-prompts.md.
Preferred — Workflow tool (skill invocation is the user's opt-in): use the script in references/workflow-template.md. It schema-forces every finder's output into structured findings, then pipelines each dimension's Critical/High findings straight into adversarial verify agents (no barrier — verification starts while other dimensions are still scanning).
Fallback — Agent tool (if Workflow is unavailable): launch all finder agents in a SINGLE message; prompts already demand the same JSON output. After they return, launch one verify agent per Critical/High finding (also batched in one message), using the verify prompt from references/workflow-template.md.
Dedup:
Verification results:
confirmed=false findings do NOT enter the main report; list them in an appendix "Refuted by verification" with the refutation reason (keeps the work auditable).unverified.Ledger diff (skip if no previous ledger — everything is new):
resolved; if still present but missed, re-add as still-open.new / still-open.<target>/.audit/findings.json. If the repo is tracked and .audit/ isn't ignored, suggest adding it to .gitignore (don't edit .gitignore yourself).Write the full report to <target>/audit-report-YYYY-MM-DD.md, then post a chat summary: counts per severity, top Criticals, ledger delta (N resolved / N still-open / N new), dependency-audit status, and the roadmap.
Report body requirements:
file:line; impact is an inference with confidence; repair advice is a recommendation with stated assumptions.Report structure:
# [Project] Codebase Audit Report
> Date / Target / Stack / Mode / Agents / Dependency audit / Previous audit: date or "none"
## Summary
| Level | Count | Verified | Key Areas |
## Delta vs Previous Audit (omit if first audit)
Resolved: N (list) | Still-open: N | New: N
## Critical (Fix Immediately)
Per finding: file:line, code snippet, risk, fix suggestion, verify status.
## High / P1 (Fix This Week) — grouped by category
## Medium / P2 (Plan to Fix) — labeled unverified where applicable
## Refuted by Verification — appendix: finding + refutation reason
## Repair Roadmap
| Phase | Scope | Est. Files |
| Level | Criteria |
|---|---|
| Critical | Data loss, rendering failure, security vulnerability, complete feature breakage affecting users NOW |
| High/P1 | Silent degradation (user sees wrong/incomplete output), type mismatches causing data truncation, missing config causing empty output, architectural violations blocking development |
| Medium/P2 | Code duplication, inconsistent patterns, suboptimal error handling, tech debt that slows development but doesn't break features |
references/agent-prompts.md — read-only preamble + prompt templates (Agents 1–7)references/stack-patterns.md — per-stack search patternsreferences/workflow-template.md — Workflow script, finding/verdict schemas, verify promptreferences/ledger-format.md — ledger JSON schema and matching rulesevals/ — planted-bug fixture; evals measure recall against evals/expected-findings.jsonAlternatives
TencentCloudBase/CloudBase-AI-Toolkit
Perform a full codebase review, categorize findings by severity, file GitHub issues, then fix each issue in an isolated git worktree and submit PRs. Use this skill when the user asks to audit the codebase, do a comprehensive code review, find and fix security/quality/reliability issues, or run a proactive health check across the entire repository.
mgiovani/cc-arsenal
Multi-agent review team: architecture, security, performance, testing, style, docs/UX, plus an adversary that cross-examines the other 6, for security-sensitive, architectural, or large PRs (15+ files) where a single-agent pass risks missing cross-cutting issues. Use for auth/payments/PII changes, schema/pattern changes, compliance sign-off, or when asked to 'get the review team on this' / 'multi-agent review' / 'thorough review before merge'. For a standard PR or a quick pre-merge check, use /r
alirezarezvani/claude-skills
Discover, find, compare, audit, repair, adapt, and design repeatable AI-agent loops with explicit triggers, actions, verification, stopping conditions, guardrails, and handoffs. Use when a user asks to analyze a codebase for potential loops, mine coding-thread history for work done more than once, turn repeated engineering work into a loop, find or recommend a published loop, create a recurring agent workflow or automation cadence, turn an outcome into a bounded copy-ready loop, or review an exi
majiayu000/spellbook
Diagnose slow or freezing VS Code-compatible editors with evidence-first, zero-hardcoded-assumption workflow. Use when the user reports editor lag, typing delay, UI freezes, extension host stalls, file watcher noise, high editor CPU/RSS, uses VS Code/Cursor as a file browser over a large folder, or wants a safe editor performance audit.