heroui: Instructions file for Claude Code

CLAUDE.md

heroui CLAUDE.md is an instructions file for Claude Code from heroui-inc/heroui. It costs 8,137 tokens per session, scanned A, original, Apache-2.0.

A repository instruction file for HeroUI, a React interface library. It describes the project structure, tools, development commands, and testing commands.

In plain words
What is it for?
Working on HeroUI's pnpm monorepo, building packages, running the documentation site, linting, formatting, and running tests.
Why use it?
It gives coding agents the local context needed to make changes that fit the repository and to run the expected checks.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: mentions CLAUDE.md; names the TodoWrite tool; mentions Claude Code.

This is heroui-inc/heroui's own configuration. It tells Claude Code how to work on heroui itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything heroui configures →

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is cd ../...

About the project

HeroUI is a React component library that provides ready-made interface elements for building web applications. Developers use its components as building blocks in React projects. The catalogue includes agents, skills, and instructions for working with HeroUI.

heroui-inc/heroui · 30,974 stars · on GitHub · heroui.com

Reuse

Borrowing it

Nothing to install: this file belongs to heroui-inc/heroui. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/heroui-inc/heroui/v3/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/heroui-inc/heroui

Made for: Claude Code.

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 heroui CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/heroui-inc/heroui/claude-md/github.svg)](https://agentmods.dev/instructions/heroui-inc/heroui/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/heroui-inc/heroui/claude-md"><img src="https://agentmods.dev/badge/instructions/heroui-inc/heroui/claude-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for heroui CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/heroui-inc/heroui/claude-md"><img src="https://agentmods.dev/badge/instructions/heroui-inc/heroui/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 8,137 This file is loaded in full into every session.
When invoked 8,137 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.08137 $0.08137
Opus 5.5 $0.03255 $0.03255
Sonnet 5.5 $0.01627 $0.01627
Haiku 4.5 $0.00814 $0.00814

Measured 5d ago against content hash 918083673545, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

heroui 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 5d 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 · 882 lines

How it starts

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

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Repository Overview

HeroUI v3 is a modern React UI library built with Tailwind CSS v4, using a pnpm monorepo structure managed by Turborepo.

Key Technical Stack

  • Node.js: v22+ required
  • pnpm: v10.26.2 (package manager)
  • React: v19+
  • Tailwind CSS: v4.3.3
  • TypeScript: v5.9.3
  • Turborepo: Build orchestration
  • Storybook: Component development
  • Vitest: Testing framework

Use the workspace manifests and lockfile as the source of truth for exact dependency versions.

Development Commands

Core Development Commands

# Install dependencies (use --hoist flag)
pnpm i --hoist

# Start Storybook for component development
pnpm dev

# Start documentation site
pnpm dev:docs

# Build libraries (styles + React)
pnpm build

# Build React and its dependencies
pnpm build:react

# Build docs or Storybook
pnpm build:docs
pnpm build:storybook

# Run linting
pnpm lint

# Run tests (turbo → packages with a test script; jsdom + browser)
pnpm test

# Filter by file name (e.g. button.test.tsx)
pnpm --filter @heroui/react exec vitest run button

# Coverage (jsdom floors only — not a depth bar)
pnpm test:coverage

# Changed-set (local jsdom only; not a merge gate)
pnpm --filter @heroui/react test:changed

# Check formatting
pnpm run format

# Apply formatting fixes
pnpm run format:fix

# Run type checking
pnpm typecheck

Behavioral tests (@heroui/react)

  • Suites: packages/react/tests/components/<name>/ — *.test.tsx (jsdom), *.ssr.test.tsx (Client SSR via ssrSmoke(), not RSC), *.browser.test.tsx (Playwright for high-risk portals/overlays; not universal), optional fixtures.tsx
  • Harness: @heroui/testing/helpers (render, setupUser, runAllTimers, ssrSmoke, User); browser render from @heroui/testing/browser. Sources via @/. Pattern testers: user.createTester(...) — do not import createTester directly
  • Query/assert: role/label/text first; HeroUI data-* + light BEM + documented data-slot on compound parts; no colors, full class lists, or RAC internals
  • Timers: fake timers per-suite only; wire advanceTimers into setupUser + User
  • Naming: describe("Component"); nested concern; it as supports… / calls… / exposes… / renders…. SSR: "Component SSR"; browser: "Component (browser)"
  • Intentional skips: internals (rac, icons), non-exported helpers (color-input-group, date-input-group), in-progress calendar-year-picker, parent-covered parts (list-box-item, menu-item, …), Toast SSR (client portal — jsdom + browser). Public input-group has its own suite. SSR/browser are risk-based
  • Browser setup (once locally): pnpm --filter @heroui/testing exec playwright install chromium before pnpm test. PR QA uses the same command with --with-deps, then pnpm test:browser + pnpm test:coverage. Release CI installs Chromium and runs pnpm test
  • Commands: pnpm test (jsdom + browser, needs Chromium); filter with pnpm --filter @heroui/react exec vitest run <name>
  • Coverage: jsdom-only floors — green ≠ depth. Browser suites contribute nothing to the coverage number. Floors are a ratchet kept ~1pt under the measured run: raise them as coverage improves, never lower them to go green. test:changed: local jsdom shortcut only, not a merge gate
  • SSR/browser suites are risk-based — see "When a component needs an SSR or browser suite" in AGENTS.md. Add a browser suite when correctness depends on real layout, pointer capture, portal focus containment, or transitions; do not fake geometry in jsdom to chase coverage

Read the full file on GitHub · 882 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. 5d ago Changed · +41 lines · +707 tokens per session 918083673545
  2. 1mo ago Changed · +5 lines · +171 tokens per session 8644ddca3a2a
  3. 1mo ago Changed · +1 lines · +45 tokens per session d1d15783b37c
  4. 1mo ago First seen · 835 lines · 7,214 tokens per session scan A f9c635d683f0

Subscribe to this mod's changes

heroui CLAUDE.md is an instructions file published in the GitHub repository heroui-inc/heroui (30,974 stars, last pushed yesterday), licensed Apache-2.0. It adds 8,137 tokens to every session, about $0.0325 per session on Opus 5.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.

Related

Other instructions, from other repositories

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 9,649 tokens

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,384 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, cache eligibility and rollout and applying the notice (cutover).

microsoft/vscode · 5,262 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,680 tokens

vscode copilot-instructions.md

Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).

microsoft/vscode · 2,731 tokens

deno copilot-instructions.md

Copilot instructions for denoland/deno, covering deno development guide for github copilot, network access, high level overview, key directories and key files to understand first.

denoland/deno · 3,077 tokens