Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

hardhat

Skill by NomicFoundation

Guides an AI assistant through writing and changing Hardhat 3 tests, in both Solidity and TypeScript. It covers the network connection API, networkHelpers, and the compile-then-typecheck workflow. Intended for developers working on Hardhat 3 projects.

  • Score 85
  • 8.5k stars
  • NOASSERTION
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install hardhat

Built from the published package, never by AI.

git clone --depth 1 https://github.com/NomicFoundation/hardhat /tmp/hardhat && mkdir -p ~/.claude/skills && cp -r /tmp/hardhat/packages/hardhat/skills/hardhat ~/.claude/skills/hardhat

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install hardhat in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

This skill gives an AI assistant guidance for working on Hardhat 3 projects. It explains when to write Solidity tests and when to write TypeScript tests, and it covers the forge-std cheatcodes available in Solidity tests, such as vm.prank, vm.deal, vm.warp and vm.expectRevert.

It also documents the network connection created by network.create(), the networkHelpers object for time, block, account and fixture control, and the workflow of running hardhat build before a TypeScript typecheck. Toolbox-specific details such as clients, contract calls and assertions are left to companion skills for hardhat-toolbox-viem and hardhat-toolbox-mocha-ethers. The skill is aimed at developers who write or modify tests and configuration in Hardhat 3.

Written from the project's SKILL.md and checked against it.

What it can do

  • Test layer choiceExplains when to use Solidity tests and when to use TypeScript tests.
  • Solidity test guidanceShows how to write test contracts with forge-std assertions and cheatcodes.
  • Cheatcode referenceLists common vm cheatcodes such as prank, deal, warp, roll and expectRevert.
  • Network connection APIDescribes creating isolated network connections with network.create().
  • networkHelpersCovers time, block, account, balance and fixture helpers for EVM state.
  • Snapshots and fixturesExplains loadFixture and manual takeSnapshot and restore for faster test suites.
  • Typecheck workflowRecommends running hardhat build before tsc to catch argument and type errors.

What you need

  • A Hardhat 3 project
  • ESM support, since Hardhat 3 only works with ESM
  • forge-std in package.json for Solidity test assertions
  • A matching hardhat-toolbox skill for toolbox-specific guidance

Try asking

  • Write Solidity tests for my Counter contract using forge-std
  • Add a loadFixture setup to my Hardhat 3 TypeScript test
  • Use networkHelpers to advance time in my vesting test

Good to know

  • Covers Hardhat 3 only
  • Toolbox-specific clients, contract calls and assertions are in separate companion skills
  • Solidity test assertions rely on forge-std being present

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: packages/hardhat/skills/hardhat/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Inside the skill

  • SKILL.md7 KB

Alternatives to hardhat

All alternatives →
openclaw-github-repo-commandersickn33
94

Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.

AAA Skill 50k
gradiogradio-app
94

Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.

AAA Skill 44k
hig-components-menussickn33
94

Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.

AAA Skill 50k
fastapi-templateswshobson
94

Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.

AAA Skill 43k
appfunctionsandroid
94

Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.

AAA Skill 11k
agent-qa-authoringsickn33
94

Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.

AAA Skill 50k

Compare with openclaw-github-repo-commander, gradio or hig-components-menus

hardhat: common questions

What is the difference between Solidity and TypeScript tests in Hardhat 3?

The source says Solidity tests are the default for unit tests on individual contracts and run directly in the EVM. TypeScript tests are for off-chain orchestration, multi-contract flows and integration scenarios.

Does this skill cover viem or ethers contract calls?

No. The source says clients, contract interaction and ecosystem assertions live in the companion hardhat-toolbox-viem and hardhat-toolbox-mocha-ethers skills.

How do I run only the Solidity tests in Hardhat 3?

The source says hardhat test solidity runs Solidity tests only, while hardhat test runs both Solidity and TypeScript tests.

How do I install hardhat?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is hardhat free?

The code is published under the NOASSERTION licence. The service it connects to may have its own pricing.

Is hardhat safe to use?

It scores 85 of 100. Grades: maintenance A, licence F, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to hardhat?

Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.

hardhat Install

Add to stack

Loading.