auditing-foundry-smart-contract-security

auditing-foundry-smart-contract-security is a skill for Claude Code, Codex from Youngmaidainon/Agent-Level-Up. It costs 143 tokens per session (1,873 once invoked), scanned B, original, MIT.

A guide to auditing Solidity smart contracts in a Foundry project before deployment. It combines code scanning, symbolic execution, fuzz testing, invariant tests, and manual checks for common contract flaws.

In plain words
What is it for?
Use it to look for reentrancy, access-control, price-oracle, arithmetic, external-call, and private-key security problems before launch.
Why use it?
Smart contracts deployed on a blockchain are difficult to change, so bugs can expose real funds and cannot be fixed like ordinary application code.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to look for reentrancy, access-control, price-oracle, arithmetic, external-call, and private-key security problems before launch.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/youngmaidainon/agent-level-up/auditing-foundry-smart-contract-security
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add Youngmaidainon/Agent-Level-Up --skill auditing-foundry-smart-contract-security
Clone the repo
git clone --depth 1 https://github.com/Youngmaidainon/Agent-Level-Up

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for auditing-foundry-smart-contract-security

README.md
[![agentmods](https://agentmods.dev/badge/skills/youngmaidainon/agent-level-up/auditing-foundry-smart-contract-security/github.svg)](https://agentmods.dev/skills/youngmaidainon/agent-level-up/auditing-foundry-smart-contract-security)
Your own site
<a href="https://agentmods.dev/skills/youngmaidainon/agent-level-up/auditing-foundry-smart-contract-security"><img src="https://agentmods.dev/badge/skills/youngmaidainon/agent-level-up/auditing-foundry-smart-contract-security/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for auditing-foundry-smart-contract-security

Your own site · 80×15
<a href="https://agentmods.dev/skills/youngmaidainon/agent-level-up/auditing-foundry-smart-contract-security"><img src="https://agentmods.dev/badge/skills/youngmaidainon/agent-level-up/auditing-foundry-smart-contract-security.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 143 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,873 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 2 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00143 $0.01873
Opus 5 $0.00072 $0.00937
Sonnet 5 $0.00029 $0.00375
Haiku 4.5 $0.00014 $0.00187

Measured 5d ago against content hash 1d631c528d15, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade B, and why

auditing-foundry-smart-contract-security scanned grade B with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/agent.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Downloads and executes remote codemediumSupply chain

curl | sh runs whatever the server returns today, which is not necessarily what it returned when this was reviewed.

- **Foundry** installed (`forge`, `cast`, `anvil`): `curl -L https://foundry.paradigm.xyz | bash && foundryup`

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- **Foundry** installed (`forge`, `cast`, `anvil`): `curl -L https://foundry.paradigm.xyz | bash && foundryup`
cyber-security/ctf/auditing-foundry-smart-contract-security/SKILL.md · 171 lines

How it starts

The opening of the file, as written. The whole thing — 171 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Auditing Foundry Smart Contract Security

Overview

Deployed smart contracts are immutable and custody real funds, so a bug shipped to mainnet cannot be patched — it can only be exploited. Most catastrophic DeFi losses come from a small set of recurring classes: reentrancy, broken access control, oracle/price manipulation, and unchecked arithmetic or external calls.

This skill runs a defense-in-depth, pre-deployment audit of a Foundry project, layering four independent techniques that each catch what the others miss:

  1. Static analysisslither (90+ detectors) and aderyn (Cyfrin, Rust) scan the AST/IR in seconds for known anti-patterns.
  2. Symbolic executionmythril (optional, slow) explores execution paths and SMT-solves for deep arithmetic/reentrancy bugs.
  3. Property-based testingforge test with fuzzing (testFuzz_*) and invariant tests (invariant_* + handler contracts with ghost variables) proves protocol-level properties hold across millions of random sequences.
  4. Manual review + key hygiene — a structured checklist (see references/vulnerability-checklist.md) and a secrets/keystore audit so no private key ever lives in plaintext and deployment goes through an encrypted cast keystore (see references/secure-deployment-and-keys.md).

The skill is dev-side and pre-deployment — it is run by the engineer building the contract, not by a SOC after an incident. Findings gate the deploy: any high/critical static finding, failing test, leaked key, or low coverage = FAIL.

When to Use

  • Before deploying any Solidity contract to a testnet or mainnet EVM chain.
  • When writing or reviewing a Foundry project (foundry.toml, src/, test/, script/).
  • When a contract handles value: tokens (ERC-20/721/1155), vaults, staking, AMMs, bridges, governance.
  • When adding fuzz or invariant tests, or when coverage of value-moving functions is unknown.
  • When wiring deployment scripts — to verify keys are in an encrypted keystore, not .env plaintext.
  • When integrating a price oracle, external call, delegatecall, or upgradeable proxy.
  • When triaging a Slither/Aderyn report and needing to separate real bugs from false positives.

Read the full file on GitHub · 171 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 171 lines · 143 tokens per session scan B 1d631c528d15

Subscribe to this mod's changes

auditing-foundry-smart-contract-security is a skill published in the GitHub repository Youngmaidainon/Agent-Level-Up (3 stars, last pushed 14d ago), licensed MIT. It adds 143 tokens to every session and 1,873 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it B with 2 findings (downloads and executes remote code, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

analyzing-ethereum-smart-contract-vulnerabilities

Perform static and symbolic analysis of Solidity smart contracts using Slither and Mythril to detect reentrancy, integer overflow, access control, and other vulnerability classes before deployment to Ethereum mainnet.

mukul975/Anthropic-Cybersecurity-Skills · 49 tokens

analyzing-ethereum-smart-contract-vulnerabilities

Perform static and symbolic analysis of Solidity smart contracts using Slither and Mythril to detect reentrancy, integer overflow, access control, and other vulnerability classes before deployment to Ethereum mainnet.

xalgorix/xalgorix · 49 tokens

analyzing-ethereum-smart-contract-vulnerabilities

A security-analysis guide for Solidity smart contracts, which are programs that run on the Ethereum blockchain. It uses Slither and Mythril to inspect contract code and execution paths for vulnerabilities.

killvxk/cybersecurity-skills-zh · 60 tokens

analyzing-ethereum-smart-contract-vulnerabilities

Perform static and symbolic analysis of Solidity smart contracts using Slither and Mythril to detect reentrancy, integer overflow, access control, and other vulnerability classes before deployment to Ethereum mainnet.

26zl/cybersec-toolkit · 49 tokens

analyzing-ethereum-smart-contract-vulnerabilities

Perform static and symbolic analysis of Solidity smart contracts using Slither and Mythril to detect reentrancy, integer overflow, access control, and other vulnerability classes before deployment to Ethereum mainnet.

plurigrid/asi · 49 tokens

analyzing-ethereum-smart-contract-vulnerabilities

Perform static and symbolic analysis of Solidity smart contracts using Slither and Mythril to detect reentrancy, integer overflow, access control, and other vulnerability classes before deployment to Ethereum mainnet.

autohandai/community-skills · 49 tokens