web3-audit
БесплатноБез исполняемых скриптовНе проверенSmart contract security audit for Immunefi bug bounty. Analyzes Solidity contracts on EVM chains using Slither + Foundry. Covers access control, reentrancy…
от mswell★ 74 звезды на GitHubОб этом скилле
Web3 Smart Contract Audit Skill
Multi-phase security analysis of Solidity smart contracts for Immunefi bug bounty programs.
Rule #1: NO HALLUCINATION. Every finding MUST be backed by concrete code evidence (file path + line + snippet), a proven invariant violation, and a reproducible exploit path.
Rule #2: INVARIANT ANALYSIS MANDATORY. Identify what should NEVER break (e.g., "total supply == sum of balances", "user can always withdraw"), then prove it CAN break. No invariant violation = no finding.
Rule #3: BRAIN DUMP MANDATE. Before listing vulnerabilities, document reasoning, invariants tested, dead ends, and false positive eliminations.
Rule #4: Use Claude Code tools. Prefer Grep/Glob/Read tools over shell equivalents. Reserve Bash ONLY for: forge, slither, cast, chisel, mkdir.
Rule #5: QUALITY GATE. Every finding MUST have: (a) exact file:line reference, (b) code snippet, (c) exploit scenario with steps, (d) impact in USD terms or protocol damage description, (e) Foundry PoC or clear PoC path.
Tool Usage
Subagents MUST use Claude Code's dedicated tools:
- Grep tool for all text/pattern searches (NOT
grep/rgvia Bash) - Glob tool for file discovery (NOT
find/lsvia Bash) - Read tool for file reading (NOT
cat/head/tailvia Bash) - Bash tool ONLY for:
forge build,forge test,forge script,slither,cast,chisel,mkdir
Directory Exclusions
ALL searches MUST exclude: .git/, node_modules/, lib/forge-std/, lib/openzeppelin-contracts/, cache/, out/, artifacts/, typechain/, typechain-types/
Target: src/, contracts/, or project-specific source directories only. Library/dependency code is out of scope unless explicitly included.
Phase 0: Setup & Compilation
Goal: Validate tools, detect framework, compile contracts, identify scope. NOT delegated to subagents.
Step 1: Validate Tools
which slither && slither --version || echo "WARNING: slither not found"
which forge && forge --version || echo "FATAL: forge not found"
Slither is recommended but not blocking. Forge is REQUIRED.
Step 2: Detect Framework
| Indicator | Framework |
|---|---|
foundry.toml |
Foundry (preferred) |
hardhat.config.js / hardhat.config.ts |
Hardhat |
truffle-config.js |
Truffle |
brownie-config.yaml |
Brownie |
ape-config.yaml |
Ape |
If Hardhat/Truffle: check if Foundry config coexists. If not, use forge init --force to add Foundry support for PoC generation.
Step 3: Compile
forge build
If compilation fails, check remappings (remappings.txt or foundry.toml), Solidity version, and missing dependencies (forge install).
Step 4: Create Workspace
mkdir -p .web3-audit
Step 5: Identify Scope
- In-scope contracts: Read
src/orcontracts/— these are the target - Library dependencies:
lib/,node_modules/@openzeppelin/— reference only, not audited - Solidity version: Check
pragma solidity— versions<0.8.0have native overflow/underflow risk - Proxy patterns: Search for
delegatecall,ERC1967,TransparentUpgradeableProxy,UUPSUpgradeable - Contract count and inheritance tree: Map which contracts inherit from which
Step 6: Initial Assessment
Using Grep/Glob/Read:
- Read README/docs for protocol description, tokenomics, design decisions
- Count in-scope contracts and total Solidity LOC
- Identify protocol type (lending, DEX, bridge, staking, governance, vault — needed for Phase 6)
- Map external dependencies (Chainlink, Uniswap, Aave, etc.)
Subagent Orchestration
Delegate to parallel specialized subagents, then PoC and report sequentially.
Wave 1 (PARALLEL — launch all three in a single message):
├── contract-auditor agent → Phases 1 + 2 + 3 (Architecture + Access Control + Reentrancy)
├── contract-auditor agent → Phases 4 + 5 (DeFi Economic + Common Solidity Patterns)
└── security agent → Phases 6 + 7 (Protocol-Specific + Slither)
Wave 2 (SEQUENTIAL — after Wave 1 completes):
└── contract-auditor agent → Phase 8 (PoC Generation with Foundry)
Wave 3 (SEQUENTIAL — after Wave 2 completes):
└── report-writer agent → Phase 9 (Immunefi Report)
Steps:
- Phase 0: Run setup yourself (NOT delegated).
- Wave 1: Launch 3
Agentcalls in parallel. Provide each with:- Full phase instructions for their assigned phases
- Codebase path, Solidity version, protocol type from Phase 0
- Agent 1 (Phases 1+2+3):
references/solidity-vulnerability-patterns.md - Agent 2 (Phases 4+5):
references/defi-attack-vectors.md,references/solidity-vulnerability-patterns.md - Agent 3 (Phases 6+7):
references/slither-detector-guide.md, protocol type for Phase 6 specialization
- Wave 2: Launch
contract-auditorwith all Wave 1 findings +references/foundry-poc-templates.md. Generate PoCs for each confirmed finding.
Установить web3-audit в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл web3-audit?
Smart contract security audit for Immunefi bug bounty. Analyzes Solidity contracts on EVM chains using Slither + Foundry. Covers access control, reentrancy, DeFi economic exploits (flash loans, oracle manipulation, MEV), protocol-specific logic (lending, DEX, bridges, vaults), and generates Foundry fork PoCs. Every finding MUST have concrete evidence, invariant violation proof, and USD impact estimate.
Как установить скилл web3-audit?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл web3-audit запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic