sc-audit
Skill1 starsChanged 5 months agoMITView on GitHub
Orchestrator for the ProofHound smart-contract audit pipeline. Runs an end-to-end Solidity security audit of a repository in ONE invocation, autonomously driving all seven stages (chunking, modeling+invariants, math spec, dependency graphs, hypotheses, PoC verification, report) and reporting which stage is running as it goes. Every reported finding is PoC-backed. Use when asked to "audit" a contract or repository end-to-end.
5 other projects use a version of this.
Adopted by
Most recently taken up by
- aaronjmars/miroshark-aeontheir own version, first seen Oct 21, 2026
- aeonfun/aeontheir own version, first seen Oct 20, 2026
- MiroShark/miroshark-aeontheir own version, first seen Oct 17, 2026
- aaronjmars/aeontheir own version, first seen Oct 8, 2026
- OneDro1d/dark-factorytheir own version, first seen Oct 8, 2026
Used with
Projects with it also use aeon-update, auto-workflow and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
aaronjmarsSkillaeon-update
Pull framework updates from the upstream Aeon repo into this instance - 3-way merges canon's new commits into a PR, never clobbering operator config.
Also in 4 projects that use this
aaronjmarsSkillauto-workflow
Two-mode aeon.yml workflow builder - analyze inspects URLs and emits a tiered, signal-verified skill-enablement plan plus an aeon.yml diff; enable flips slugs to enabled:true and opens a PR.
Also in 4 projects that use this
- +10 more from aaronjmars
Other versions5 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 5
- aaronjmars/aeon★ 789same name
- aeonfun/aeon★ 789same name
- aaronjmars/miroshark-aeon★ 20same name
- MiroShark/miroshark-aeon★ 20same name
- OneDro1d/dark-factory★ 4same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
The file
Show its rules and text
We split this skill into the rules it gives an agent
14 rules. 0 are common, 7 are distinctive, and 7 are very specific to this project.
0
Common
Most of the 5 edited versions we read keep these.
7
Distinctive
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 31
When a stage finishes, confirm in one line:
- Distinctive: line 41
Keep these lines short. They are the user's only window into a long run — never go silent for a whole stage.
- Very specific: line 47
Verify it exists and is a directory (test -d).
- Very specific: line 48
If no path is given, use the current working directory.
- Distinctive: line 49
Locate the pipeline driver: Use this skill's own scripts (installed copy):
- Very specific: line 59
Honor
--phase: If the user passed --phase X, run only that phase and stop (manual mode). - Distinctive: line 67
Run the deterministic structural batch (chunk → signals → graph → math-scan):
- Distinctive: line 71
Check the sc-ingest coverage gate in the output.
- Very specific: line 79
Few contracts: inline: Read the top entry points + signals.json and write the map yourself.
- Very specific: line 97
Do the sc-spec work: read the docs/NatSpec and spec/math-candidates.json, then WRITE <TARGET>/.audit/spec/math-spec.json (+ reference …
- Distinctive: line 112
Do the sc-hypothesize reasoning on top of the seeds.
- Very specific: line 130
Free-exploration (both paths): run an attacker-mindset analysis with NO checklist — prefer spawning subagent(s), optionally several with …
- Very specific: line 155
Few kept: inline: Write each prosecutor PoC (<TARGET>/.audit/verify/poc/H-*.t.sol) or differential candidate (verify/diff/H-*_candidate.py) …
- Distinctive: line 200
Run autonomously: do NOT stop and ask the user to run the next stage — you run it.
“Common” is measured: kept by at least 6 in 10 of the 5 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.
Files
/sc-audit — Autonomous Audit Orchestrator
Runs a full security audit of the target repository end-to-end in a single
invocation. You (the model) drive every stage yourself — the deterministic Python
steps AND the reasoning steps (the protocol model, the hypotheses, the PoCs) — in
one continuous flow, without pausing for user input between stages. Report
progress at each stage transition so the user can see what's happening, exactly
like the understand skill.
Guiding principle: breadth of hypotheses, but only PoC-backed findings reach the report. Priority is low false positives.
Progress Reporting (REQUIRED — mirror understand)
At the start of every stage, print a status line:
[Stage N/7] <stage name>...
When a stage finishes, confirm in one line:
Stage N complete. <one-line result summary>
Example:
[Stage 1/7] Chunking the codebase...
Stage 1 complete. 13 chunks from 2 contracts, 10/10 functions covered.
[Stage 2/7] Modeling protocol & invariants...
Stage 2 complete. 7 invariants (2 critical), 1 privileged role.Keep these lines short. They are the user's only window into a long run — never go silent for a whole stage.
Phase 0 — Pre-flight
- Resolve the target. Parse
$ARGUMENTSfor the first non-flag token → the repo/dir to audit. If relative, resolve against the current working directory. Verify it exists and is a directory (test -d); if not, tell the user and STOP. If no path is given, use the current working directory. Call itTARGET. - Locate the pipeline driver. Use this skill's own scripts (installed copy):
The driver self-locates the siblingDRIVER="$HOME/.claude/skills/sc-audit/scripts/run_pipeline.py" [ -f "$DRIVER" ] || DRIVER="$(dirname "$0")/scripts/run_pipeline.py" DRIVER_DIR="$(dirname "$DRIVER")" # sibling worker scripts live under ../sc-*/scriptssc-*skills, so it works from any cwd. - Check Foundry.
python "$DRIVER" "$TARGET" --statusshows whether forge is available. If not, exploit PoCs will be markedneeds-execution(differential math still runs); note this to the user but continue. - Honor
--phase. If the user passed--phase X, run only that phase and stop (manual mode). Otherwise run the full autonomous flow below.
Announce: "I'm running the ProofHound audit pipeline on <TARGET> — 7 stages, every finding PoC-backed."
The autonomous run (do all of this, in order, without stopping)
[Stage 1/7] Chunking the codebase
Run the deterministic structural batch (chunk → signals → graph → math-scan):
python "$DRIVER" "$TARGET" --phase structuralCheck the sc-ingest coverage gate in the output. If functions were missed, note it. Summarize: chunks, contracts, coverage.
[Stage 2/7] Modeling protocol & invariants
Produce <TARGET>/.audit/project-map.json — actors, trust model, privileged roles
with by_design, money flow, and the protocol invariants INV-N (the backbone
for low false positives). Choose by contract count:
- Few contracts: inline. Read the top entry points +
signals.jsonand write the map yourself. - Many contracts: fan-out per module:
Spawn an sc-map-worker perpython "$DRIVER_DIR/../sc-map/scripts/batch_modules.py" "$TARGET/.audit" --size 3map/batches/batch-NNN.jsonin parallel (partial maps →map/_partials/). Progress:Modeling module batch X/N. Then reconcile:
Finally, do a SHORT inline pass to add cross-contract / protocol-levelpython "$DRIVER_DIR/../sc-map/scripts/merge_maps.py" "$TARGET/.audit" --name "<Protocol>"INV-Nthe per-module workers couldn't see (merge flags this inopen_questions).
Summarize: invariant count by criticality, privileged roles.
[Stage 3/7] Extracting the math spec
Do the sc-spec work: read the docs/NatSpec and spec/math-candidates.json,
then WRITE <TARGET>/.audit/spec/math-spec.json (+ reference models if docs give
formulas). If there are no docs, set degraded_mode: true and emit property
invariants. Promote any doc invariants into project-map.json. Summarize: formulas
captured / degraded, references verified.
[Stage 4/7] Dependency graphs & routing
The graphs were built in Stage 1; now route hypotheses and build the Foundry workspace:
python "$DRIVER" "$TARGET" --phase routeSummarize: routed classes, deterministic seed count, workspace built (or degraded).
[Stage 5/7] Generating hypotheses
Do the sc-hypothesize reasoning on top of the seeds. Choose by size (this is what makes large protocols tractable):
- Small (≲ 40 routed functions): inline. Apply the routed
audit-*checklists to the routed chunks yourself, then run the free-exploration pass. - Large: fan-out to parallel workers (the
understand-style scaling path):
For eachpython "$DRIVER_DIR/../sc-hypothesize/scripts/batch_chunks.py" "$TARGET/.audit" --size 15batch-NNN.json, spawn an sc-hypothesis-worker subagent in parallel with that batch file. Report progress per batch:Analyzing batch X/N. When all finish, merge:
(python "$DRIVER_DIR/../sc-hypothesize/scripts/merge_hypotheses.py" "$TARGET/.audit"$DRIVER_DIR= the dir of run_pipeline.py; the worker scripts are siblings.) - Free-exploration (both paths): run an attacker-mindset analysis with NO
checklist — prefer spawning subagent(s), optionally several with different
personas (economic / griefer / MEV / governance) — targeting each critical/high
INV-Nwith protocol-specific logic, composition, and edge cases. This is where novel bugs come from; spend real effort. - Dedup + triage: set
triage.decisionon every hypothesis; reject unreachable/by-design/non-falsifiable ones WITH a reason (keep them on disk).
Summarize: hypotheses kept vs rejected, by source (and batch count if fan-out).
[Stage 6/7] Verifying with proofs
First consolidate + rank the hypotheses into a scored worklist (the orchestrator does this automatically in the verify phase; or run it explicitly):
python "$DRIVER_DIR/../sc-hypothesize/scripts/consolidate.py" "$TARGET/.audit"hypotheses/consolidated.json → verify_worklist is the ranked list of candidate
functions. Work it TOP-DOWN — author/execute PoCs for the highest-scoring
candidates first so no high-value bug is left unverified when effort runs out. This
is the fix for the "real bug buried in 177 hypotheses" failure.
Then author a PoC per kept hypothesis, in worklist order, and execute centrally. Choose by count:
- Few kept: inline. Write each prosecutor PoC
(
<TARGET>/.audit/verify/poc/H-*.t.sol) or differential candidate (verify/diff/H-*_candidate.py) plus the defender's mitigation check yourself. - Many kept: fan-out the authoring (execution stays central):
For eachpython "$DRIVER_DIR/../sc-verify/scripts/batch_verify.py" "$TARGET/.audit" --size 4verify/batches/batch-NNN.json, spawn an sc-verify-worker subagent in parallel to author its PoCs (no execution). Progress:Writing PoCs, batch X/N. - Execute once (single verdict authority):
For a target that is its own Foundry project, PoCs may instead run in its ownpython "$DRIVER" "$TARGET" --phase verifytest/so remappings/lib resolve. A finding is confirmed ONLY with a green proof.
Summarize: confirmed / rejected (and batch count if fan-out).
[Stage 7/7] Assembling the report
python "$DRIVER" "$TARGET" --phase report --name "<Protocol>"Then polish the prose in <TARGET>/.audit/report/report.md (executive summary,
code-specific recommendations). Summarize: confirmed findings by severity.
Final message to the user
Print a compact result:
- confirmed findings by severity,
- open items needing their input,
- invariant coverage (tested / total),
- the path to
<TARGET>/.audit/report/report.md, - and the honest limitations below.
Honest limitations (always surface)
- Heuristic Solidity parsing (no full AST): assembly, function pointers,
using for, and unusual formatting can degrade chunking/graphs. - The isolated Foundry workspace handles dependency-free targets; a real project
with external libs runs PoCs best in its own
test/. - Checklists encode known classes; novel logic relies on the free-exploration pass — strong but not exhaustive. This is a high-precision force-multiplier for a human auditor, not a replacement.
Notes
- Run autonomously: do NOT stop and ask the user to run the next stage — you run it. The driver may print "NEXT (LLM gate)"; that is YOUR cue to do the reasoning step inline and continue, not to hand back to the user.
- Re-run safety: don't re-run
structural/routeafter hypotheses are expanded (routing re-seeds). For a fresh audit, start clean. --phase Xgives manual single-step control when the user wants it.
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
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.

