solidity-security
✓[AUTO-INVOKE] MUST be invoked BEFORE writing or modifying any Solidity contract (.sol files). Covers private key handling, access control, reentrancy prevention, gas safety, and pre-audit checklists. Trigger: any task involving creating, editing, or reviewing .sol source files.
Installation
SKILL.md
| 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 |
Facts (cite-ready)
Stable fields and commands for AI/search citations.
- Install command
npx skills add https://github.com/0xlayerghost/solidity-agent-kit --skill solidity-security- Category
- !Security
- Verified
- ✓
- First Seen
- 2026-02-17
- Updated
- 2026-02-18
Quick answers
What is solidity-security?
[AUTO-INVOKE] MUST be invoked BEFORE writing or modifying any Solidity contract (.sol files). Covers private key handling, access control, reentrancy prevention, gas safety, and pre-audit checklists. Trigger: any task involving creating, editing, or reviewing .sol source files. Source: 0xlayerghost/solidity-agent-kit.
How do I install solidity-security?
Open your terminal or command line tool (Terminal, iTerm, Windows Terminal, etc.) Copy and run this command: npx skills add https://github.com/0xlayerghost/solidity-agent-kit --skill solidity-security Once installed, the skill will be automatically configured in your AI coding environment and ready to use in Claude Code or Cursor
Where is the source repository?
https://github.com/0xlayerghost/solidity-agent-kit
Details
- Category
- !Security
- Source
- skills.sh
- First Seen
- 2026-02-17