Skip to main content
skill Claude Code CX Codex Cursor

solidity-security — Claude Code skill: what it does, install

This skill helps write and audit Solidity contracts against common vulnerabilities. Use it for DeFi work, security checks, and audit preparation.

Install into Claude Code · Plugin marketplace All methods and platforms ↓
/plugin marketplace add wshobson/agents
/plugin install blockchain-web3@claude-code-workflows
Open on GitHub

What solidity-security does

solidity-security covers secure Solidity development patterns and common vulnerability prevention. It helps inspect contracts for reentrancy, integer overflow, access-control issues, attack vectors, and gas use where security must remain intact.

Detailed patterns and worked examples are stored in references/details.md. The source includes Hardhat tests for reentrancy, overflow, and unauthorized withdrawals, plus a documented contract example using the Checks-Effects-Interactions pattern.

The skill is available for Claude Code, Codex, and Cursor. Install it when you write or review Solidity contracts; it is a poor fit for projects without smart-contract code.

What it helps with

  • check a contract for reentrancy
  • find integer overflow risks
  • review function access control
  • prepare Solidity code for an audit
  • test unauthorized withdrawals

Example prompts for the agent

  • Audit this Solidity contract for reentrancy and access-control issues.
  • Write Hardhat tests for overflow protection and unauthorized withdrawals.
  • Review this contract before a professional audit and list the required fixes.

How to install solidity-security

1Plugin marketplace

/plugin marketplace add wshobson/agents
/plugin install blockchain-web3@claude-code-workflows

This installs the whole blockchain-web3 plugin with all its skills

2Skills CLI (Vercel)

npx skills add wshobson/agents --skill solidity-security -a claude-code

3Manually: put the files in place

~/.claude/skills/solidity-security/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/solidity-security/

From the same set213

The whole set →
typescript-advanced-types Seth Hobson Guides an agent through advanced TypeScript types, from generics to conditional and mapped types. Use it for typed libraries, API clients, or strict configuration objects. Claude Code CX Codex Cursor 92,169installs tailwind-design-system Seth Hobson Helps build design systems with Tailwind CSS v4, from theme tokens to component variants. Use it when a project needs shared UI patterns. Claude Code CX Codex Cursor 70,180installs brand-landingpage Travis D. Elliott This skill interviews you about the product and its visual direction, then builds a landing page through Stitch. Use it when there’s no established design yet. Claude Code CX Codex Cursor 39,476installs python-testing-patterns Seth Hobson This skill guides Python testing with pytest, fixtures and mocks. Use it when building a test suite or tracking down failing checks. Claude Code CX Codex Cursor 36,943installs python-performance-optimization Seth Hobson This skill profiles Python code to locate CPU and memory bottlenecks. Use it when an application responds slowly or consumes too many resources. Claude Code CX Codex Cursor 35,675installs nextjs-app-router-patterns Seth Hobson This skill covers Next.js App Router patterns for rendering, routing, and data fetching. Use it when starting an App Router project or moving from Pages Router. Claude Code CX Codex Cursor 32,529installs api-design-principles Seth Hobson Use this skill to plan or review REST and GraphQL APIs. It helps when writing a specification or setting API conventions for a team. Claude Code CX Codex Cursor 30,348installs code-review-excellence Seth Hobson This skill guides pull request reviews, catches logic and security issues, and helps teams give specific feedback. Use it for review standards or developer mentoring. Claude Code CX Codex Cursor 30,193installs

Similar

gke-workload-security official google This skill audits and configures workload security in GKE namespaces and applications. Use it for network policies, pod isolation, security labels, and secret mounts. Claude Code Gemini CLI CX Codex 5,000installs gke-platform-security official google This skill helps configure and harden Google Kubernetes Engine clusters, covering RBAC, Secret Manager, Shielded Nodes, and GKE Sandbox. Use it to review or change security settings at the platform level. Claude Code Gemini CLI CX Codex 5,000installs cloud-logging-configuration-basics official google Configure Cloud Logging resources in a single Google Cloud project, including buckets, views, sinks, and log-based metrics. Use it when setting up log storage and access controls. Claude Code Gemini CLI CX Codex 5,000installs compliance-check official anthropics Skill surfaces applicable regulations, required approvals, and risk areas for any action, product feature, or business initiative. Use before launching anything that touches personal data or has cross-border implications. Claude Code CX Codex Cursor +1 3,300installs risk-assessment official anthropics Identifies, evaluates, and plans mitigations for operational risks across projects, vendors, and decisions. It generates a prioritized register with assigned owners. Claude Code CX Codex Cursor +1 3,300installs gke-service-networking official google Configures GKE edge networking, routing, load balancing, Cloud Armor, and private endpoints. Useful when publishing services or debugging Ingress failures. Claude Code Gemini CLI CX Codex 4,800installs git-guardrails-claude-code Matt Pocock This skill adds a Claude Code hook that stops risky Git commands before they run. Use it when an agent must not push or discard working-tree changes. Claude Code 499,069installs ponytail-review DietrichGebert ponytail-review reviews a change beyond the diff, checking connected code, bugs, risks, load, tests, speed, and unnecessary code. Use it for PRs and commits. Claude Code CX Codex Cursor +1 56,300installs

Questions about solidity-security

How do I install solidity-security in Claude Code?

Run npx skills add wshobson/agents --skill solidity-security -a claude-code. The skill file is placed at ~/.claude/skills/solidity-security/SKILL.md.

What does solidity-security do?

It supports secure Solidity development and contract audits. The skill covers reentrancy, integer overflow, access control, attack vectors, and Hardhat security tests.

What security tests are included?

The source includes Hardhat examples for blocking reentrancy, preventing integer overflow, and rejecting unauthorized withdrawals.

Source text

SKILL.md · MIT
---
name: solidity-security
description: Master smart contract security best practices to prevent common vulnerabilities and implement secure Solidity patterns. Use when writing smart contracts, auditing existing contracts, or implementing security measures for blockchain applications.
---

# 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

```javascript
// 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();

    const Attacker = await ethers.getContractFactory("ReentrancyAttacker");
    const attackerContract = await Attacker.deploy(bank.address);

    // Deposit funds
    await bank.deposit({ value: ethers.utils.parseEther("10") });

    // Attempt reentrancy attack
    await expect(
      attackerContract.attack({ value: ethers.utils.parseEther("1") }),
    ).to.be.revertedWith("ReentrancyGuard: reentrant call");
  });

  it("Should prevent integer overflow", async function () {
    const Token = await ethers.getContractFactory("SecureToken");
    const token = await Token.deploy();

    // Attempt overflow
    await expect(token.transfer(attacker.address, ethers.constants.MaxUint256))
      .to.be.reverted;
  });

  it("Should enforce access control", async function () {
    const [owner, attacker] = await ethers.getSigners();

    const Contract = await ethers.getContractFactory("SecureContract");
    const contract = await Contract.deploy();

    // Attempt unauthorized withdrawal
    await expect(contract.connect(attacker).withdraw(100)).to.be.revertedWith(
      "Ownable: caller is not the owner",
    );
  });
});
```

## Audit Preparation

```solidity
contract WellDocumentedContract {
    /**
     * @title Well Documented Contract
     * @dev Example of proper documentation for audits
     * @notice This contract handles user deposits and withdrawals
     */

    /// @notice Mapping of user balances
    mapping(address => uint256) public balances;

    /**
     * @dev Deposits ETH into the contract
     * @notice Anyone can deposit funds
     */
    function deposit() public payable {
        require(msg.value > 0, "Must send ETH");
        balances[msg.sender] += msg.value;
    }

    /**
     * @dev Withdraws user's balance
     * @notice Follows CEI pattern to prevent reentrancy
     * @param amount Amount to withdraw in wei
     */
    function withdraw(uint256 amount) public {
        // CHECKS
        require(amount <= balances[msg.sender], "Insufficient balance");

        // EFFECTS
        balances[msg.sender] -= amount;

        // INTERACTIONS
        (bool success, ) = msg.sender.call{value: amount}("");
        require(success, "Transfer failed");
    }
}
```

© Seth Hobson · MIT · wshobson/agents

See also

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor