# Build with AI

Description: How to build with Hardhat using coding agents

Note: This document was authored using MDX

  Source: https://github.com/NomicFoundation/hardhat-website/tree/main/src/content/docs/docs/guides/build-with-ai.mdx

  Components used in this page:
    - <Run cmd="..."/>: Runs a command in the terminal with npm/pnpm/yarn.
    - <RunRemote>: Runs a command in the terminal with npx/pnpm dlx/yarn dlx.

import RunRemote from "@hh/RunRemote.astro";

This guide explains how to use coding agents effectively in Hardhat projects.

## Agent skills

LLMs are good at working with Hardhat, but they tend to prefer Hardhat 2 APIs. A small amount of extra context about Hardhat 3 is usually enough to steer them in the right direction.

The easiest way to provide that context is to install our main Hardhat skill:

<RunRemote command="skills add nomicfoundation/hardhat-skills --skill hardhat" />

### Project-specific skills

Hardhat projects are extensible and can rely on different plugins, so we also publish skills tailored to specific setups.

If your project is based on [`hardhat-toolbox-viem`](/docs/plugins/hardhat-toolbox-viem), install the corresponding skill:

<RunRemote command="skills add nomicfoundation/hardhat-skills --skill hardhat-toolbox-viem" />

If your project is based on [`hardhat-toolbox-mocha-ethers`](/docs/plugins/hardhat-toolbox-mocha-ethers):

<RunRemote command="skills add nomicfoundation/hardhat-skills --skill hardhat-toolbox-mocha-ethers" />

## Documentation

Hardhat docs are agent-friendly: we offer an [`llms.txt`](/llms.txt) index, and any docs page is also available as Markdown. Pointing your agent at our docs should just work.
