Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

web3-audit

БесплатноБез исполняемых скриптовНе проверен

Smart contract security audit for Immunefi bug bounty. Analyzes Solidity contracts on EVM chains using Slither + Foundry. Covers access control, reentrancy…

mswellот 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/rg via Bash)
  • Glob tool for file discovery (NOT find/ls via Bash)
  • Read tool for file reading (NOT cat/head/tail via 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

  1. In-scope contracts: Read src/ or contracts/ — these are the target
  2. Library dependencies: lib/, node_modules/@openzeppelin/ — reference only, not audited
  3. Solidity version: Check pragma solidity — versions <0.8.0 have native overflow/underflow risk
  4. Proxy patterns: Search for delegatecall, ERC1967, TransparentUpgradeableProxy, UUPSUpgradeable
  5. Contract count and inheritance tree: Map which contracts inherit from which

Step 6: Initial Assessment

Using Grep/Glob/Read:

  1. Read README/docs for protocol description, tokenomics, design decisions
  2. Count in-scope contracts and total Solidity LOC
  3. Identify protocol type (lending, DEX, bridge, staking, governance, vault — needed for Phase 6)
  4. 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:

  1. Phase 0: Run setup yourself (NOT delegated).
  2. Wave 1: Launch 3 Agent calls 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
  3. Wave 2: Launch contract-auditor with all Wave 1 findings + references/foundry-poc-templates.md. Generate PoCs for each confirmed finding.
Полный SKILL.md на GitHub

Установить web3-audit в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

references/defi-attack-vectors.mdreferences/foundry-poc-templates.mdreferences/immunefi-report-template.mdreferences/slither-detector-guide.mdreferences/solidity-vulnerability-patterns.md

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), без исполняемых скриптов.

Похожие скиллы

Сравнить web3-audit с