Setup Solidity Contracts
Setup guide for Solidity projects with OpenZeppelin Contracts across Hardhat and Foundry, including upgradeable variants.
- CCM score
- 74 of 100
- skills.sh installs
- 631
- GitHub stars
- 226
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers project creation, OpenZeppelin dependency installation, and Foundry remapping configuration for both standard and upgradeable contracts
- Provides
npx hardhat initor--initcommands for Hardhat v2 and v3, andforge initplusforge installfor Foundry - Requires pinning Foundry installs to a release tag, since an unpinned install pulls the default branch, which may be unstable
- Designed for developers starting a new Hardhat or Foundry project, or adding OpenZeppelin imports to an existing one
Install
$ npx -y skills add openzeppelin/openzeppelin-skills --skill setup-solidity-contracts -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
Solidity Setup
For existing projects, detect the framework by looking for hardhat.config.* (Hardhat) or foundry.toml (Foundry). For new projects, ask the user which framework they prefer.
Hardhat Setup
- Initialize project (only if starting a new project)
npx hardhat init # Hardhat v2
npx hardhat --init # Hardhat v3
- Install OpenZeppelin Contracts:
npm install @openzeppelin/contracts
- If using upgradeable contracts, also install the upgradeable variant:
npm install @openzeppelin/contracts-upgradeable
Foundry Setup
- Install Foundry
curl -L https://foundry.paradigm.xyz | bash
foundryup
- Initialize project (only if starting a new project)
forge init my-project
cd my-project
- Add OpenZeppelin Contracts:
forge install OpenZeppelin/openzeppelin-contracts@v<VERSION>
- If using upgradeable contracts, also add the upgradeable variant:
forge install OpenZeppelin/openzeppelin-contracts-upgradeable@v<VERSION>
Details
- Repository
- github.com/openzeppelin/openzeppelin-skills
- Categories
- Web3 & Crypto, Technical Documentation
- First seen
- Jun 3, 2026
Questions
What does the setup-solidity-contracts skill do?
It sets up a Solidity smart contract project with OpenZeppelin Contracts. It covers creating a new Hardhat or Foundry project, installing OpenZeppelin Contracts dependencies, configuring Foundry remappings, and explaining Solidity import conventions.
How do I install the setup-solidity-contracts skill?
Run npx -y skills add openzeppelin/openzeppelin-skills --skill setup-solidity-contracts -y in your project. The skill then lets your agent set up a Hardhat or Foundry project with OpenZeppelin Contracts.
Does it support upgradeable OpenZeppelin contracts?
Yes, the skill covers installing the upgradeable variant, @openzeppelin/contracts-upgradeable, for Hardhat and Foundry. It also gives the Foundry remappings needed for upgradeable contracts and Etherscan verification.
Where does this skill stand in the Web3 & Crypto category?
It sits in the Web3 & Crypto category alongside solana-dev, binance-agentic-wallet, okx-dex-market, gmgn-market and gmgn-token. It is aimed at Solidity developers starting an EVM project with OpenZeppelin Contracts.
More from openzeppelin/openzeppelin-skills
All 5Similar to Setup Solidity Contracts
More Web3 & Cryptoupgrade-solidity-contractsopenzeppelin/openzeppelin-skills530 installsUpgrade Solidity contracts with OpenZeppelin UUPS, Transparent, or Beacon proxies, including storage safety rules.
develop-secure-contractsopenzeppelin/openzeppelin-skills624 installsSecure smart contract development with OpenZeppelin libraries covering tokens, access control, governance, and accounts across five ecosystems.
web3-testingwshobson/agents11.6K installsComprehensive smart contract testing guide covering Hardhat and Foundry, with unit tests, fuzzing, and mainnet forking.
ethereummindrally/skills788 installsExpert Solidity guidance covering security patterns, OpenZeppelin integration, gas optimization, and Hardhat testing workflows.
soliditymindrally/skills771 installsSecurity-focused Solidity guidance that covers gas optimization, testing tooling, and React wallet integration.
use-smart-contract-platformcirclefin/skills1K installsDeploy, import, call, and monitor smart contracts through Circle Smart Contract Platform APIs and SDKs.