wshobson avatar

Solidity Security

This handles the security fundamentals that trip up most Solidity developers, from reentrancy guards to proper access control patterns. It covers the critical vulnerability classes you'll encounter in audits: overflow protection, front-running mitigation, and gas optimization techniques that don't compromise security. The code examples follow the checks-effects-interactions pattern and show both vulnerable and secure implementations side by side. Use this when you're writing contracts that handle real value or preparing for a professional audit. It's particularly solid on the practical stuff like emergency stops and pull-over-push patterns that separate production-ready contracts from toy examples.

skills.sh installs
15.8K
GitHub stars
42.4K
last updated
Aug 21, 2026

Install

$ npx -y skills add wshobson/agents --skill solidity-security --agent claude-code

Installs into .claude/skills of the current project.

Files

Solidity Security

Master smart contract security best practices, vulnerability prevention, and secure Solidity development patterns.

When to Use This Skill

  • Writing secure smart contracts
  • Auditing existing contracts for vulnerabilities
  • Implementing secure DeFi protocols
  • Preventing reentrancy, overflow, and access control issues
  • Optimizing gas usage while maintaining security
  • Preparing contracts for professional audits
  • Understanding common attack vectors

Detailed patterns and worked examples

Detailed pattern documentation lives in references/details.md. Read that file when the navigation tier above is insufficient.

Testing for Security

// Hardhat test example
const { expect } = require("chai");
const { ethers } = require("hardhat");

describe("Security Tests", function () {
  it("Should prevent reentrancy attack", async function () {
    const [attacker] = await ethers.getSigners();

    const VictimBank = await ethers.getContractFactory("SecureBank");
    const bank = await VictimBank.deploy();

Sponsors

Details

Repository
github.com/wshobson/agents
Categories
Security, Documentation, Web3 & Blockchain

More from wshobson/agents

All 174

Recommended

More Security
1affaan-m avatarsecurity-scanaffaan-m/everything-claude-codesecurity scan5.9Kskills.sh installs
2affaan-m avatarsecurity-scanaffaan-m/eccScan your Claude Code configuration (.claude/ directory) for security vulnerabilities, misconfigurations, and injection risks using AgentShield. Checks CLAUDE.m5.8Kskills.sh installs
3trailofbits avataralgorand-vulnerability-scannertrailofbits/skillsScans Algorand smart contracts for 11 common vulnerabilities including rekeying attacks, unchecked transaction fees, missing field validations, and access contr5.6Kskills.sh installs
4yaklang avatarai-ml-securityyaklang/hack-skillsAI/ML security playbook. Use when assessing model supply chain attacks (pickle RCE, poisoned weights), adversarial examples, model poisoning, model stealing, da3.8Kskills.sh installs
5affaan-m avatarllm-trading-agent-securityaffaan-m/everything-claude-codellm trading agent security3.6Kskills.sh installs
6affaan-m avatardefi-amm-securityaffaan-m/everything-claude-codedefi amm security3.5Kskills.sh installs