Scoped audit
Role
You orchestrate a large, repetitive task as a scoped workflow. The goal is a trustworthy catalog of verified findings (and, only when asked and approved, a set of changes derived from them). Big surfaces are where agents hallucinate and burn tokens; this contract exists to prevent both.
When to use
Use this skill when the task is "do one thing" repeated across a large surface: audit every flag, catalog every call site, inventory every config, cross-check every doc, or migrate a pattern repo-wide. For a single requirement or a single-file change, use requirement-to-implementation instead.
Workflow
Run phases in order. Do not make changes until Phase 3 (approval) passes. Do not report a finding until Phase 6 (verification) confirms it.
Phase 0: Scope
- Restate the target surface and the question being asked in one sentence.
- Bound the surface: which directories, repos, file globs, or datasets are in and out of scope.
- Define what a single "finding" is and the exact pass/fail condition for it.
- If the surface or success condition is ambiguous, ask one focused question before proceeding (use
AskQuestion when available).
Phase 1: Plan (show before running)
Present the plan to the user and wait. The plan must show, explicitly:
- Stages: the ordered steps of the workflow.
- Subagent responsibilities: what each parallel subagent will inspect, and how the surface is partitioned across them.
- Verification method: how each finding will be confirmed against the source before it is reported.
- Files and commands to touch: read paths for the audit; for any proposed change, the write paths and commands.
- Smallest safe first pass: the scoped sample you will run before fanning out across the whole surface.
Phase 2: Scoped sample (first pass)
- Run the workflow against the scoped sample only, never the full surface first.
- Confirm the finding shape, the partition strategy, and the verification method actually work.
- Report sample results and the projected cost/scale of the full run. Surface the token-burn risk: parallel fan-out across a large surface compounds quickly.
Phase 3: Approval gate (hard stop)
- Do not expand beyond the scoped sample, and do not make any change, until the user gives approval for the full plan.
- If the scoped sample revealed the plan was wrong, return to Phase 1 and re-plan rather than pushing forward.
Phase 4: Parallel fan-out (capped)
- Partition the approved surface into independent slices.
- Launch parallel subagents (Cursor
explore for read-only discovery, generalPurpose for analysis), one slice each. Cap concurrency at ≤ 6 to bound token burn and keep results reviewable. Batch additional slices in waves.
- Each subagent returns structured findings for its slice only; it does not make changes.
Phase 5: Aggregate
- Merge subagent results into a single catalog, de-duplicated by a stable key.
- Normalize the finding records so every row has the same fields.
Phase 6: Verify (before reporting)
- Verify findings before reporting them: re-check each candidate finding against the actual source (re-read the file, re-run the query) rather than trusting a subagent's summary.
- Drop or flag any finding that cannot be confirmed. Never report an unverified finding as fact.
- Note coverage gaps: slices that failed, timed out, or were skipped.
Phase 7: Report
- Present the verified catalog (table or list) plus a short summary: total found, verified, unverified, and coverage gaps.
- If the user asked for changes (e.g. a migration), present them as a separate proposed change set with the affected files and commands, and return to an approval gate before editing anything.
Output template
# Scoped audit: <surface> (<question>)
## Scope
- In: <paths/globs/datasets> | Out: <excluded>
- Finding = <definition>; condition = <pass/fail rule>
## Coverage
| Slices | Completed | Failed/skipped |
## Findings (verified)
| # | Location | Value / detail | Verified | Notes |
## Unverified / needs review
| # | Location | Why unconfirmed |
## Proposed changes (only if requested, requires approval)
| File | Change | Command |
Safety
- Make no changes (no edits, migrations, or destructive commands) until the plan is approved.
- Never log or echo secrets, tokens, credentials, PII, or PHI encountered while scanning the surface; redact them in findings.
- Respect the concurrency cap; do not spawn unbounded subagents.
- Prefer reporting a coverage gap over fabricating a complete-looking result.
Distinction from other commands
requirement-to-implementation: one requirement → build it. This skill is many repeated checks across a large surface, audit-first.
security-audit, seo-audit, accessibility-audit: single-domain audits with domain rubrics. This skill is domain-agnostic orchestration. Use it to drive a large cataloging pass, and lean on the domain skill for what counts as a finding when relevant.
- This skill catalogs and proposes; it does not edit until a separate approval gate, even when the surface is read with write tools available.
Guardrails
- Run a scoped sample first; never sweep the full surface before the approach is validated.
- Verify findings before reporting them; never report an unverified finding as fact.
- Make no changes until the plan has explicit approval; respect the subagent concurrency cap and redact secrets in findings.
1---2name: scoped-audit3description: Scoped, plan-first workflow for large "check-N-things" tasks (audits, inventories, catalogs, large migrations, cross-checks). Decomposes the surface, fans out capped parallel subagents, verifies findings before reporting, and gates any change behind explicit approval. Use for "audit X for Y", "find all", "catalog every", "inventory", "migrate across", or any repeatable workflow that has quietly become "check 400 things".4---5# Scoped audit67## Role89You orchestrate a large, repetitive task as a scoped workflow. The goal is a trustworthy catalog of verified findings (and, only when asked and approved, a set of changes derived from them). Big surfaces are where agents hallucinate and burn tokens; this contract exists to prevent both.1011## When to use1213Use this skill when the task is "do one thing" repeated across a large surface: audit every flag, catalog every call site, inventory every config, cross-check every doc, or migrate a pattern repo-wide. For a single requirement or a single-file change, use `requirement-to-implementation` instead.1415## Workflow1617Run phases in order. Do not make changes until Phase 3 (approval) passes. Do not report a finding until Phase 6 (verification) confirms it.1819### Phase 0: Scope20211. Restate the target surface and the question being asked in one sentence.222. Bound the surface: which directories, repos, file globs, or datasets are in and out of scope.233. Define what a single "finding" is and the exact pass/fail condition for it.244. If the surface or success condition is ambiguous, ask one focused question before proceeding (use `AskQuestion` when available).2526### Phase 1: Plan (show before running)2728Present the plan to the user and wait. The plan must show, explicitly:29301. **Stages**: the ordered steps of the workflow.312. **Subagent responsibilities**: what each parallel subagent will inspect, and how the surface is partitioned across them.323. **Verification method**: how each finding will be confirmed against the source before it is reported.334. **Files and commands to touch**: read paths for the audit; for any proposed change, the write paths and commands.345. **Smallest safe first pass**: the scoped sample you will run before fanning out across the whole surface.3536### Phase 2: Scoped sample (first pass)37381. Run the workflow against the **scoped sample** only, never the full surface first.392. Confirm the finding shape, the partition strategy, and the verification method actually work.403. Report sample results and the projected cost/scale of the full run. Surface the token-burn risk: parallel fan-out across a large surface compounds quickly.4142### Phase 3: Approval gate (hard stop)43441. Do not expand beyond the scoped sample, and do not make any change, until the user gives **approval** for the full plan.452. If the scoped sample revealed the plan was wrong, return to Phase 1 and re-plan rather than pushing forward.4647### Phase 4: Parallel fan-out (capped)48491. Partition the approved surface into independent slices.502. Launch parallel subagents (Cursor `explore` for read-only discovery, `generalPurpose` for analysis), one slice each. **Cap concurrency at ≤ 6** to bound token burn and keep results reviewable. Batch additional slices in waves.513. Each subagent returns structured findings for its slice only; it does not make changes.5253### Phase 5: Aggregate54551. Merge subagent results into a single catalog, de-duplicated by a stable key.562. Normalize the finding records so every row has the same fields.5758### Phase 6: Verify (before reporting)59601. **Verify findings before reporting** them: re-check each candidate finding against the actual source (re-read the file, re-run the query) rather than trusting a subagent's summary.612. Drop or flag any finding that cannot be confirmed. Never report an unverified finding as fact.623. Note coverage gaps: slices that failed, timed out, or were skipped.6364### Phase 7: Report65661. Present the verified catalog (table or list) plus a short summary: total found, verified, unverified, and coverage gaps.672. If the user asked for changes (e.g. a migration), present them as a **separate proposed change set** with the affected files and commands, and return to an approval gate before editing anything.6869## Output template7071```markdown72# Scoped audit: <surface> (<question>)7374## Scope75- In: <paths/globs/datasets> | Out: <excluded>76- Finding = <definition>; condition = <pass/fail rule>7778## Coverage79| Slices | Completed | Failed/skipped |8081## Findings (verified)82| # | Location | Value / detail | Verified | Notes |8384## Unverified / needs review85| # | Location | Why unconfirmed |8687## Proposed changes (only if requested, requires approval)88| File | Change | Command |89```9091## Safety9293- Make no changes (no edits, migrations, or destructive commands) until the plan is approved.94- Never log or echo secrets, tokens, credentials, PII, or PHI encountered while scanning the surface; redact them in findings.95- Respect the concurrency cap; do not spawn unbounded subagents.96- Prefer reporting a coverage gap over fabricating a complete-looking result.9798## Distinction from other commands99100- **`requirement-to-implementation`**: one requirement → build it. This skill is many repeated checks across a large surface, audit-first.101- **`security-audit`**, **`seo-audit`**, **`accessibility-audit`**: single-domain audits with domain rubrics. This skill is domain-agnostic orchestration. Use it to drive a large cataloging pass, and lean on the domain skill for what counts as a finding when relevant.102- This skill **catalogs and proposes**; it does not edit until a separate approval gate, even when the surface is read with write tools available.103104## Guardrails105106- Run a scoped sample first; never sweep the full surface before the approach is validated.107- Verify findings before reporting them; never report an unverified finding as fact.108- Make no changes until the plan has explicit approval; respect the subagent concurrency cap and redact secrets in findings.