heroui CLAUDE.md

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

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/heroui-inc/heroui/claude-md
Clone the repo
git clone --depth 1 https://github.com/heroui-inc/heroui
Per session 7,214 This file is loaded in full into every session.
When invoked 7,214 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.07214 $0.07214
Opus 5 $0.03607 $0.03607
Sonnet 5 $0.01443 $0.01443
Haiku 4.5 $0.00721 $0.00721

Measured yesterday against content hash f9c635d683f0, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 yesterday.

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 · 835 lines

How it starts

The opening of the file, as written. The whole thing — 835 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.1.18
  • TypeScript: v5.9.3
  • Turborepo: Build orchestration
  • Storybook: Component development
  • Vitest: Testing framework

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 all packages
pnpm build

# Build specific package
pnpm build --filter=@heroui/react

# 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

# Run formatting
pnpm run format

# 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): playwright install chromium before pnpm test. CI: --with-deps, then test:browser + test:coverage
  • Commands: pnpm test (jsdom + browser, needs Chromium); filter with pnpm --filter @heroui/react exec vitest run <name>
  • Coverage: jsdom-only floors — green ≠ depth. test:changed: local jsdom shortcut only, not a merge gate

Read the full file on GitHub · 835 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. yesterday 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,501 stars, last pushed 3d ago), licensed Apache-2.0. It adds 7,214 tokens to every session, about $0.0361 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.

Related

Other instructions, from other repositories

shadcn-htmx AGENTS.md

Instructions for productdevbook/shadcn-htmx, covering agent guide, hard rules, what's vendored, and when to read each, repos/htmx/ — htmx v4 source (branch: four-dev) and repos/tailwindcss/ — tailwind css v4 source (branch: main).

productdevbook/shadcn-htmx · 2,254 tokens

next.js 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,296 tokens

recharts AGENTS.md

Instructions for recharts/recharts: This is Recharts repository. Recharts is a React-based charting library. The goal is to provide a simple, declarative, and composable way to build charts. We value consistency, usability, and performance. Accessibility is important.

recharts/recharts · 310 tokens

magicui AGENTS.md

Instructions for magicuidesign/magicui, covering project context, key principles, before writing code, rules and accessibility (a11y).

magicuidesign/magicui · 3,445 tokens

tiny-vue AGENTS.md

Instructions for opentiny/tiny-vue, covering agents.md, 项目概述, 关键目录结构, 环境要求 and 核心命令.

opentiny/tiny-vue · 2,171 tokens

legacy-lands-library AGENTS.md

Instructions for LegacyLands/legacy-lands-library, covering ✅ 开发与协作规范(学习与编程行为指南), 1. 当你尝试编写一个新功能、添加新类或书写 javadoc 时, 2. 你必须制定清晰的 todo 任务清单,并在开发完成后遵循以下规则:, 3. 命名规范(类、字段、变量、方法) and 4. 数据处理优先使用 stream api(尤其是过滤、映射、聚合等操作).

LegacyLands/legacy-lands-library · 5,163 tokens