agentleFS
sanbirsanbir/solidity-auditor-skills/solidity-auditor/SKILL.md

solidity-auditor

Skill34 starsChanged 8 months agoMITView on GitHub

Security audit of Solidity code while you develop. Trigger on "audit", "check this contract", "review for security". Modes - default (full repo), DEEP (+ DeFi protocol agent), or a specific filename.

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 x-ray.

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

    x-ray

    Generates an x-ray.md pre-audit report covering overview, enhanced threat model (protocol-type profiling, git-weighted attack surfaces, temporal risk analysis, composability dependency mapping), invariants, integrations, docs quality, test analysis, and developer/git history. Triggers on 'x-ray', 'audit readiness', 'readiness report', 'pre-audit report', 'prep this protocol', 'protocol prep', 'summarize this protocol'.

    Also in 3 projects that use this

  • Other versions6 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 3

    1. Gabson0x/bountyforge★ 43123% same
    2. chasebrownn/claude-skills★ 092% same
    3. conjure-3301/skills★ 092% same

    Wrote their own version · 3

    1. pashov/skills★ 1.3ksame name
    2. schwepps/skills★ 16same name
    3. DROOdotFOO/agent-skills★ 1same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repositoryOne other file it gives its agents.

The file

We split this skill into the rules it gives an agent

7 rules. 2 are common, 1 is distinctive, and 4 are very specific to this project.

  • 2

    Common

    Most of the 5 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 4

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If a .pashov-skills-constraints.yaml file exists in the repository root, the orchestrator reads it during discovery and includes it in …

    line 24
  2. Very specific:

    If the remote VERSION fetch succeeds and differs from local, print ⚠️ You are not using the latest version.

    line 49
  3. Very specific:

    If constraints were found in Turn 1, prepend a ## Constraints section containing the raw YAML content to every bundle.

    line 69
  4. Distinctive:

    Check for composite chains: if finding A's output feeds into B's precondition AND combined impact is strictly worse than either alone, add …

    line 89
  5. Very specific:

    Gate evaluation: Run each deduplicated finding through the four gates in judging.md (do not skip or reorder).

    line 91
  6. Common:

    No deployer-intent reasoning — evaluate what the code _allows_, not how the deployer _might_ use it.

    line 98
  7. Common:

    Before doing anything else, print this exactly:

    line 106

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

Smart Contract Security Audit

You are the orchestrator of a parallelized smart contract security audit.

Mode Selection

Exclude pattern: skip directories interfaces/, lib/, mocks/, test/ and files matching *.t.sol, *Test*.sol or *Mock*.sol.

  • Default (no arguments): scan all .sol files using the exclude pattern. Use Bash find (not Glob).
  • deep: same scope as default, but also spawns the DeFi protocol agent (Agent 9, opus). Use for thorough reviews. Slower and more costly.
  • $filename ...: scan the specified file(s) only.

Flags:

  • --file-output (off by default): also write the report to a markdown file (path per {resolved_path}/report-formatting.md). Never write a report file unless explicitly passed.

Constraints (optional)

If a .pashov-skills-constraints.yaml file exists in the repository root, the orchestrator reads it during discovery and includes it in every agent bundle. Agents use declared constraints to fast-track Skip classification during triage. Constraints describe factual codebase properties, not security assumptions. Code overrides constraints.

Supported fields (all optional, unknown fields ignored):

tokens: [USDC, WETH]              # accepted token list (skip exotic-token vectors if set)
standards: [ERC20]                 # implemented standards (skip unlisted standard vectors)
cross_chain: false                 # no bridge/LayerZero/cross-chain logic
proxy_pattern: none                # none | transparent | uups | diamond | beacon
oracle: chainlink                  # chainlink | twap | pyth | custom | none
account_abstraction: false         # no ERC-4337 / smart account logic

Orchestration

Turn 1 — Discover. Print the banner, then make these parallel tool calls in one message:

a. Bash find for in-scope .sol files per mode selection b. Glob for **/references/attack-vectors/attack-vectors-1.md — extract the references/ directory (two levels up) as {resolved_path} c. ToolSearch select:Agent d. Read the local VERSION file from the same directory as this skill e. Bash curl -sf https://raw.githubusercontent.com/sanbir/solidity-auditor-skills/main/solidity-auditor/VERSION f. Bash mktemp -d /tmp/audit-XXXXXX — store as {bundle_dir} g. Read .pashov-skills-constraints.yaml from the repository root (if not found, continue without constraints)

If the remote VERSION fetch succeeds and differs from local, print ⚠️ You are not using the latest version. Please upgrade for best security coverage. See https://github.com/sanbir/solidity-auditor-skills. If it fails, skip silently.

Turn 2 — Prepare. In one message, make parallel tool calls: (a) Read {resolved_path}/report-formatting.md, (b) Read {resolved_path}/judging.md.

Then build all bundles in a single Bash command using cat (not shell variables or heredocs):

  1. {bundle_dir}/source.md — ALL in-scope .sol files, each with a ### path header and fenced code block.
  2. Agent bundles = source.md + per-agent bundles with cat:
BundleAppended files (relative to {resolved_path})
agent-1-bundle.mdattack-vectors/attack-vectors-1.md + attack-vectors/attack-vectors-2.md + attack-vectors/attack-vectors-3.md + attack-vectors/attack-vectors-4.md + attack-vectors/attack-vectors-5.md + hacking-agents/vector-scan-agent.md + hacking-agents/shared-rules.md
agent-2-bundle.mdhacking-agents/math-precision-agent.md + hacking-agents/shared-rules.md
agent-3-bundle.mdhacking-agents/access-control-agent.md + hacking-agents/shared-rules.md
agent-4-bundle.mdhacking-agents/economic-security-agent.md + hacking-agents/shared-rules.md
agent-5-bundle.mdhacking-agents/execution-trace-agent.md + hacking-agents/shared-rules.md
agent-6-bundle.mdhacking-agents/invariant-agent.md + hacking-agents/shared-rules.md
agent-7-bundle.mdhacking-agents/periphery-agent.md + hacking-agents/shared-rules.md
agent-8-bundle.mdhacking-agents/first-principles-agent.md + hacking-agents/shared-rules.md

If constraints were found in Turn 1, prepend a ## Constraints section containing the raw YAML content to every bundle.

Print line counts for every bundle and source.md. Do NOT inline file content into agent prompts.

Turn 3 — Spawn. In one message, spawn all agents as parallel foreground Agent calls. Always spawn Agents 1–8 with model: "sonnet". Only spawn Agent 9 when the mode is DEEP.

  • Agents 1–8 — spawn with model: "sonnet". Prompt template (substitute real values):
Your bundle file is {bundle_dir}/agent-N-bundle.md (XXXX lines).
The bundle contains all in-scope source code and your agent instructions.
Read the bundle fully before producing findings.
  • Agent 9 (DeFi protocol analysis, DEEP only) — spawn with model: "opus". Receives the in-scope .sol file paths and the instruction: your reference directory is {resolved_path}. If constraints were found in Turn 1, also include: the constraints file is at .pashov-skills-constraints.yaml in the repository root. Read {resolved_path}/hacking-agents/defi-protocol-agent.md for your full instructions.

Turn 4 — Deduplicate, validate & output. Single-pass: deduplicate all agent results, gate-evaluate, and produce the final report in one turn. Do NOT print an intermediate dedup list — go straight to the report.

  1. Deduplicate. Parse every FINDING and LEAD from all agents. Group by group_key field (format: Contract | function | bug-class). Exact-match first; then merge synonymous bug_class tags sharing the same contract and function. Keep the best version per group, number sequentially, annotate [agents: N].

    Check for composite chains: if finding A's output feeds into B's precondition AND combined impact is strictly worse than either alone, add "Chain: [A] + [B]" at confidence = min(A, B). Most audits have 0–2.

  2. Gate evaluation. Run each deduplicated finding through the four gates in judging.md (do not skip or reorder). Evaluate each finding exactly once — do not revisit after verdict.

    Single-pass protocol: evaluate every relevant code path ONCE in fixed order (constructor → setters → swap functions → mint → burn → liquidate). One-line verdict per path: BLOCKS, ALLOWS, IRRELEVANT, or UNCERTAIN. Commit after all paths — do not re-examine. UNCERTAIN = ALLOWS.

  3. Lead promotion & rejection guardrails.
    • Promote LEAD → FINDING (confidence 75) if: complete exploit chain traced in source, OR [agents: 2+] demoted (not rejected) the same issue.
    • [agents: 2+] does NOT override a concrete refutation — demote to LEAD if refutation is uncertain.
    • No deployer-intent reasoning — evaluate what the code allows, not how the deployer might use it.
  4. Fix verification (confidence ≥ 80 only): trace the attack with fix applied; verify no new DoS, reentrancy, or broken invariants (use safeTransfer not require(token.transfer(...))); list all locations if the pattern repeats. If no safe fix exists, omit it with a note.
  5. Format and print per report-formatting.md. Exclude rejected items. If --file-output: also write to file.

Banner

Before doing anything else, print this exactly:


███████╗ ██████╗ ██╗     ██╗██████╗ ██╗████████╗██╗   ██╗
██╔════╝██╔═══██╗██║     ██║██╔══██╗██║╚══██╔══╝╚██╗ ██╔╝
███████╗██║   ██║██║     ██║██║  ██║██║   ██║    ╚████╔╝
╚════██║██║   ██║██║     ██║██║  ██║██║   ██║     ╚██╔╝
███████║╚██████╔╝███████╗██║██████╔╝██║   ██║      ██║
╚══════╝ ╚═════╝ ╚══════╝╚═╝╚═════╝ ╚═╝   ╚═╝      ╚═╝
       █████╗ ██╗   ██╗██████╗ ██╗████████╗ ██████╗ ██████╗
      ██╔══██╗██║   ██║██╔══██╗██║╚══██╔══╝██╔═══██╗██╔══██╗
      ███████║██║   ██║██║  ██║██║   ██║   ██║   ██║██████╔╝
      ██╔══██║██║   ██║██║  ██║██║   ██║   ██║   ██║██╔══██╗
      ██║  ██║╚██████╔╝██████╔╝██║   ██║   ╚██████╔╝██║  ██║
      ╚═╝  ╚═╝ ╚═════╝ ╚═════╝ ╚═╝   ╚═╝    ╚═════╝ ╚═╝  ╚═╝

  328 attack vectors · 8 specialized agents · DeFi protocol analysis

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.