solidity-security

solidity-security is a skill for Claude Code, Codex from ComeOnOliver/skillshub. It costs 63 tokens per session (1,867 once invoked), scanned A, original, MIT.

Security rules for writing and reviewing Solidity smart-contract code on blockchain networks.

In plain words
What is it for?
Use them when implementing or reviewing contracts that handle ETH, tokens, approvals, ownership, or multiple user roles.
Why use it?
They help prevent exposed private keys, unsafe token transfers, reentrancy, and incorrect access control.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/comeonoliver/skillshub/solidity-security
Any agent
npx skills add ComeOnOliver/skillshub --skill solidity-security
Clone the repo
git clone --depth 1 https://github.com/ComeOnOliver/skillshub

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 solidity-security

README.md
[![agentmods](https://agentmods.dev/badge/skills/comeonoliver/skillshub/solidity-security.svg)](https://agentmods.dev/skills/comeonoliver/skillshub/solidity-security)
Your own site
<a href="https://agentmods.dev/skills/comeonoliver/skillshub/solidity-security"><img src="https://agentmods.dev/badge/skills/comeonoliver/skillshub/solidity-security.svg" alt="Measured on agentmods" height="20"></a>
Per session 63 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,867 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00063 $0.01867
Opus 5 $0.00032 $0.00933
Sonnet 5 $0.00013 $0.00373
Haiku 4.5 $0.00006 $0.00187

Measured 5d ago against content hash 9cad2e542091, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

solidity-security scanned grade A with 0 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.

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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

skills/0xlayerghost/solidity-agent-kit/solidity-security/SKILL.md · 135 lines

How it starts

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

Solidity Security Standards

Language Rule

  • Always respond in the same language the user is using. If the user asks in Chinese, respond in Chinese. If in English, respond in English.

Private Key Protection

  • Store private keys in .env, load via source .env — never pass keys as CLI arguments
  • Never expose private keys in logs, screenshots, conversations, or commits
  • Provide .env.example with placeholder values for team reference
  • Add .env to .gitignore — verify with git status before every commit

Security Decision Rules

When writing or reviewing Solidity code, apply these rules:

Situation Required Action
External ETH/token transfer Use ReentrancyGuard + Checks-Effects-Interactions (CEI) pattern
ERC20 token interaction Use SafeERC20 — call safeTransfer / safeTransferFrom, never raw transfer / transferFrom
Owner-only function Inherit Ownable2Step (preferred) or Ownable from OZ 4.9.x — Ownable2Step prevents accidental owner loss
Multi-role access Use AccessControl from @openzeppelin/contracts/access/AccessControl.sol
Token approval Use safeIncreaseAllowance / safeDecreaseAllowance from SafeERC20 — never raw approve
Price data needed Use Chainlink AggregatorV3Interface if feed exists; otherwise TWAP with min-liquidity check — never use spot pool price directly
Upgradeable contract Prefer UUPS (UUPSUpgradeable) over TransparentProxy; always use Initializable
Solidity version < 0.8.0 Must use SafeMath — but strongly prefer upgrading to 0.8.20+
Emergency scenario Inherit Pausable, add whenNotPaused to user-facing functions; keep admin/emergency functions unpaused
Whitelist / airdrop Use MerkleProof for gas-efficient verification — never store full address lists on-chain
Signature-based auth Use ECDSA + EIP712 — never roll custom signature verification
Signature content Signature must bind chainId + nonce + msg.sender + deadline — prevent replay and cross-chain reuse
Cross-chain bridge / third-party dependency Audit all inherited third-party contract code — never assume dependencies are safe
Deprecated / legacy contracts Permanently pause or selfdestruct deprecated contracts — never leave unused contracts callable on-chain
UUPS upgrade pattern _authorizeUpgrade must have onlyOwner; implementation constructor calls _disableInitializers(); retain onlyProxy on upgradeToEVMbench/basin H-01
Multi-contract trust boundary Router/Registry relay calls must verify source contract authorization; never trust caller identity inside flash loan callbacks — EVMbench/noya H-08
Counter/ID + external call All counter increments and ID assignments must complete before external calls; ETH refunds must be last — EVMbench/phi H-06

Read the full file on GitHub · 135 lines

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 · 135 lines · 63 tokens per session scan A 9cad2e542091

Subscribe to this mod's changes

solidity-security is a skill published in the GitHub repository ComeOnOliver/skillshub (63 stars, last pushed 2mo ago), licensed MIT. It adds 63 tokens to every session and 1,867 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.