setup-solidity-contracts

Initialize Solidity projects with OpenZeppelin Contracts for Hardhat or Foundry.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/phpmac/foundry --skill setup-solidity-contracts-phpmac
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: setup-solidity-contracts
Source: https://github.com/phpmac/foundry/tree/main/.agents/skills/setup-solidity-contracts
Command: npx skills add https://github.com/phpmac/foundry --skill setup-solidity-contracts-phpmac

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This guide streamlines the initial setup of Solidity projects by guiding users through choosing a framework (Hardhat or Foundry), installing OpenZeppelin Contracts, configuring remappings for Foundry, and understanding Solidity import conventions for OpenZeppelin.

Core Features & Use Cases

  • Hardhat Setup: Initialize a new or existing Hardhat project and install OpenZeppelin Contracts.
  • Foundry Setup: Initialize a Foundry project and add OpenZeppelin Contracts, including upgradeable variants when needed.
  • Import & Remappings: Provide remapping configurations and import conventions to ensure correct project compilation and verification.

Quick Start

Follow this guide to initialize a new Hardhat or Foundry project and install OpenZeppelin Contracts.

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 a Solidity project with OpenZeppelin contracts?

Setting up a Solidity project with OpenZeppelin contracts involves initializing a framework like Hardhat or Foundry, installing the OpenZeppelin dependencies, and configuring remappings to ensure correct compilation.

What's the best way to install OpenZeppelin in Foundry vs Hardhat?

For Hardhat, you install OpenZeppelin using npm. For Foundry, you add it via submodules, then configure remappings to map import paths correctly. Both frameworks support standard OpenZeppelin contract integration.

Why do I need remappings for OpenZeppelin in Foundry?

Remappings are required in Foundry to alias import paths, allowing the compiler to correctly resolve OpenZeppelin contract directories and ensure successful project compilation and verification.

Can I add OpenZeppelin contracts to an existing Solidity project?

Yes, you can add OpenZeppelin contracts to an existing Solidity project by installing the dependencies in your current Hardhat or Foundry environment and applying the correct remapping configurations.

What are the import conventions for OpenZeppelin upgradeable contracts?

Import conventions for OpenZeppelin upgradeable contracts require specific remapping configurations in Foundry to correctly route the upgradeable variants and maintain consistent import paths across your Solidity files.