setup-solidity-contracts

Configure Solidity projects with OpenZeppelin Contracts and framework remappings.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Helps developers create or configure Solidity projects that use OpenZeppelin Contracts by reducing friction around framework detection, dependency installation, remapping configuration, and import conventions for upgradeable versus standard contracts.

Core Features & Use Cases

  • Framework detection and initialization: Guides whether to initialize Hardhat or Foundry projects and what to check in existing repositories.
  • Dependency installation: Explains how to add @openzeppelin contracts packages for npm and Foundry, and when to include upgradeable variants.
  • Remappings and import guidance: Provides the remappings format and import conventions needed for correct compilation and Etherscan verification when using Foundry and upgradeable layouts.
  • Use Case: Set up a new Foundry repository, install OpenZeppelin contracts, and configure remappings so proxy and upgradeable imports resolve correctly for verification.

Quick Start

Create a new Hardhat or Foundry project, install the appropriate @openzeppelin contracts packages including upgradeable variants when deploying behind proxies, and add the recommended remappings so imports resolve for local builds and verification.

Frequently Asked Questions about setup-solidity-contracts

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

FAQPage Schema
How do I set up OpenZeppelin contracts in a Foundry project?

To set up OpenZeppelin contracts in a Foundry project, install the appropriate @openzeppelin contracts packages and configure the recommended remappings so imports resolve correctly for local compilation and Etherscan verification.

What import conventions are needed for OpenZeppelin upgradeable contracts?

OpenZeppelin upgradeable contracts require specific import conventions and remappings to ensure proxy and upgradeable layouts resolve correctly during compilation and verification, distinguishing them from standard contract installations.

How do I install OpenZeppelin contracts for Hardhat projects?

Installing OpenZeppelin contracts for Hardhat projects involves adding the @openzeppelin contracts packages via npm, including upgradeable variants when deploying behind proxies, and verifying framework-specific dependencies.

Do I need different remappings for Foundry when using OpenZeppelin contracts?

Foundry requires specific remappings for OpenZeppelin contracts to ensure import paths resolve correctly for local builds and verification, especially when configuring upgradeable variants behind proxies.

Why does Etherscan verification fail for my OpenZeppelin upgradeable contracts?

Etherscan verification for OpenZeppelin upgradeable contracts fails when remappings and import conventions are not configured correctly, preventing proxy and upgradeable layouts from resolving properly during the verification process.

Can I use both Hardhat and Foundry with OpenZeppelin contracts?

OpenZeppelin contracts can be used with both Hardhat and Foundry by detecting the existing framework, installing the appropriate packages, and applying the correct framework-specific dependencies and import conventions.