agentleFS
emaraschioemaraschio/cursor-commands/.cursor/skill-contracts/scoped-audit/SKILL.md

scoped-audit

Skill9 starsChanged 3 months agoMITView on GitHub

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".

The file

We split this skill into the rules it gives an agent

12 rules. About 0 are common, 11 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈11

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill when the task is "do one thing" repeated across a large surface: audit every flag, catalog every call site, inventory every …

    line 20
  2. Distinctive:

    Run phases in order. Do not make changes until Phase 3 (approval) passes.

    line 24
  3. Very specific:

    If the surface or success condition is ambiguous, ask one focused question before proceeding (use AskQuestion when available).

    line 31
  4. Distinctive:

    Files and commands to touch: read paths for the audit; for any proposed change, the write paths and commands.

    line 40
  5. Distinctive:

    Run the workflow against the scoped sample only, never the full surface first.

    line 45
  6. Distinctive:

    Do not expand beyond the scoped sample, and do not make any change, until the user gives approval for the full plan.

    line 51
  7. Distinctive:

    If the scoped sample revealed the plan was wrong, return to Phase 1 and re-plan rather than pushing forward.

    line 52
  8. Distinctive:

    If the user asked for changes (e.g.

    line 74
  9. Distinctive:

    Never log or echo secrets, tokens, credentials, PII, or PHI encountered while scanning the surface.

    line 101
  10. Distinctive:

    Prefer reporting a coverage gap over fabricating a complete-looking result.

    line 103
  11. Distinctive:

    Run a scoped sample first.

    line 113
  12. Distinctive:

    Verify findings before reporting them.

    line 114

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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

  1. Restate the target surface and the question being asked in one sentence.
  2. Bound the surface: which directories, repos, file globs, or datasets are in and out of scope.
  3. Define what a single "finding" is and the exact pass/fail condition for it.
  4. 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:

  1. Stages: the ordered steps of the workflow.
  2. Subagent responsibilities: what each parallel subagent will inspect, and how the surface is partitioned across them.
  3. Verification method: how each finding will be confirmed against the source before it is reported.
  4. Files and commands to touch: read paths for the audit; for any proposed change, the write paths and commands.
  5. Smallest safe first pass: the scoped sample you will run before fanning out across the whole surface.

Phase 2: Scoped sample (first pass)

  1. Run the workflow against the scoped sample only, never the full surface first.
  2. Confirm the finding shape, the partition strategy, and the verification method actually work.
  3. 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)

  1. Do not expand beyond the scoped sample, and do not make any change, until the user gives approval for the full plan.
  2. 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)

  1. Partition the approved surface into independent slices.
  2. 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.
  3. Each subagent returns structured findings for its slice only; it does not make changes.

Phase 5: Aggregate

  1. Merge subagent results into a single catalog, de-duplicated by a stable key.
  2. Normalize the finding records so every row has the same fields.

Phase 6: Verify (before reporting)

  1. 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.
  2. Drop or flag any finding that cannot be confirmed. Never report an unverified finding as fact.
  3. Note coverage gaps: slices that failed, timed out, or were skipped.

Phase 7: Report

  1. Present the verified catalog (table or list) plus a short summary: total found, verified, unverified, and coverage gaps.
  2. 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.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.