autopilot
Run autonomous hunt loop on a target — scope check → recon → rank surface → hunt → validate → report with configurable checkpoints. Usage: /autopilot…
Smart contract security audit — runs through 10 bug class checklist (accounting desync, access control, incomplete path, off-by-one, oracle errors, ERC4626, reentrancy, flash loan, signature replay, proxy/upgrade). Applies pre-dive kill signals first. Generates Foundry PoC
> /plugin marketplace add elementalsouls/Claude-BugHunter > /plugin install claude-bughunter@elementalsouls
How it fires
How this command gets triggered: by you, by Claude, or both.
/web3-auditContext preview
What this command does when you run it.
Smart contract security audit — runs through 10 bug class checklist (accounting desync, access control, incomplete path, off-by-one, oracle errors, ERC4626, reentrancy, flash loan, signature replay, proxy/upgrade). Applies pre-dive kill signals first. Generates Foundry PoC
name: web3-audit description: Smart contract security audit — runs through 10 bug class checklist (accounting desync, access control, incomplete path, off-by-one, oracle errors, ERC4626, reentrancy, flash loan, signature replay, proxy/upgrade). Applies pre-dive kill signals first. Generates Foundry PoC template for confirmed findings. Usage: /web3-audit <contract.sol>
Smart contract security audit using the 10-bug-class methodology.
/web3-audit VulnerableContract.sol /web3-audit https://github.com/protocol/contracts /web3-audit [paste contract code]
ALWAYS check these BEFORE reading any code:
1. TVL < $500K → max payout too low for effort → SKIP 2. 2+ top-tier audits (Halborn, ToB, Cyfrin, OZ) on simple protocol → SKIP 3. Protocol < 500 lines, single A→B→C flow → minimal attack surface → SKIP 4. max_payout = min(10% × TVL, program_cap) → if < $10K → SKIP Formula: Is [TVL * 10%] > [hours I'll spend * hourly rate]? If not, skip.
Only proceed if score >= 6/10:
# Find accounting variables grep -rn "totalSupply\|totalShares\|totalAssets\|totalDebt\|cumulativeReward" contracts/ # Find ALL early returns in critical functions grep -rn "\breturn\b" contracts/ -B3 | grep -B3 "if\b"
Check: For each early return in claim/redeem/withdraw functions:
# Sibling function families — do ALL have same modifier set?
grep -rn "function vote\|function poke\|function reset\|function update\|function claim\|function harvest" contracts/ -A2
# Ownership check: existence vs ownership
grep -rn "_requireOwned\|ownerOf\|_isApprovedOrOwner" contracts/ -B5
# Silent modifiers (if without revert)
grep -rn "modifier\b" contracts/ -A8 | grep -B3 "if (" | grep -v "require\|revert"
# Uninitialized proxy
grep -rn "function initialize\b" contracts/ -A3
grep -rn "_disableInitializers()" contracts/Check: Does EVERY sibling function in a family have the SAME modifiers?
The function family comparison test:
1. List all state changes in function A (deposit/place/create) 2. List all state changes in function B (withdraw/update/cancel) 3. For each state change in A: does B have the corresponding reverse? 4. For each token transfer in A: does B have the corresponding refund?
grep -rn "safeApprove\b" contracts/ # safeApprove without zero-reset? grep -rn "delete\b" contracts/ -B5 # delete before operation completes? grep -rn "function deposit\|function mint\|function withdraw\|function redeem" contracts/ -A10
Mental test: For EVERY `if (A > B)`: "What happens when A == B?" Is that correct?
# Boundary comparisons grep -rn "Period\|Epoch\|Deadline\|period\|epoch\|deadline" contracts/ -A3 | grep "[<>][^=]" # Loop breaks grep -rn "\bbreak\b" contracts/ -B10 # Array bounds grep -rn "\.length\s*-\s*1\|i\s*<=\s*.*\.length\b" contracts/
# Missing staleness check grep -rn "latestRoundData" contracts/ -A5 | grep -v "updatedAt\|timestamp" # Pyth confidence interval grep -rn "getPriceUnsafe\|getPrice\b" contracts/ -A8 | grep -v "conf\|confidence" # TWAP windows grep -rn "secondsAgo\|TWAP\|cardinality" contracts/ -A5
Check:
grep -rn "function deposit\|function mint\|function withdraw\|function redeem" contracts/ -A10 grep -rn "function transfer\|function transferFrom" contracts/ -A15
Check:
# Effects after interactions
grep -rn "\.call{value\|safeTransfer\|transfer(" contracts/ -B10 | grep -v "require\|revert"
# Missing nonReentrant
grep -rn "function withdraw\|function redeem\|function claim" contracts/ -A2 | grep -v "nonReentrant"Check: Does every function that transfers ETH or ERC20 follow CEI order? (Checks → Effects → Interactions)
grep -rn "getReserves\|getAmountsOut\|slot0\b" contracts/ -A5
Check: Any spot price reading from Uniswap reserves/slot0? → flash loan manipulatable.
grep -rn "ecrecover\|ECDSA\.recover" contracts/ -B20 grep -rn "nonce\|_nonces\|nonces\[" contracts/
Check: Does signed hash include: nonce + chainId + contract address?
grep -rn "function initialize\b\|_disableInitializers\|initializer" contracts/ grep -rn "delegatecall\b" contracts/ -B3 grep -rn "0x360894\|_IMPLEMENTATION_SLOT\|EIP1967" contracts/
Check:
Apply the 7-Question Gate:
1. Can I demonstrate this with a Foundry test? 2. What is the financial impact (quantify in $)? 3. Is this in the Immunefi scope? 4. Is it a known issue or acknowledged behavior? 5. Does my Foundry PoC actually run? (forge test -vvvv)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "
A self-contained Claude skill bundle for bug hunting and external red-team work · 83 skills · 15 slash commands · 681 disclosed-report patterns (433 now individually cited & auditable) across 24 core vulnerability classes · enterprise identity +
Repo: elementalsouls/Claude-BugHunter
Run autonomous hunt loop on a target — scope check → recon → rank surface → hunt → validate → report with configurable checkpoints. Usage: /autopilot…
Build an exploit chain — given bug A, finds B and C to combine for higher severity and payout. Knows common chain patterns: IDOR→ATO, SSRF→cloud metadata,…
Active vulnerability hunting. Two-track dispatcher — asks Red Team vs WAPT, hands off to hunt-dispatch skill and sibling commands. Usage: /hunt target.com |…
On-demand intelligence fetch for a target — CVEs, disclosed reports, new features. Pulls NVD/GitHub-Advisory CVEs + bundled disclosed reports + hunt memory…
Inspect or rotate the autopilot ledger JSONL files (findings.jsonl, negatives.jsonl). Caps file size and keeps N rotated backups so memory does not grow…
Pick up a previous hunt on a target — shows hunt history and untested surface from the autopilot ledger. Usage: /pickup target.com