Skip to content

Add AI agent skill for Hardhat V2 to V3 migration (issue #8016)#8039

Open
jose-compu wants to merge 13 commits into
NomicFoundation:mainfrom
jose-compu:feature/hardhat-v2-to-v3-migration-skill
Open

Add AI agent skill for Hardhat V2 to V3 migration (issue #8016)#8039
jose-compu wants to merge 13 commits into
NomicFoundation:mainfrom
jose-compu:feature/hardhat-v2-to-v3-migration-skill

Conversation

@jose-compu
Copy link
Copy Markdown
Contributor

  • Because this PR includes a bug fix, relevant tests have been included.
  • Because this PR includes a new feature, the change was previously discussed on an Issue or with someone from the team.
  • I didn't do anything of this.

AI Agent Skill for Hardhat V2 to V3 Migration

Closes #8016

Summary

Adds a SKILL.md file that AI agents (Cursor, Claude Code, Codex, etc.) can use to systematically migrate a Hardhat V2 project to V3.

The skill covers:

  • Core migration: ESM, declarative config, configVariable(), explicit network connections
  • Full plugin ecosystem: migration map for 16+ plugins (hardhat-deploy, hardhat-gas-reporter, hardhat-contract-sizer, hardhat-verify, @openzeppelin/hardhat-upgrades, solidity-coverage, TypeChain, etc.)
  • Test migration: ESM syntax, hre.network.connect(), updated Chai matchers, network helpers, loadFixture pattern
  • Custom tasks: builder pattern with .build(), hooks system replacing subtasks/extendConfig/extendEnvironment
  • Troubleshooting: common errors and their fixes
  • Quick reference table: V2 vs V3 equivalents at a glance

File placement note

I placed the skill at skills/hardhat-v2-to-v3-migration/SKILL.md but I'm not sure where skills should live in the Hardhat repo structure. Happy to move it wherever the team prefers.

Sources

Built from the official migration docs:

Copilot AI review requested due to automatic review settings March 8, 2026 05:44
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Mar 8, 2026

🦋 Changeset detected

Latest commit: bfb8dc0

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 0 packages

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an AI-agent-oriented migration “skill” document to guide upgrading Hardhat v2 projects to Hardhat v3, including core config/test changes and a plugin ecosystem mapping.

Changes:

  • Introduces a new SKILL.md with a phased migration checklist (audit → core migration → plugins → tests → tasks → verification).
  • Provides plugin migration map + examples for v3 declarative plugin/task configuration.
  • Adds troubleshooting + quick-reference tables for common v2→v3 differences.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread skills/hardhat-v2-to-v3-migration/SKILL.md Outdated
Comment thread skills/hardhat-v2-to-v3-migration/SKILL.md
Comment thread skills/hardhat-v2-to-v3-migration/SKILL.md
Comment thread skills/hardhat-v2-to-v3-migration/SKILL.md Outdated
Comment thread skills/hardhat-v2-to-v3-migration/SKILL.md Outdated
Comment thread skills/hardhat-v2-to-v3-migration/SKILL.md Outdated
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings March 8, 2026 05:55
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 6 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread skills/hardhat-v2-to-v3-migration/SKILL.md
Comment thread skills/hardhat-v2-to-v3-migration/SKILL.md
Comment thread skills/hardhat-v2-to-v3-migration/SKILL.md
Comment thread skills/hardhat-v2-to-v3-migration/SKILL.md Outdated
Comment thread skills/hardhat-v2-to-v3-migration/SKILL.md
Comment thread skills/hardhat-v2-to-v3-migration/SKILL.md
Copilot AI review requested due to automatic review settings March 8, 2026 06:03
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread skills/hardhat-v2-to-v3-migration/SKILL.md Outdated
Comment thread skills/hardhat-v2-to-v3-migration/SKILL.md Outdated
Comment thread skills/hardhat-v2-to-v3-migration/SKILL.md Outdated
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings March 8, 2026 06:28
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread skills/hardhat-v2-to-v3-migration/SKILL.md Outdated
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings March 8, 2026 06:33
jose-compu and others added 3 commits March 8, 2026 07:34
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread skills/hardhat-v2-to-v3-migration/SKILL.md
Comment thread skills/hardhat-v2-to-v3-migration/SKILL.md
@kanej kanej added no changeset needed This PR doesn't require a changeset no docs needed This PR doesn't require links to documentation no peer bump needed labels Mar 9, 2026
@jose-compu
Copy link
Copy Markdown
Contributor Author

@kanej thanks for you help, I am an external contributor. Does this SKILL.md goes here or somewhere else in another repo or web?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no changeset needed This PR doesn't require a changeset no docs needed This PR doesn't require links to documentation no peer bump needed status:triaging

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create an AI agent skill for Hardhat V2 to V3 migration

4 participants