A deterministic, evidence-gated EVM smart-contract audit Skill suite for Codex and ZCode.
It combines evidence-backed Project Analysis and Context Analysis, candidate-only Deep Audit, proof-gated findings, and confirmed-only reporting.
evm-audit-masteris the default entry point.- Evidence-backed Project Analysis routing keeps uncertainty visible.
- Only proven
CONFIRMEDfindings reach the Final Report.
Clone the suite and run the installer with your agent's name (zcode or
codex):
git clone https://github.com/iavl/evm-audit-skills
cd evm-audit-skills
./install.sh zcodeFor an existing checkout, run ./install.sh from that directory instead.
The script symlinks each Skill package into the agent's skills directory and
copies the ZCode worker agent files into ~/.zcode/agents/ as regular files
(ZCode does not register symlinked agent definitions). It is safe to re-run
and verifies the result; it refuses to replace entries it did not create. See
QUICKSTART.md for the focused start guide.
Open the local smart-contract project, or provide its repository URL.
Audit this smart-contract repository using evm-audit-master:
https://github.com/owner/repo
GitHub issue creation is opt-in. Ask the agent to file confirmed Medium+ findings only when you explicitly want issue creation.
Every stage and every worker agent runs on the host's default model. The
suite performs no stage-, agent-, or provider-level model or effort
selection: worker agent templates pin no model/thoughtLevel frontmatter,
and there is no per-run model profile artifact. To audit with a different
model, change the host/session model itself; the pipeline behavior is
otherwise identical.
On ZCode, the Master Skill fans the middle of the pipeline out to one worker
agent per Domain per stage — four stage-aligned waves (Domain Context on the
flash worker, Initial Review and Deep Audit on the deep worker, Proof on the
proof worker) with controller-owned merge barriers and confirmed-only
fan-in. The worker agent definitions are installed by
./install.sh zcode (a new ZCode session is required for them to register);
the audit itself never modifies your agent configuration. On Codex the same
workflow runs sequentially in one session — the runtime provides no
sub-agent dispatch, and no parallelism is simulated. Either way the evidence
gates are identical. See
Sequential and orchestrated execution.
Instead of asking one model to read the entire codebase and guess vulnerabilities, the audit progressively narrows a large security checklist into a small set of evidence-backed findings.
Project Analysis
→ Context Analysis
→ Initial Review
→ Deep Audit
→ Vulnerability Validation
→ Final Report
all security checks
│
▼
Project Analysis
│
▼
Context Analysis
│
▼
relevant checks
│
▼
Initial Review
/ \
proven irrelevant candidate
│
▼
Deep Audit
/ \
safe suspicious
│
▼
Vulnerability Validation
/ \
safe confirmed
│
▼
Final Report
| Public phase | Internal stage ID | What it does |
|---|---|---|
| Project Analysis | RECON, ROUTING |
Understands the audit scope, build environment, dependencies, protocol features, and applicable security checks. |
| Context Analysis | DOMAIN_RESOLUTION, DOMAIN_CONTEXT |
Resolves protocol-specific facts such as oracle usage, permissions, assets, and liquidation assumptions. |
| Initial Review | SCREEN |
Separates checks that are provably irrelevant from checks that require deeper investigation. |
| Deep Audit | DEEP_REVIEW |
Analyzes candidate vulnerabilities against real code paths, state transitions, invariants, and economic assumptions. |
| Vulnerability Validation | PROOF |
Uses traces, invariants, calculations, or PoCs to prove or disprove suspicious issues. |
| Final Report | REPORT |
Re-validates the audit state and reports only confirmed findings. |
The key rule throughout the pipeline is:
uncertain → investigate further
uncertain ≠ safe
This prevents incomplete analysis from silently becoming a clean audit. For a detailed walkthrough of every phase, see Audit Workflow.
UNKNOWN ≠ ABSENT
incomplete compilation
→ cannot establish trusted absence
Initial Review (`SCREEN`)
→ CANDIDATE or NOT_APPLICABLE_CONFIRMED
SUSPICIOUS
→ Vulnerability Validation (`PROOF`) required
CONFIRMED
→ Final Report only
stale artifacts
→ rejected
Uncertainty is never silently filtered, incomplete artifacts cannot claim a clean audit, and stale review artifacts are not reused. See Audit Runtime for implementation-level details.
Runs default to one managed output subtree inside the audited project:
/path/to/project/.evm-auditor-work/AUDIT-REPORT.md
Pass --output-dir <path> at initialization for a custom project-local or
external location (--run-dir remains a legacy alias). The managed subtree is
excluded from audit scope discovery, compilation fingerprints, source
snapshots, and PoC build-tree copies; everything outside it remains
authoritative input. AUDIT-REPORT.md contains only CONFIRMED findings;
supporting Project Analysis, Context Analysis, Initial Review, Deep Audit, and
Vulnerability Validation artifacts remain beside it. Users who do not want the
output appearing as untracked files may add .evm-auditor-work/ to their
.gitignore.
For a workspace with incompatible Solidity build profiles, initialize with a validated compilation plan:
python3 scripts/audit_run.py init <workspace> \
--audit-root <workspace> --build-root <workspace> \
--compilation-plan compilation-plan.jsonThe plan runs each declared target serially and aggregates coverage into one
lineage-bound Feature Map. A failed target or uncovered scope file keeps the
run conservative; it never becomes an absence or a reason to relabel
UNKNOWN as PRESENT.
Use evm-audit-master by default. When the audit scope is already known, use
an individual Domain Skill from the Skill Catalog.
For maintainers, contributors, and advanced users who want to understand or extend the repository.
- Audit Workflow
- Architecture
- Audit Runtime
- Project Analysis details
- Knowledge Evidence
- Knowledge Lineage
skills/— directly usable Skill packagesdata/— canonical security knowledgedomains/— Domain configurationscripts/— audit runtime and maintenance toolingevm_audit_runtime/— shared pure runtime logicschemas/— artifact schemasdocs/— architecture and runtime documentationdevelopment/— benchmarks and maintenance fixturestests/— runtime and regression tests
data/canonical-checks.json is the authoritative checklist source. Generated
Skill Markdown is derived output and should not be edited directly. See
Knowledge Maintenance for editing and
generation rules.
See the Development Guide.
The repository is licensed under the MIT License in LICENSE.
Source provenance and pinned upstream revisions are documented in
docs/knowledge-lineage.md.