agentleFS
Demeter-Financial-LabsDemeter-Financial-Labs/claude-solidity-security/skills/smart-contract-security/SKILL.md

smart-contract-security

Skill1 starsChanged 6 months agoMITView on GitHub

Use when auditing smart contracts for security vulnerabilities, verifying OWASP SCSVS compliance, or reviewing Solidity code for security issues. Covers all 11 SCSVS domains (S1–S11) with SCSTG testing methodology, static analysis tool integration (Slither, Mythril, Foundry), and dual-mode workflows for formal audits and quick inline reviews.

1 other project uses a version of this.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 1

    1. KaanBicaklar/mona-sast-skills★ 2same 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.

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

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

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

    Run scripts/slither-scan.sh <contract.sol> to get JSON findings

    line 42
  2. Very specific:

    Run scripts/parse-findings.py <slither-output.json> to map to SCSVS IDs

    line 43

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “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

Dual-mode security skill for Solidity smart contracts, grounded in the OWASP Smart Contract Security Verification Standard (SCSVS v0.0.1) and Smart Contract Security Testing Guide (SCSTG v0.0.1).

Mode Detection

Detect the user's intent from context:

SignalMode
"audit", "full review", "SCSVS report", "formal assessment"AUDIT — full pipeline
"check this", "review", "is this safe?", "quick look", specific vuln questionDEV — inline review
Paste of a contract without instructionsAsk: "Quick security check or full audit?"

Router — What to Read

TaskReference
Run a full formal auditreferences/audit-workflow.md
Quick inline code review / fixreferences/dev-workflow.md
Identify contract type and risk profilereferences/taxonomy.md
S1 Architecture & Threat Modelingreferences/domains/arch.md
S2 Policies & Code Managementreferences/domains/code.md
S3 Business Logic & Economic Securityreferences/domains/gov.md
S4 Access Controlreferences/domains/auth.md
S5 Secure Interactions (Contract-to-Contract)references/domains/comm.md
S6 Cryptographic Practicesreferences/domains/crypto.md
S7 Arithmetic & Logic Securityreferences/domains/arith.md
S8 Denial of Service (DoS)references/domains/dos.md
S9 Blockchain Data & State Managementreferences/domains/state.md
S10 Gas Usage, Efficiency & Limitationsreferences/domains/gas.md
S11 Component-Specific Securityreferences/domains/comp.md

Quick Capability Overview

Static Analysis:

  • Run scripts/slither-scan.sh <contract.sol> to get JSON findings
  • Run scripts/parse-findings.py <slither-output.json> to map to SCSVS IDs

Verification Levels:

  • L1 Basic Security — all contracts
  • L2 Moderate Security — DeFi protocols, contracts handling sensitive data
  • L3 High Assurance — mission-critical, large TVL, bridge/oracle infrastructure

SCSVS Domains Summary:

S1  ARCH   — Architecture, proxy patterns, threat modeling
S2  CODE   — Compiler, code quality, test coverage
S3  GOV    — Business logic, tokenomics, reentrancy
S4  AUTH   — RBAC, authorization, decentralized identity
S5  COMM   — External calls, oracles, cross-chain, bridges
S6  CRYPTO — Key management, signature verification, randomness
S7  ARITH  — Overflow/underflow, arithmetic integrity
S8  DOS    — Gas limits, resource exhaustion
S9  STATE  — State management, privacy, event logging, storage
S10 GAS    — Gas optimization, efficient design
S11 COMP   — Tokens (ERC20/721/1155), NFTs, vaults, staking, AMMs

Tool Integration

ToolPurposeCommand
SlitherStatic analysis (~80 detectors)scripts/slither-scan.sh
MythrilSymbolic execution, deep vuln detectionmyth analyze <file.sol>
Foundry/ForgeFuzz testing, unit testsforge test --fuzz-runs 10000
EchidnaProperty-based fuzzingechidna-test . --contract <Name>

Key Patterns to Always Check

  1. Reentrancy — CEI pattern + nonReentrant modifier (S3.3)
  2. tx.origin auth — must use msg.sender (S4.2.A1)
  3. delegatecall safety — storage layout collisions (S1.2.A3)
  4. Integer overflow — explicit type casts, unchecked{} blocks (S7.1)
  5. Oracle manipulation — flash loan attack vectors on price feeds (S7.2.A1)
  6. ERC20 approval race — set to 0 before updating allowance (S11.1)
  7. Signature malleability — use nonces, EIP-712, ECDSA.recover checks (S6.1.A2)
  8. Unbounded loops — gas DoS via dynamic arrays (S8.1.A3)

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.