solidity-typescript-hardhat-template CLAUDE.md

solidity-typescript-hardhat-template CLAUDE.md is an instructions file for coding agents from protokol/solidity-typescript-hardhat-template. It costs 782 tokens per session, scanned A, original, MIT.

A project instruction file for a Solidity and TypeScript project managed with Hardhat. Solidity is used for blockchain smart contracts, and Hardhat is a tool for compiling, testing, formatting, and checking them.

In plain words
What is it for?
Use it when developing or testing the project’s ERC20, ERC721, or ERC1155 contracts. It guides compilation, Mocha and Chai tests, coverage, formatting, linting, and Solidity-specific checks.
Why use it?
It records the project’s exact contract patterns, library versions, commands, and testing rules. This helps the coding agent make changes that fit the existing token contracts and checks.

Instructions file

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/protokol/solidity-typescript-hardhat-template/claude-md
Clone the repo
git clone --depth 1 https://github.com/protokol/solidity-typescript-hardhat-template

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for solidity-typescript-hardhat-template CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/protokol/solidity-typescript-hardhat-template/claude-md.svg)](https://agentmods.dev/instructions/protokol/solidity-typescript-hardhat-template/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/protokol/solidity-typescript-hardhat-template/claude-md"><img src="https://agentmods.dev/badge/instructions/protokol/solidity-typescript-hardhat-template/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 782 This file is loaded in full into every session.
When invoked 782 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00782 $0.00782
Opus 5 $0.00391 $0.00391
Sonnet 5 $0.00156 $0.00156
Haiku 4.5 $0.00078 $0.00078

Measured 4d ago against content hash f3047fe62b2f, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

solidity-typescript-hardhat-template CLAUDE.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

CLAUDE.md · 69 lines

How it starts

The opening of the file, as written. The whole thing — 69 lines — stays where its author put it; the contents beside it link to each section on GitHub.

CLAUDE.md — Project Instructions

Project Overview

Solidity/TypeScript Hardhat v3 template with ERC20, ERC721, and ERC1155 token contracts using OpenZeppelin v5 patterns.

Key Commands

npm run compile        # Compile Solidity contracts
npm run test           # Run Mocha/Chai test suite
npm run coverage       # Run tests with coverage report
npm run format:write   # Format TypeScript/config files with Prettier
npm run sol:format:write  # Format Solidity files with Prettier
npm run lint:fix       # Fix ESLint issues
npm run solhint        # Lint Solidity with Solhint

Solidity Conventions

  • Solidity version: pragma solidity 0.8.28; — use this exact version, not a range
  • OpenZeppelin v5: Import from @openzeppelin/contracts/ (v5.6.1)
  • Contract patterns: Ownable + Pausable for access control; pass initialOwner to Ownable constructor
  • Naming: PascalCase for contracts (e.g., BasicERC20), use SPDX license identifier MIT
  • Override pattern: When inheriting multiple contracts with shared functions, use override(Contract1, Contract2) and call super

Test Conventions

  • Framework: Mocha + Chai with expect style assertions
  • Fixture pattern: Each test file defines a setupFixture async function, used via loadFixture(setupFixture)
  • Hardhat setup: Use top-level await hre.network.connect() to get ethers and networkHelpers
  • Test structure: describe block per contract, nested describe for functionality groups
  • Assertions: Use revertedWithCustomError for access control checks (OpenZeppelin v5 custom errors)
  • File naming: Test file matches contract name (e.g., BasicERC721.ts tests BasicERC721.sol)

Task Conventions

  • Located in tasks/ organized by token type (e.g., tasks/erc20/, tasks/erc721/)
  • Use Hardhat v3 task API: task().addOption().setInlineAction().build()
  • Export named const (e.g., erc20MintTask) and register in hardhat.config.ts
  • Include usage example in JSDoc comment above the task

Read the full file on GitHub · 69 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 69 lines · 782 tokens per session scan A f3047fe62b2f

Subscribe to this mod's changes

solidity-typescript-hardhat-template CLAUDE.md is an instructions file published in the GitHub repository protokol/solidity-typescript-hardhat-template (48 stars, last pushed yesterday), licensed MIT. It adds 782 tokens to every session, about $0.0039 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.