develop-secure-contracts

Integrate OpenZeppelin security patterns into Solidity smart contracts.

203|28|Updated Feb 5, 2026
One-click install
npx skills add https://github.com/OpenZeppelin/openzeppelin-skills --skill develop-secure-contracts
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: develop-secure-contracts
Source: https://github.com/OpenZeppelin/openzeppelin-skills/tree/main/skills/develop-secure-contracts
Command: npx skills add https://github.com/OpenZeppelin/openzeppelin-skills --skill develop-secure-contracts

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

OpenZeppelin Security patterns help developers prevent common vulnerabilities by providing battle-tested components and a library-first approach.

Core Features & Use Cases

  • Library-first integration: Import and reuse OpenZeppelin components (Ownable, Pausable, ReentrancyGuard, Governor, etc.) instead of reimplementing them.
  • Pattern discovery: Inspect dependencies to identify required functions, modifiers, and hooks for safe integration.
  • MCP Generators: Optional tools to accelerate safe contract generation and compare diffs before applying changes.
  • Use Case: Add token standards or governance features while maintaining security guarantees.

Quick Start

Run the skill to begin integrating OpenZeppelin security patterns into your Solidity project.

Frequently Asked Questions about develop-secure-contracts

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement ReentrancyGuard and Ownable in Solidity to prevent smart contract vulnerabilities?

To implement ReentrancyGuard and Ownable securely, import the OpenZeppelin library contracts and apply proper inheritance in your Solidity project. This library-first approach reuses battle-tested components to prevent common vulnerabilities. You must also apply required function overrides for hooks to maintain security guarantees.

What is the best way to add governance features to a Solidity contract without creating security vulnerabilities?

The best way to add governance features is integrating OpenZeppelin Governor components through a library-first approach. Instead of reimplementing governance logic, you import the battle-tested contracts and wire them into your Solidity project, ensuring security patterns are correctly applied via proper inheritance and hook overrides.

How do I identify required modifiers and hooks for safe OpenZeppelin contract integration?

You identify required modifiers and hooks by inspecting your Solidity project dependencies for OpenZeppelin security patterns. The pattern discovery process reveals required functions and hooks for safe integration, ensuring your contracts correctly implement components like Pausable and align with OpenZeppelin's documentation.

Can I use OpenZeppelin components with my existing Solidity contracts?

Yes, you can integrate OpenZeppelin components into existing Solidity contracts. The process applies library-first integration to existing or new contracts by adding library imports and applying proper inheritance, allowing you to add token standards or governance features while maintaining security guarantees.

Do I need to manually write overrides for hooks when integrating OpenZeppelin contracts?

Yes, you need to write proper overrides for hooks when integrating OpenZeppelin contracts. Satisfying integration requirements such as library imports, proper inheritance, and hook overrides ensures that components like Pausable and ReentrancyGuard function correctly and maintain their security guarantees.