agentleFS
kienbui1995kienbui1995/magic-powers/skills/blockchain-audit/SKILL.md

blockchain-audit

Skill0 starsChanged 8 months agoMITView on GitHub

Use when reviewing smart contracts for security vulnerabilities, auditing web3 patterns, or preparing for a formal audit

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    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:

    When reviewing Solidity/Rust smart contracts before deployment, preparing for a formal security audit, or assessing web3 integration risks.

    line 9
  2. Distinctive:

    Test coverage: 100% line coverage expected for mainnet contracts

    line 31
  3. Distinctive:

    No emergency mechanism — can't pause a compromised contract

    line 54

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 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

Blockchain & Smart Contract Audit

When to Use

When reviewing Solidity/Rust smart contracts before deployment, preparing for a formal security audit, or assessing web3 integration risks.

Core Jobs

1. Smart Contract Security Checklist

Critical vulnerabilities to check:

  • Reentrancy: Does state update before external call? Use CEI pattern (Checks-Effects-Interactions)
  • Integer overflow/underflow: Using SafeMath or Solidity 0.8+?
  • Access control: Are admin functions properly restricted? (onlyOwner, role-based)
  • Front-running: Can transaction ordering be exploited? (price oracle manipulation)
  • Unchecked return values: Are all .call() return values checked?
  • Timestamp dependence: Is block.timestamp used for randomness or time-sensitive logic?
  • Denial of service: Can loops be made to run out of gas?
  • Logic errors: Does the business logic match the spec exactly?

2. DeFi-Specific Risks

  • Flash loan attacks: Can an attacker manipulate price oracles in a single transaction?
  • Price oracle manipulation: Using on-chain DEX prices without TWAP?
  • Slippage: Are swap functions protected against excessive slippage?
  • Liquidity: Are there constraints on withdrawal that could trap funds?

3. Code Quality Review

  • Test coverage: 100% line coverage expected for mainnet contracts
  • Static analysis: run Slither, MythX, or Semgrep on contract code
  • Fuzzing: Echidna or Foundry fuzz tests for edge cases
  • Formal verification: for critical financial logic

4. Pre-Audit Checklist

  • All known issues resolved or documented
  • Test coverage > 95%
  • Static analysis clean (no medium+ findings)
  • Deployment scripts reviewed
  • Emergency pause mechanism exists
  • Upgrade mechanism reviewed (proxy pattern risks)

Key Outputs

  • Security findings report (severity: Critical / High / Medium / Low / Info)
  • Pre-audit readiness assessment
  • Remediation recommendations
  • Post-fix verification

Anti-Patterns

  • Deploying to mainnet without audit
  • "We'll fix it in the next version" for critical vulnerabilities (immutable contracts)
  • Trusting on-chain data without validation
  • No emergency mechanism — can't pause a compromised contract

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.