forge-testing

Automate Solidity contract testing with Foundry's forge test.

Updated Jan 21, 2026
One-click install
npx skills add https://github.com/cyotee/foundry-skills --skill forge-testing
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: forge-testing
Source: https://github.com/cyotee/foundry-skills/tree/main/skills/forge-testing
Command: npx skills add https://github.com/cyotee/foundry-skills --skill forge-testing

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Writing and running Solidity tests can be repetitive and error-prone without a structured framework. Forge testing provides a standardized approach to verify contract behavior across unit, integration, and fuzz tests using Foundry's forge test, cheatcodes, and assertions.

Core Features & Use Cases

  • Standardized test structure for Solidity contracts
  • Built-in cheatcodes, assertions, and patterns to prove correctness
  • Run tests across local and forked environments, with fixtures and naming conventions

Quick Start

Run forge test to execute your Solidity tests and verify contract behavior.

Frequently Asked Questions about forge-testing

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

FAQPage Schema
How do I run Solidity unit tests and integration tests using Foundry?

Run Solidity unit tests and integration tests using Foundry by executing forge test to validate contract behavior across local and forked environments with built-in assertions and fixtures.

How do Foundry cheatcodes work when testing Solidity contracts?

Foundry cheatcodes work by altering the EVM state during Solidity contract testing, allowing you to mock time, impersonate addresses, and assert expected behavior to prove contract correctness.

Do I need forge-std compatibility to test Solidity contracts with Foundry?

Yes, you need forge-std compatibility to test Solidity contracts with Foundry, as it provides the standardized testing structure, assertions, and common patterns required to run forge test.

Can I run Solidity tests across forked environments with Foundry?

Yes, you can run Solidity tests across forked environments with Foundry to validate contract behavior against real blockchain state using forge test alongside supported test fixtures.

What is the best way to structure Solidity test fixtures for Foundry?

The best way to structure Solidity test fixtures for Foundry is to follow standardized naming conventions and use forge-std assertions to verify contract behavior across unit and integration tests.

Why does my forge test fail when validating Solidity contract behavior?

Your forge test may fail when validating Solidity contract behavior due to incorrect assertions, unsupported cheatcodes, or incompatibility with forge-std in local or forked test environments.