# develop-secure-contracts

Guides coding assistants to integrate official OpenZeppelin contracts across multiple chains. Prevents writing redundant security logic from scratch.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 545 installs · ★ 219
- Author: OpenZeppelin
- License: AGPL-3.0-only · policy=link-only · description only; the file stays with the author
- Source: https://github.com/OpenZeppelin/openzeppelin-skills/tree/HEAD/skills/develop-secure-contracts/SKILL.md
- Updated: 2026-10-19
- HTML: https://affpapa.org/en/nevibecode/skills/develop-secure-contracts

## What it does

This skill directs the assistant to inspect your project before writing smart contracts. It searches for existing files and checks installed dependencies across Hardhat, Foundry, Scarb, Cargo, or Move environments. Instead of replacing contracts, it prioritizes integrating changes into your existing codebase. The skill strictly bans copying library internals directly into user files, because unmanaged clones miss critical package security updates.

When adding access controls or token logic, the agent can invoke `npx @openzeppelin/contracts-cli` to build a clean baseline. Diffing this baseline against the target feature reveals exact hooks and storage layouts needed for your contract. If no generator command exists, the assistant explores installed package files and documentation comments directly. Whenever a source file cannot be read, the agent must report the failed path immediately instead of guessing.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add OpenZeppelin/openzeppelin-skills --skill develop-secure-contracts -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/develop-secure-contracts/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/develop-secure-contracts/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add OpenZeppelin/openzeppelin-skills --skill develop-secure-contracts -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/develop-secure-contracts/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add OpenZeppelin/openzeppelin-skills --skill develop-secure-contracts -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/develop-secure-contracts/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install OpenZeppelin/openzeppelin-skills develop-secure-contracts
```

2. **Manually: put the files in place**
- File: `.github/skills/develop-secure-contracts/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add OpenZeppelin/openzeppelin-skills --skill develop-secure-contracts -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/OpenZeppelin/openzeppelin-skills --path skills/develop-secure-contracts
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/develop-secure-contracts/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add OpenZeppelin/openzeppelin-skills --skill develop-secure-contracts -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/OpenZeppelin/openzeppelin-skills/tree/HEAD/skills/develop-secure-contracts/SKILL.md

## When to use it
- integrate token standards into existing contracts without replacing whole files
- locate dependency source trees across Solidity, Cairo, Stylus, and Sui Move projects
- extract required hooks and modifiers directly from installed library packages
- apply reference diffs produced by @openzeppelin/contracts-cli

## Example prompts
- Add Pausable logic to our current ERC20 contract without modifying other functions
- Inspect local dependencies and implement role-based access using AccessControl
- Wire Governor module extensions into our existing voting contract

## Similar
- [secure-workflow-guide](https://affpapa.org/en/nevibecode/skills/secure-workflow-guide.md) — skill · 7400 installs
- [ethereum](https://affpapa.org/en/nevibecode/skills/ethereum.md) — skill · 737 installs
- [solidity-hardhat-cursorrules-prompt-file](https://affpapa.org/en/nevibecode/rules/solidity-hardhat-cursorrules-prompt-file.md) — rule · ★ 41011
- [solidity](https://affpapa.org/en/nevibecode/skills/solidity.md) — skill · 721 installs
- [blockchain-developer](https://affpapa.org/en/nevibecode/agents/voltagent-community-blockchain-developer.md) — subagent · 375 installs

From the same set: [openzeppelin/openzeppelin-skills](https://affpapa.org/en/nevibecode/by/openzeppelin/openzeppelin-skills.md) — 2 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
