---
name: "echidna-solidity-fuzzing-engine"
description: "Fuzz smart contract invariants and property assertions with Echidna fuzzing engine."
metadata:
  author: "Trail of Bits"
  version: "1.0.0"
  runtime_compatibility:
    - "codex"
    - "claude-code"
    - "cursor"
    - "windsurf"
triggers:
  - "fuzz smart contract echidna"
  - "write echidna invariant test"
  - "configure echidna.yaml"
permissions:
  fs_read: true
  fs_write: "workspace"
  shell_exec: false
  net_access: false
---

# Echidna Property-Based Smart Contract Fuzzer

Tests Ethereum smart contracts with Trail of Bits Echidna: defining Boolean invariant properties (echidna_*), property-based fuzz testing, coverage-guided input generation, and test corpus minimization.

## When to Invoke
Invoke this skill whenever you need to:
- fuzz smart contract echidna
- write echidna invariant test
- configure echidna.yaml

## Execution SOP & Rules
1. Write invariant functions prefixed with echidna_ returning a Boolean (e.g. echidna_balance_under_limit).
2. Configure echidna.yaml with testLimit: 50000 and corpusDir: 'corpus'.
3. Run fuzzing with echidna . --contract TestContract --config echidna.yaml.
4. Analyze failed invariant transaction traces to identify the sequence of calls triggering violations.

## Verification Checklist
- Run local linting, syntax validation, and type-checks before reporting completion.
- Ensure all created or modified files adhere to workspace boundaries and avoid uncommitted secrets.
- Verify tests or build commands exit cleanly with return code 0.
