Community程式設計與開發github.com

audit-sweep

Run the code-audit set over a target and deliver one ranked report. Use when asked to review a codebase, a subsystem or a diff for defects, when starting work in unfamiliar code, after a large change, or before a release. Picks the audits that apply to the project, splits the work the way the project suggests, and ranks the combined findings worst first by impact. Reports; fixes follow on approval.

audit-sweep 是什麼?

audit-sweep is a Claude Code agent skill that run the code-audit set over a target and deliver one ranked report. Use when asked to review a codebase, a subsystem or a diff for defects, when starting work in unfamiliar code, after a large change, or before a release. Picks the audits that apply to the project, splits the work the way the project suggests, and ranks the combined findings worst first by impact. Reports; fixes follow on approval.

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/thomasdolash/code-audit-skills/tree/HEAD/audit-sweep

Installed? Explore more 程式設計與開發 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

Audit sweep

The find-* skills each cover one class of defect. This runs the ones that apply and merges the result into a single report, so the whole set is covered without every skill reporting separately.

The set

Twenty-one audits in seven groups. Read the group first: it decides what a project needs.

Failure and state

auditcatches
find-error-integritya fault the caller never sees
find-failure-atomicitypartial state or a doubled effect after a failure
find-resource-lifecyclea resource released on every path but one
find-state-machinesa state with no exit wired
find-liveness-defectswork that can stay pending forever

Concurrency and time

auditcatches
find-concurrency-orderinga race, a stale read, a missing happens-before
find-nondeterminismoutput that varies between runs

Data and interfaces

auditcatches
find-boundary-semanticstwo valid meanings meeting at a boundary
find-contract-inconsistenciesa promise one layer never keeps
find-data-flow-integritya value that loses its meaning in transit
find-invariant-violationsa property broken across operations
find-duplicate-codeone rule written twice, and drifting
find-accepted-but-ignoredinput accepted and never acted on

Numbers

auditcatches
find-numerical-instabilitya result that drifts, a threshold that decides wrongly

Growth and cost

auditcatches
find-scaling-costsone path that grows with its input
find-unbounded-growtha store that grows with runtime

Code shape

auditcatches
find-complex-functionsa function doing too much
find-oversized-unitsa file or module doing too much
find-overengineeringprotection that costs more than the case it guards

Checks

auditcatches
find-verification-adequacya check that cannot fail
find-redundant-checksa check that costs more than it catches

The project decides the shape

Read the target before choosing anything. What it is determines how the sweep runs:

  • Which audits apply. No tests means no audit from Checks. No concurrency means no audit from Concurrency and time. No persistence means no atomicity audit. Say which you dropped, and why, one line each.
  • How the work splits. By module, by audit, by subsystem, whatever the tree and the request suggest. One pass or many. Serial or parallel. A small tree does not need lanes.
  • How much is read. A diff review reads the diff and what it reaches; a whole-repo review reads the tree.

Do not impose a roster, a lane count or a phase order. State your choice in a line.

Consolidate

  • One owner per finding. The audits overlap. When two catch the same defect, the narrower remedy owns it.

    defectowner
    a failure nobody can seefind-error-integrity
    partial state after a failurefind-failure-atomicity
    a value that loses its meaning in transitfind-data-flow-integrity
    one rule written twicefind-duplicate-code
    two valid meanings at one boundaryfind-boundary-semantics
    a promise one layer never keepsfind-contract-inconsistencies
    no way out of a statefind-state-machines
    work that never completesfind-liveness-defects
    growth per callfind-scaling-costs
    growth per runtimefind-unbounded-growth
    a check that cannot failfind-verification-adequacy
    a check that costs more than it catchesfind-redundant-checks
  • Rank worst first: correctness and data loss, then liveness, then accounting, then cost. Say why that order holds for this project.

  • Each finding: where it is, what breaks, how you know, and at what strength. A finding with no nameable break is itself the finding.

  • Close with the gaps: what you did not read, and why.

Fix, after

Report first. Fix on approval, worst first, one editor per file. Do not edit during the sweep.

Individual skills in this repo

This repo contains 6 individual skills — each has its own dedicated page.

find-accepted-but-ignored

Find input that is accepted and then has no effect: a config key absent from the list that validates it or the code that reads it, a flag nothing consults, a parameter a function receives and ignores, an unknown field dropped in silence, an option documented but unimplemented. Use when a setting seems to do nothing, when a "supported" option changes nothing, after adding or renaming a config key, or when auditing configuration parsing, API parameters, feature flags and option objects. Fixes the parts that are safely fixable.

find-complex-functions

A complex function asks the reader to hold more than its job requires. It carries several responsibilities, branches inside branches, statements that mix levels of abstraction, or more locals than anyone can track.

find-duplicate-code

Duplication is the same **rule** written twice, whether that is a formula, a validation, a constant list, a protocol step, or a derivation. The copies usually differ in their text because someone adapted them, which is what makes the drift invisible.

find-overengineering

A fallback for an input no caller can produce, three options where nobody sets two, a compatibility layer for consumers that no longer exist and a migration framework for a schema with one user all cost more than the case they defend against. The defense is not free and not neutral. Every guard is a branch to test and a path to maintain, and a silent fallback turns a loud failure into a quiet wrong answer.

find-oversized-units

One change should be understandable in one place. A unit that breaks that rule holds more code than the change needs to touch: a file past the preferred range, a module where every agent edits a different section, or a unit whose parts change for unrelated reasons.

find-redundant-checks

A check can spend time without buying fault detection. It may guard the same claim twice, guard a claim two levels above where it would be caught just as well, test code that no longer exists, or belong to a suite where every case pays for the same setup.

相關技能