agentleFS
MasriyanMasriyan/gemini-security-skills/skills/smart-contract-audit/SKILL.md

smart-contract-audit

Skill4 starsChanged 5 months agoMITView on GitHub

Smart contract and Web3 security audit skill for Solidity, Vyper, Move, and Cairo. Covers reentrancy, access control, oracle manipulation, MEV/sandwich exposure, signature replay, upgrade safety, ERC token edge cases, bridge risk, and DeFi invariants. Tooling includes Slither, Mythril, Echidna, Foundry, Halmo, Certora, and custom invariant tests. Use for design review, code audit, and incident analysis on contracts you own or are authorized to assess.

We split this skill into the rules it gives an agent

1 rule. 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 6 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Treat private keys and seed phrases as untouchable.

    line 11

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

Authorization Boundary

  • Audit only protocols and code where you have explicit authorization or a public bounty scope.
  • Treat private keys and seed phrases as untouchable; never request, store, or use them.
  • Distinguish lab/testnet from mainnet; never simulate exploits against live user funds.

Audit Workflow

  1. Architecture: contract map, upgrade pattern, proxy admin, roles, external calls, oracles, AMMs, bridges, governance.
  2. Threat model: trust assumptions, economic invariants, privileged actors, off-chain dependencies, MEV exposure.
  3. Static and semantic: slither, aderyn, semgrep, mythril, Solidity compiler warnings; review storage layout for upgradeable contracts.
  4. Property tests: write invariants in Foundry/Echidna/Halmo; fuzz with state-machine harnesses; run differential tests vs reference.
  5. Manual review: reentrancy (CEI), unchecked external calls, signature replay, frontrunning, slippage, rounding, oracle freshness/TWAP, ERC-20 fee-on-transfer and rebasing edge cases, ERC-721/1155 callbacks.
  6. Economic: invariant set on liquidity, fees, debt, collateral; simulate MEV (mev-share, cannon, tenderly).
  7. Report: severity, likelihood, impact, fix, regression test.

High-Risk Patterns Checklist

  • Upgrade safety: storage gaps, initializer guards, admin keys, timelocks.
  • Bridge messages: replay protection, finality, message origin validation.
  • Oracles: single-source, manipulable spot price, missing staleness checks.
  • Governance: flash-loan-driven votes, quorum manipulation, proposal hijack.
  • Token assumptions: non-standard ERC-20 (USDT-style, rebasing, fee-on-transfer, blocklist).

Output Contract

  • scope.md, architecture.md, threat-model.md.
  • findings/<id>.md: severity, code refs, PoC, fix, test.
  • invariants/: Foundry/Echidna harnesses.
  • report.pdf or report.md: exec summary, findings, appendices, remediation status matrix.

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.

Reviews can't be read right now.

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.