Run a structured per-function Solidity audit with design-decision capture, staged analysis, and human-reviewed finding triage. Use this when auditing Foundry-style projects under src/**/*.sol.
Use this skill to perform a full per-function security audit for Solidity projects with a staged workflow and file-based outputs.
src/**/*.solrg, find, sed, awk, mkdir) for discovery and report generationCreate and maintain:
mkdir -p docs/audit/function-audit/{stage0,stage1,stage2,stage3,review}
Expected outputs:
docs/audit/function-audit/stage0/design-decisions.mddocs/audit/function-audit/stage0/slither-findings.md (if available)docs/audit/function-audit/stage1/state-variables.mddocs/audit/function-audit/stage1/access-control.mddocs/audit/function-audit/stage1/external-calls.mddocs/audit/function-audit/stage2/domain-*.mddocs/audit/function-audit/stage3/state-consistency.mddocs/audit/function-audit/stage3/math-rounding.mddocs/audit/function-audit/stage3/reentrancy-trust.mddocs/audit/function-audit/stage3/adversarial-sequences.mddocs/audit/function-audit/review/review-responses.mddocs/audit/function-audit/review/re-evaluation.md (conditional)docs/audit/function-audit/INDEX.mddocs/audit/function-audit/SUMMARY.mdPROJECT_PATH from user argument; default to current working directory.docs/audit/function-audit/ exists, ask user whether to archive, overwrite, or cancel.rg) before full-file reads.resources/REVIEW_PROMPTS.md stage-0 guidance.stage0/design-decisions.md using the template in resources/REVIEW_PROMPTS.md.which slither.stage0/slither-findings.md.Read resources/STAGE_PROMPTS.md and produce:
stage1/state-variables.mdstage1/access-control.mdstage1/external-calls.mdFor each confirmed domain:
resources/FUNCTION_TEMPLATE.md.stage2/domain-{slug}.md file per domain.Produce 4 dedicated reports using the stage-3 guidance in resources/STAGE_PROMPTS.md:
review/review-responses.md.If there are DISPUTED/DISCUSS entries:
review/re-evaluation.md.INDEX.md with links and counts per report.SUMMARY.md with:Severity:
Verdict:
resources/; keep this file focused on process.Read these files when executing this skill:
resources/STAGE_PROMPTS.mdresources/REVIEW_PROMPTS.mdresources/FUNCTION_TEMPLATE.mdresources/EXAMPLE_OUTPUT.md