agentleFS
zyphr-labszyphr-labs/bounty-harness/.claude/skills/web3-audit/SKILL.md

web3-audit

Skill1 starsChanged 3 months agoMITView on GitHub

Smart contract security audit — 10 DeFi bug classes (accounting desync, access control, incomplete path, off-by-one, oracle, ERC4626, reentrancy, flash loan, signature replay, proxy), pre-dive kill signals (TVL < $500K etc), Foundry PoC template, grep patterns for each class, and real Immunefi paid examples. Use for any Solidity/Rust contract audit or when deciding whether a DeFi target is worth hunting.

6 other projects use a version of this, 3 of them edited.

Adopted by

Most recently taken up by

Used with

Projects with it also use bb-methodology.

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.
  • awarexoneSkill

    bb-methodology

    Use at the START of any bug bounty hunting session, when switching targets, or when feeling lost about what to do next. Master orchestrator that combines the 5-phase non-linear hunting workflow with the critical thinking framework (developer psychology, anomaly detection, What-If experiments). Routes to all other skills based on current hunting phase. Also use when asking "what should I do next" or "where am I in the process.

    Also in 4 projects that use this

The file

We split this skill into the rules it gives an agent

1 rule. 1 is common, 0 are distinctive, and 0 are very specific to this project.

  • 1

    Common

    Most of the 6 edited versions we read keep these.

  • 0

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Common:

    No top-tier audit on current version: +2

    line 33

“Common” is measured: kept by at least 6 in 10 of the 6 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

WEB3 SMART CONTRACT AUDIT

Overview

10 bug classes. Pre-dive kill signals. Foundry PoC template. Real paid examples. This skill supports static source review of Solidity/Rust contracts (passive) and, with explicit scope, on-chain interaction (intrusive). Workflows run the static scanners; manual deep dives follow the per-class methodology.

Safety: local/static analysis is passive. Anything touching a live chain (fork tests, on-chain authority checks, PoC execution) is intrusive and requires program authorization + scope confirmation.

Quick Reference

Pre-dive kill signals (check BEFORE any code review)

  1. TVL < $500K → max payout capped too low for effort
  2. 2+ top-tier audits (Halborn, ToB, Cyfrin, OpenZeppelin) on simple protocol → bugs already found
  3. Protocol < 500 lines, single A→B→C flow → minimal attack surface
  4. Formula: max_realistic_payout = min(10% × TVL, program_cap) — if < $10K, skip

Soft kill: OZ/ToB/Cyfrin audit on current version + codebase > 500K LOC → expect 40+ hours for maybe 1 finding. Only proceed if bounty floor > $50K AND you have protocol-specific expertise.

Target scoring (go if >= 6/10):

  • TVL > $10M: +2
  • Immunefi program with Critical >= $50K: +2
  • No top-tier audit on current version: +2
  • < 30 days since deploy: +1
  • Protocol you've hunted before: +1
  • Source code + natspec comments: +1
  • Upgradeable proxies: +1

The one rule

"Read ALL sibling functions. If vote() has a modifier, check poke(), reset(), harvest(). The missing modifier on the sibling IS the bug."

Bug classes (with share of Criticals on Immunefi)

#ClassShare
1Accounting state desynchronization28% of Criticals
2Access control19% of Criticals
3Incomplete code path17% of Criticals
4Off-by-one / boundary22% of Highs
5Oracle / price manipulation12% of all reports
6ERC4626 vault attacks—
7Reentrancysince 2016
8Flash loan attacks—
9Signature replay—
10Proxy / upgrade issues—

Workflow Selection

SituationWorkflow
Static review of a contracts directoryaudit-contract
Token-specific rug-vector scan (EVM + Solana)token-scan
Foundry PoC templaterunbooks/foundry-poc.md
Deep dive per bug classrunbooks/bug-classes.md (grep patterns)

Available Workflows

audit-contract

Runs the class-pattern grep audit over a Solidity contracts directory (accounting desync, access control, incomplete path, off-by-one, oracle, ERC4626, reentrancy, signature replay, proxy). Passive — local files only.

python3 .claude/skills/web3-audit/scripts/sol_pattern_scan.py \
  --dir "${CONTRACTS_DIR:?Set CONTRACTS_DIR}" > $OUTDIR/web3/contract_scan.txt

token-scan

Runs the token red-flag scanner (8 meme-coin bug classes) over Solidity or Rust/Anchor token sources. Passive — regex analysis of local files only.

python3 .claude/skills/web3-audit/scripts/token_scanner.py \
  "${CONTRACTS_DIR:?Set CONTRACTS_DIR}" --recursive > $OUTDIR/web3/token_scan.txt

Evidence Required

ArtifactFile
Pattern-scan output grouped by bug class$OUTDIR/web3/contract_scan.txt
Token scanner report$OUTDIR/web3/token_scan.txt
Vulnerable code snippet with line numbersin finding report
Foundry PoC (chain interaction = intrusive)evidence/<finding>/poc.sol

References

  • Grep patterns per class: runbooks/bug-classes.md
  • Foundry PoC template + cheatcodes: runbooks/foundry-poc.md
  • Immunefi report format: reporting/platform-templates/immunefi.md
  • Real paid examples: Wormhole $10M (uninitialized UUPS proxy), Parity $150M frozen (no access control on initWallet)
  • Redaction policy: scan output stays local-only under $OUTDIR; redact any RPC URLs, keys, or addresses you consider sensitive before committing.

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.