Agent skill

Scaffold Eth Patterns

by ccashwell in ccashwell/evm-cortex

A skill your agent uses when building with Scaffold-ETH 2. An agent skill from ccashwell/evm-cortex.

MITAuto-check passedDevelopment

Install Scaffold Eth Patterns

skills CLI
$ npx skills add ccashwell/evm-cortex --skill scaffold-eth-patterns -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install ccashwell/evm-cortex scaffold-eth-patterns --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/ccashwell/evm-cortex.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/scaffold-eth-patterns .claude/skills/scaffold-eth-patterns && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
scaffold-eth-patterns
GitHub stars
131
Token cost
~2k tokens
SKILL.md length
300 words
Files
1
Skills in repo
89
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when building with Scaffold-ETH 2. An agent skill from ccashwell/evm-cortex.

  • Works in 4 steps: Edit Solidity in… → Run yarn deploy — recompiles and redeploys → Frontend auto-detects new ABI and… → …
  • Building with Scaffold-ETH 2
  • SKILL.md covers Overview, Quick Start, Project Structure and Custom Hooks, plus 8 more sections
  • Calls yarn and npx

What it does

Scaffold Eth Patterns is an agent skill from ccashwell/evm-cortex. Use when building with Scaffold-ETH 2. Covers project structure, custom hooks (useScaffoldReadContract, useScaffoldWriteContract), debug page, deploying contracts, hot reload, and wagmi integration.

Its SKILL.md is about 2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development. It works with viem and wagmi. The repository describes itself as: Ethereum protocol engineering squad for AI coding assistants. The licence is MIT.

When your agent uses it

  • Building with Scaffold-ETH 2

Example prompts

  • “/scaffold-eth-patterns”

Requirements

  • Node.js

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Edit Solidity in packages/foundry/contracts/
  2. Run yarn deploy — recompiles and redeploys
  3. Frontend auto-detects new ABI and addresses
  4. Debug page updates immediately

What it can do on your machine

Read from SKILL.md and the folder at commit f8f3301. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • yarn
    • npx

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use yarn and npx, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Scaffold Eth Patterns loads about 2k tokens when it runs. Until then it costs about 55 tokens; SKILL.md has 300 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~55
When it runs · the whole SKILL.md, loaded when a task matches
~2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from ccashwell/evm-cortex at commit f8f3301, republished under its MIT licence (© ccashwell). 300 words, ~1,969 tokens.

Download SKILL.mdSave it as .claude/skills/scaffold-eth-patterns/SKILL.md (or your agent's skills folder).
name
scaffold-eth-patterns
description
Use when building with Scaffold-ETH 2. Covers project structure, custom hooks (useScaffoldReadContract, useScaffoldWriteContract), debug page, deploying contracts, hot reload, and wagmi integration.

Scaffold-ETH 2 Patterns

Overview

Scaffold-ETH 2 is an open-source toolkit for rapid dApp prototyping. It combines Foundry (or Hardhat) + Next.js + wagmi + RainbowKit with custom hooks that simplify contract interaction. Key difference from raw wagmi: Scaffold hooks auto-detect ABIs from deployed contracts and wait for transaction confirmations.

Quick Start

bash
npx create-eth@latest my-dapp
cd my-dapp
yarn install

Start all services:

bash
# Terminal 1: Local chain
yarn chain

# Terminal 2: Deploy contracts
yarn deploy

# Terminal 3: Start frontend
yarn start

Project Structure

my-dapp/
├── packages/
│   ├── foundry/            # Smart contracts
│   │   ├── contracts/      # Solidity sources
│   │   ├── script/         # Deploy scripts
│   │   ├── test/           # Contract tests
│   │   └── foundry.toml
│   └── nextjs/             # Frontend
│       ├── app/            # Next.js app router pages
│       ├── components/     # React components
│       ├── contracts/      # Auto-generated contract data
│       ├── hooks/scaffold-eth/ # Custom hooks
│       ├── scaffold.config.ts  # Global config
│       └── utils/scaffold-eth/ # Utilities
├── package.json
└── yarn.lock

Custom Hooks

useScaffoldReadContract

Reads contract state with auto-detected ABI:

tsx
import { useScaffoldReadContract } from "~~/hooks/scaffold-eth";

function GreeterDisplay() {
  const { data: greeting, isLoading } = useScaffoldReadContract({
    contractName: "YourContract",
    functionName: "greeting",
  });

  // With arguments
  const { data: balance } = useScaffoldReadContract({
    contractName: "YourContract",
    functionName: "balanceOf",
    args: ["0xAddress"],
  });

  if (isLoading) return <p>Loading...</p>;
  return <p>Greeting: {greeting}</p>;
}
useScaffoldWriteContract

Writes to contracts with automatic confirmation waiting:

tsx
import { useScaffoldWriteContract } from "~~/hooks/scaffold-eth";

function SetGreeting() {
  const { writeContractAsync, isPending } = useScaffoldWriteContract("YourContract");

  const handleSubmit = async () => {
    try {
      // This waits for the tx to be confirmed (unlike raw wagmi)
      await writeContractAsync({
        functionName: "setGreeting",
        args: ["Hello from Scaffold-ETH!"],
        value: parseEther("0.01"), // Optional ETH value
      });
      console.log("Transaction confirmed!");
    } catch (e) {
      console.error("Transaction failed:", e);
    }
  };

  return (
    <button onClick={handleSubmit} disabled={isPending}>
      {isPending ? "Sending..." : "Set Greeting"}
    </button>
  );
}
useScaffoldContract

Get a contract instance for direct interaction:

tsx
import { useScaffoldContract } from "~~/hooks/scaffold-eth";

function ContractInfo() {
  const { data: contract } = useScaffoldContract({
    contractName: "YourContract",
  });

  // Access contract address and ABI
  console.log("Address:", contract?.address);
  console.log("ABI:", contract?.abi);
}
useScaffoldEventHistory

Read historical events:

tsx
import { useScaffoldEventHistory } from "~~/hooks/scaffold-eth";

function EventLog() {
  const { data: events, isLoading } = useScaffoldEventHistory({
    contractName: "YourContract",
    eventName: "GreetingChange",
    fromBlock: 0n,
    watch: true,  // Live updates
  });

  return (
    <ul>
      {events?.map((event, i) => (
        <li key={i}>
          {event.args.greetingSetter}: {event.args.newGreeting}
        </li>
      ))}
    </ul>
  );
}

Deploy Scripts

solidity
// packages/foundry/script/Deploy.s.sol
pragma solidity ^0.8.20;

import {ScaffoldETHDeploy} from "./DeployHelpers.s.sol";
import {YourContract} from "../contracts/YourContract.sol";

contract DeployScript is ScaffoldETHDeploy {
    function run() external ScaffoldEthDeployerRunner {
        YourContract yourContract = new YourContract(deployer);
        console.logString(string.concat("YourContract deployed at: ", vm.toString(address(yourContract))));
    }
}
bash
# Deploy to local chain
yarn deploy

# Deploy to a specific network
yarn deploy --network base

# Reset deployments
yarn deploy --reset

Debug Page

Scaffold-ETH includes a debug page at /debug that auto-generates a UI for all contract functions:

  • Lists all read functions with call buttons
  • Lists all write functions with input fields
  • Displays events in real-time
  • Shows contract address and balance
  • Works with any deployed contract (auto-detected from ABI)

Access at: http://localhost:3000/debug

Hot Reload

Scaffold-ETH watches for contract changes:

  1. Edit Solidity in packages/foundry/contracts/
  2. Run yarn deploy — recompiles and redeploys
  3. Frontend auto-detects new ABI and addresses
  4. Debug page updates immediately

The deployedContracts.ts file is auto-generated on each deploy.

Scaffold-ETH vs Raw Wagmi

FeatureScaffold-ETHRaw Wagmi
ABI managementAuto-detectedManual import
Tx confirmationAuto-waitsManual useWaitForTransactionReceipt
Contract addressAuto-resolvedManual address
Debug UIBuilt-in /debugBuild your own
Hot reloadContracts auto-updateManual config
Multi-chainConfig-basedManual setup
Prototyping speedVery fastModerate
Production flexibilityLimitedFull control
Key Difference: Transaction Confirmation
tsx
// Scaffold-ETH: writeContractAsync waits for confirmation
await writeContractAsync({ functionName: "setGreeting", args: ["Hello"] });
// Transaction is CONFIRMED here

// Raw wagmi: need separate hook for confirmation
const { writeContract, data: hash } = useWriteContract();
const { isSuccess } = useWaitForTransactionReceipt({ hash });
// Must track isSuccess separately

Configuration

typescript
// packages/nextjs/scaffold.config.ts
import { defineConfig } from "~~/utils/scaffold-eth/defineConfig";

export default defineConfig({
  targetNetworks: [chains.foundry],  // Local dev
  // targetNetworks: [chains.base],  // Production
  pollingInterval: 30000,
  onlyLocalBurnerWallet: true,       // Dev only
  walletAutoConnect: true,
});

Adding a New Contract

  1. Create contract in packages/foundry/contracts/
  2. Add to deploy script in packages/foundry/script/Deploy.s.sol
  3. Run yarn deploy
  4. Contract automatically appears in debug page and hooks
solidity
// packages/foundry/contracts/Vault.sol
pragma solidity ^0.8.20;

contract Vault {
    mapping(address => uint256) public balances;

    event Deposited(address indexed user, uint256 amount);

    function deposit() external payable {
        balances[msg.sender] += msg.value;
        emit Deposited(msg.sender, msg.value);
    }

    function withdraw(uint256 amount) external {
        require(balances[msg.sender] >= amount, "Insufficient");
        balances[msg.sender] -= amount;
        (bool ok,) = msg.sender.call{value: amount}("");
        require(ok, "Transfer failed");
    }
}

Production Deployment

bash
# Build frontend
yarn next:build

# Deploy contracts to production chain
yarn deploy --network base

# The frontend reads from the generated contract data
# Deploy frontend to Vercel, IPFS, etc.

When to Use Scaffold-ETH

  • Use for: Prototyping, hackathons, learning, MVPs, internal tools
  • Consider raw wagmi for: Production dApps needing full customization, complex multi-contract UIs, or specific UX patterns
  • Migration path: Start with Scaffold-ETH, extract components to raw wagmi as needed

© ccashwell, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/scaffold-eth-patterns of ccashwell/evm-cortex.

Open the folder on GitHubat commit f8f3301

Compare with similar skills

Scaffold Eth Patterns next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Scaffold Eth Patterns compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Scaffold Eth Patterns this skillccashwell/evm-cortex131—~2kAutomated safety check: PassMIT
Wagmi Feature Developmentwevm/wagmi6.8k—~3.8kAutomated safety check: PassMIT
Error Handlingalchemyplatform/aa-sdk321—~299Automated safety check: PassMIT
Reviewmorpho-org/morpho-blue-liquidation-bot115—~703Automated safety check: PassMIT
NEAR Intents Swap Integrationinternet-court/internet-court-skill6.4k2 repos~939Automated safety check: PassCustom licence
Vibenetbase/skills121—~2.7kAutomated safety check: PassMIT

Similar skills

  • Walks through adding a Wagmi feature across its layers: a Viem-based core action, TanStack Query options, and React and Vue bindings.

    6.8k GitHub stars~3.8k tokensUpdated 6 days ago
    DevelopmentAuto-check passed
  • Error Handling

    alchemyplatform/aa-sdk

    A skill your agent uses when throwing, catching, wrapping, documenting, or testing runtime errors in aa-sdk packages.

    321 GitHub stars~299 tokensUpdated 2 days ago
    DevelopmentAuto-check passed
  • Review

    morpho-org/morpho-blue-liquidation-bot

    Review code against CLAUDE.md standards with focus on multi-chain safety, BigInt precision, and config separation.

    115 GitHub stars~703 tokensUpdated 2 mo ago
    Agent WorkflowsAuto-check passed
  • NEAR Intents Swap Integration

    internet-court/internet-court-skill

    Builds cross-chain token swaps and bridge flows with the NEAR Intents 1Click API: quotes, deposit addresses, per-chain deposits and status polling.

    6.4k GitHub starsUsed in 2 repos~939 tokens
    Backend & APIsAuto-check passed
  • Vibenet

    base/skills

    Build on vibenet — Base's devnet for native account abstraction (EIP-8130), payer gas sponsorship (ERC-8168), and Cobalt 200ms native blocks.

    121 GitHub stars~2.7k tokensUpdated 6 days ago
    Backend & APIsAuto-check passed
  • Build On Base

    base/skills

    Complete Base development playbook. An agent skill from base/skills.

    121 GitHub stars~804 tokensUpdated 6 days ago
    AI & LLM EngineeringAuto-check passed

More from ccashwell/evm-cortex

All 89 skills in this repo
  • Xray Pre Audit

    ccashwell/evm-cortex

    A skill your agent uses when preparing for a security audit, performing reconnaissance on a new codebase, or creating a protocol overview.

    131 GitHub stars~25k tokensUpdated 8 days ago
    Auto-check passed
  • Aave Integration

    ccashwell/evm-cortex

    A skill your agent uses when integrating with Aave V3 for lending, borrowing, flash loans, or building on top of Aave markets.

    131 GitHub stars~1.3k tokensUpdated 8 days ago
    Auto-check passed
  • Access Control Patterns

    ccashwell/evm-cortex

    Access control design patterns for Solidity protocols. An agent skill from ccashwell/evm-cortex.

    131 GitHub stars~1.8k tokensUpdated 8 days ago
    Auto-check passed
  • Anvil Patterns

    ccashwell/evm-cortex

    A skill your agent uses when running a local Ethereum node with Anvil.

    131 GitHub stars~1.3k tokensUpdated 8 days ago
    Auto-check passed
  • Audit Breadth Scan

    ccashwell/evm-cortex

    A skill your agent uses when performing systematic breadth-first review of all contracts during a security audit.

    131 GitHub stars~1.4k tokensUpdated 8 days ago
    Auto-check passed
  • Audit Depth Analysis

    ccashwell/evm-cortex

    A skill your agent uses when performing deep analysis of specific findings or high-risk areas during a security audit.

    131 GitHub stars~1.6k tokensUpdated 8 days ago
    Auto-check passed

Works with

Categories

Questions about Scaffold Eth Patterns

What does Scaffold Eth Patterns do?

A skill your agent uses when building with Scaffold-ETH 2. An agent skill from ccashwell/evm-cortex. Scaffold Eth Patterns is an agent skill from ccashwell/evm-cortex. Use when building with Scaffold-ETH 2.

When should I use Scaffold Eth Patterns?

Scaffold Eth Patterns fits situations like: building with Scaffold-ETH 2.

How do I install Scaffold Eth Patterns in Claude Code?

Run `npx skills add ccashwell/evm-cortex --skill scaffold-eth-patterns -a claude-code`. Or copy the skill folder (skills/scaffold-eth-patterns in ccashwell/evm-cortex) into .claude/skills/scaffold-eth-patterns in your project. Claude Code loads it when a task matches its description.

How do I install Scaffold Eth Patterns in Codex?

Run `npx skills add ccashwell/evm-cortex --skill scaffold-eth-patterns -a codex`. Or copy the skill folder (skills/scaffold-eth-patterns in ccashwell/evm-cortex) into .agents/skills/scaffold-eth-patterns in your project. Codex loads it when a task matches its description.

Can I use Scaffold Eth Patterns in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ccashwell/evm-cortex --skill scaffold-eth-patterns -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/scaffold-eth-patterns, .gemini/skills/scaffold-eth-patterns, .github/skills/scaffold-eth-patterns and .opencode/skills/scaffold-eth-patterns in your project.

What does Scaffold Eth Patterns need to run?

Going by SKILL.md and its folder, Scaffold Eth Patterns needs the command-line tools its instructions call (yarn and npx). Our summary lists: Node.js.

Does Scaffold Eth Patterns access the network?

SKILL.md contains no URLs. Its commands use npx, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Scaffold Eth Patterns safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Scaffold Eth Patterns use?

Scaffold Eth Patterns is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Scaffold Eth Patterns use?

About 2k tokens (SKILL.md is roughly 7.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Scaffold Eth Patterns?

Skills that share tags, products or a category with Scaffold Eth Patterns: Wagmi Feature Development (wevm/wagmi, 6.8k stars), Error Handling (alchemyplatform/aa-sdk, 321 stars), Review (morpho-org/morpho-blue-liquidation-bot, 115 stars) and NEAR Intents Swap Integration (internet-court/internet-court-skill, 6.4k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Scaffold Eth Patterns?

ccashwell (a GitHub user) maintains it in ccashwell/evm-cortex, which has 131 GitHub stars. The repository holds 89 skills in this directory. The repository was last updated on September 30, 2026.

Source: ccashwell/evm-cortex on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.