Command Palette

Search for a command to run...

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

sc-audit

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

Deep security audit of a smart-contract repo OR a live on-chain contract by address - detect Solidity, model the protocol invariants and trust boundaries…

aeonfunот aeonfun★ 801 звезда на GitHub

Об этом скилле

${var} - Target selector. Four forms:

  • `` (empty) -> auto-select the day's fresh feed target, audit only if it contains Solidity, else exit clean. See §S1 for the selection order (an optional sc-targets.json ledger, else the github-trending feed).
  • owner/repo -> audit that GitHub repo (e.g. Uniswap/v4-core, aave/aave-v3-origin).
  • <chain>:0x<address> -> on-chain mode: audit a live deployed contract by address. It fetches the verified source from the block explorer (Etherscan V2) or Sourcify, materializes it as a Foundry project, and runs the same pipeline - plus on-chain context (proxy/implementation, owner/admin, funds at risk). chain in eth/base/arbitrum/optimism/polygon/bsc/... (bare 0x<address> defaults to eth). Examples: base:0x4200000000000000000000000000000000000006, eth:0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2. On-chain findings are operator-gated - never auto-filed/auto-emailed (see §S7). See §S1/§S2.
  • fixture:<name> -> local regression mode: audit the bundled fixture at skills/sc-audit/fixtures/<name>/ (e.g. fixture:vault). No fork, no dedup, no disclosure - a self-contained way to exercise the whole pipeline including the fuzz arm, with no external repo. See §S1/§S2.

Today is ${today}. Read memory/MEMORY.md and the last 30 days of memory/logs/ before starting.

Why this skill exists

Smart-contract bugs are logic and economics, not syntax. Slither matches known static patterns; it is weak on access control, protocol invariants, oracle/price manipulation, rounding/precision, upgradeability storage collisions, and cross-contract reentrancy - the classes that actually drain funds, and where exploitation on-chain is immediate and irreversible. That whole class is what an agentic reviewer catches by reading the source and reasoning about who can call what and which invariant breaks.

This skill is the contract arm split out of vuln-scanner. vuln-scanner detects Solidity and hands the repo here rather than running Slither inline; this skill owns the deep audit and then routes findings through vuln-scanner's shared disclosure machinery. It does not duplicate the disclosure/PVR/email logic - see §S7.

It audits two kinds of target: a GitHub repo (source in a repo you fork), and a live contract deployed on-chain by address (<chain>:0x<addr>) - the latter fetches the verified source from the block explorer/Sourcify and adds on-chain context (proxy/implementation, owner, funds at risk). A live deployed contract is where a bug is already exploitable with real money at stake, so on-chain findings are treated as the highest-stakes disclosure and are operator-gated - staged for a human, never auto-filed (§S7).

The agentic source pass is the reliable core. Slither is best-effort: a headless run has slither allow-listed but not solc / forge / solc-select, so contracts that need a compiler to build may not compile in-run. The source pass needs no compiler, so a clean audit never depends on Slither succeeding.

S1. Detect Solidity and select the target

Shell shape. Each Bash call is one allowed command (pipes are fine). The run refuses a call that sets a variable (REPO=..., WORKDIR="$(git rev-parse ...)", SOL_FILES=$(find ...)), starts with export, uses if / case / [ ... ] tests, or joins commands with ;, && or ||, and each refusal costs a model turn. find, cp, rm, tr, printf and command -v are not allowed commands either. So this skill makes its decisions in prose from what each call printed, writes every value it already knows (<REPO>, <WORKDIR>, <SCRATCH>, <CHAIN>, <CID>, <ADDR>, <PROJ>, ...) into later commands literally in place of the placeholder, and writes or appends sources.txt lines with Write/Edit. Shell variables never carried over between Bash calls anyway (each call is a fresh shell; only the working directory carries over).

Parse the selector in your head, not in a shell script. REPO = ${var}, one of: owner/repo | empty (auto) | fixture: | :0x | 0x.

  • Starts with fixture: -> MODE=fixture, FIXTURE = the text after fixture:.

  • Matches ^([a-zA-Z0-9-]+:)?0x[0-9a-fA-F]{40}$ -> MODE=onchain (deployed-contract selector).

  • Anything else -> MODE=repo (owner/repo, or empty -> auto-select).

  • MODE=fixture -> audit the bundled fixture skills/sc-audit/fixtures/<FIXTURE>/ (see §S2). Skip the dedup ledger and skip disclosure entirely (§S7/§S8) - fixtures are deliberately-vulnerable regression targets meant to be re-run on demand, never disclosed. If the fixture dir is missing, log no-fixture: <FIXTURE> and exit clean.

  • MODE=repo, REPO set -> that is the target. Confirm it holds Solidity before forking, one call with REPO written in literally: gh api "search/code?q=repo:<REPO>+extension:sol" --jq '.total_count' (or just proceed and detect after clone in S2).

Полный SKILL.md на GitHub

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

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

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

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

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

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

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

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

README.mdreferences/hook-checklist.md

FAQ

Что делает скилл sc-audit?

Deep security audit of a smart-contract repo OR a live on-chain contract by address - detect Solidity, model the protocol invariants and trust boundaries first, run Slither (best-effort) plus a bounded agentic pass that hunts for a path breaking each invariant, triage, adversarially verify, prove with a fuzzer, and drive each finding through the shared responsible-disclosure routing. The dedicated contract arm split out of vuln-scanner.

Как установить скилл sc-audit?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл sc-audit запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

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

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