agentleFS
Evan-DaruwallaEvan-Daruwalla/claude-skill-suite/audit-code/SKILL.md

audit-code

Skill0 starsChanged 45 days agoMITView on GitHub

Cold CODE-only audit: 15 methods plus an edge-case sweep, parallel workers under a coverage manifest; "recent" scopes to changes since a base ref. Use when: "audit the code", "audit my changes", "find bugs / security fixes". Findings only.

8 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

8 rules. 0 are common, 3 are distinctive, and 5 are very specific to this project.

  • 0

    Common

    Most of the 8 edited versions we read keep these.

  • 3

    Distinctive

    This author's own choices. Worth a look.

  • 5

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Scope is an argument, not a separate skill: Default is the whole project.

    line 22
  2. Very specific:

    Enter cold: If this session already worked on the project, spawn a fresh auditor per fanout.md and hand it only what that file permits — …

    line 44
  3. Distinctive:

    Verify: Every crit and high is reproduced by the session model itself, with the command and its real output.

    line 91
  4. Distinctive:

    The findings pass changes NOTHING: No drive-by fixes.

    line 109
  5. Very specific:

    Never invent a number, measurement, or timestamp: Run date before writing any timestamp.

    line 112
  6. Very specific:

    Every .md file this skill creates or writes to gets ASCII characters only (bytes 0x00-0x7F) in the text you add.

    line 119
  7. Very specific:

    Check before saving. In a git repo, git diff -U0 -- <file> | grep -v '^+++' | grep '^+' | grep -nP '[^\x00-\x7F]' must print nothing.

    line 127
  8. Distinctive:

    Leave non-ASCII in text you did not write.

    line 131

“Common” is measured: kept by at least 6 in 10 of the 8 edited versions of this file we could read. “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

Audit — code, whole project

The code half of the full sweep, at full depth. Use this when the docs are not in question and you want every method pointed at the source.

Which audit is this?

SkillDomain
auditcode + docs + the cross-domain pass
audit-codecode only
audit-docsdocs only

Scope is an argument, not a separate skill. Default is the whole project. Pass recent — /audit-code recent, or "audit my recent changes" — to scope to work since a base ref. The methods are identical either way; only what they are pointed at changes.

Not this skill

  • Did the change land where it actually executes? -> landing-check. This skill hunts defects; it does not verify a deployment reached the live file. The two are complementary and neither replaces the other.
  • Is this diff correct? -> /code-review.
  • Did the code I just wrote run? -> coding-conventions (fires on its own).
  • One narrow mechanical check -> the specialist owns it and this audit CALLS it rather than re-deriving: cve-audit, history-leak-scan, local-secrets-manage, data-integrity-audit, path-quirk-audit, shell-portability, seed-control, determinism-guard, milestone-track.

Protocol

The depth lives in shared reference files, in the audit skill's references/ directory. Read each as you reach its step; this file holds only the order and what is different about this mode.

Enter cold. If this session already worked on the project, spawn a fresh auditor per fanout.md and hand it only what that file permits — never session belief, never "this part is known-good". If the session is genuinely fresh, you ARE the cold auditor. Cold means unbiased, not amnesiac: read the project's own docs, as claims under test.

1. Resolve scope. Per scoping.md.

FULL scope (default). Build the manifest before spawning anyone. Enumerate with git -c core.quotepath=false ls-files — not a $-anchored extension grep, which silently drops every non-ASCII filename (this cost a real audit its most important document on 2026-08-21). Reconcile the count against a second enumeration. This working directory may contain several git repos rather than being one: do not silently pick one, and do not sweep them all under a single manifest without asking.

RECENT scope (when recent is passed). Resolve the base ref deliberately and say which you chose. Use three-dot git diff base...HEAD — two-dot picks up base-branch drift and is the classic wrong answer. Include uncommitted and untracked work (git status --porcelain, git diff, git diff --staged; untracked files need git add -N to appear in a diff at all — there is no --include-untracked flag). Rank by relative churn, not absolute: Nagappan & Ball (ICSE 2005) measured absolute churn at R^2 = 0.052 and size-normalized churn at R^2 = 0.811.

Then walk the blast radius — mandatory. Take the changed set, walk reverse dependencies (import graph, call graph, git log -G over changed symbols), and pull unchanged callers into scope. A changed function's untouched callers are exactly where a broken contract surfaces. Without this, "recent audit clean" means only "the diff reads fine".

Recent-scoped reports state their own blind spots — what was not swept, and that they cannot see pre-existing defects in untouched code or a latent bug the change newly made reachable.

2. Every file in scope is assigned to a worker, and every exclusion is listed with its reason. The coverage map is computed from the manifest and the workers' reconciled search trails, not narrated from memory. "38 of 41 files swept, 3 vendored" is checkable; "comprehensive sweep" is not.

Fan out. Per fanout.md. Sonnet workers, eight maximum across all levels including any delegates. Pre-register the acceptance rubric before any worker output exists. Workers do NOT vote or cross-review — they report independently and the session model adjudicates on evidence.

Sweep. code-methods.md — M1 through M15, then the edge-case generators G1-G4, in the cost order that file specifies.

Verify. Every crit and high is reproduced by the session model itself, with the command and its real output. A zero-result search is a claim, not a fact — cross-check load-bearing negatives through a second implementation before believing them.

Report. Exactly the contract in reporting.md.

Wait for approval, then fix in the stated order, verifying each fix by running the thing. Re-run the automated pass afterwards and report before/after.

Notes for this mode

No docs sweep and no cross-domain pass. That is the trade: this skill will not catch a README asserting something false, and it will not reconcile a documented claim against observed behaviour. If the project's docs are load-bearing, run audit instead.

One dependency is worth knowing: M1 (invariant tracing) and M7 (spec conformance) both consume a list of claimed invariants that normally comes from the docs sweep. Running code-only means building that list yourself from comments and constants — do it, and note in the coverage map that it was self-derived rather than doc-sourced.

Rules

  • The findings pass changes NOTHING. No drive-by fixes.
  • Never delete anything you did not create this session without asking.
  • Never install new scanners without asking; never certify compliance.
  • Never invent a number, measurement, or timestamp. Run date before writing any timestamp. Missing data is reported as missing.
  • Coverage is proven by the manifest, not by how thorough it felt. A method not run is "not swept", never "no findings".

ASCII-only markdown (rule added 2026-09-23)

Every .md file this skill creates or writes to gets ASCII characters only (bytes 0x00-0x7F) in the text you add. No exceptions for headings, tables, quotes, names or pasted tool output.

  • Dashes: - (never an en or em dash). Arrows: -> and <-. Quotes: straight " and '. Ellipsis: .... Math: x, +/-, <=, >=, ~. Separators: -, ; or |. No emoji, no check-mark glyphs (use [x] and [ ]), no accented letters: transliterate names and quoted text.
  • Check before saving. In a git repo, git diff -U0 -- <file> | grep -v '^+++' | grep '^+' | grep -nP '[^\x00-\x7F]' must print nothing. For a new or untracked file, grep -nP '[^\x00-\x7F]' <file> must print nothing.
  • Leave non-ASCII in text you did not write. Earlier entries of an append-only record stay byte for byte; converting an existing file is a separate, explicit job.

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.