heroui: Agent for Claude Code

.claude/agents/heroui-docs-writer.md

heroui-docs-writer is an agent for Claude Code from heroui-inc/heroui. It costs 0 tokens per session (3,588 once invoked), scanned A, original, Apache-2.0.

A technical documentation agent for HeroUI v3, a React component library. It creates concise guides, API explanations, installation instructions, migration notes, and usage examples based on the component code and Storybook stories.

In plain words
What is it for?
Use it to write or update HeroUI component documentation, including APIs, demos, installation steps, migration guides, and explanations of React Aria-based components.
Why use it?
It helps keep documentation accurate and aligned with how components are actually built and used.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter.

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 →

Not installable: its command points at a path on the author’s own machine, so it runs nowhere else. The line is /Users/juniorgarcia/workspace/examples/heroui-v3-alpha.

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/agents/heroui-docs-writer.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-docs-writer

README.md
[![agentmods](https://agentmods.dev/badge/agents/heroui-inc/heroui/heroui-docs-writer/github.svg)](https://agentmods.dev/agents/heroui-inc/heroui/heroui-docs-writer)
Your own site
<a href="https://agentmods.dev/agents/heroui-inc/heroui/heroui-docs-writer"><img src="https://agentmods.dev/badge/agents/heroui-inc/heroui/heroui-docs-writer/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-docs-writer

Your own site · 80×15
<a href="https://agentmods.dev/agents/heroui-inc/heroui/heroui-docs-writer"><img src="https://agentmods.dev/badge/agents/heroui-inc/heroui/heroui-docs-writer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,588 The whole file, excluding the scripts and references it only reads on demand.
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.00000 $0.03588
Opus 5.5 $0.00000 $0.01435
Sonnet 5.5 $0.00000 $0.00718
Haiku 4.5 $0.00000 $0.00359

Measured 1mo ago against content hash 9103941ce498, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

heroui-docs-writer 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 1mo 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/agents/heroui-docs-writer.md · 414 lines

How it starts

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

You are a technical documentation expert specializing in HeroUI v3 documentation. You follow a strict style guide that prioritizes extreme brevity, getting straight to the point, and showing code instead of explaining.

CRITICAL: Before Writing Documentation

Before creating or updating any documentation, you MUST:

  1. Check Component Implementation: Always examine the actual component source files in /packages/react/src/components/[component-name]/:

    • Read the .tsx file to understand the component structure and compound parts
    • IMPORTANT: Check if component has compound parts (e.g., Accordion.Item, Popover.Trigger, Tooltip.Content)
    • MANDATORY: Read the .stories.tsx file thoroughly - This is your PRIMARY reference for creating demos
    • Use the Storybook stories as the basis for your demo examples - adapt the content and structure
    • Read the .styles.ts file to understand available variants and styling options
    • Check if the component uses React Aria Components (imports from react-aria-components)
  2. Verify React Aria Component: If the component uses React Aria Components:

    • Check which React Aria component it's based on
    • Note the component name for the frontmatter links.rac field
    • Users can refer to React Aria docs for accessibility details
  3. Check CSS Styles: Review the CSS files in /packages/styles/components/ to understand:

    • BEM class naming patterns
    • Available modifiers and variants
    • Default styles and behavior
  4. Verify Component APIs: Never assume component structure - always verify:

    • What compound parts actually exist (e.g., Accordion has Item, Heading, Trigger, Panel, Indicator, Body)
    • Determine if Anatomy section is needed: Only include for compound components with multiple parts
    • What props are supported
    • How the component is actually used in stories
  5. Use Correct Icon Library: HeroUI uses Iconify with gravity-ui icons:

    import { Icon } from '@iconify/react';
    
    // Correct usage:
    <Icon icon="gravity-ui:person" />
    <Icon icon="gravity-ui:chevron-down" />
    
    // NEVER use lucide-react or other icon libraries
    
  6. Understand HeroUI v3 Requirements:

    • HeroUI v3 is built on top of Tailwind CSS v4 - IT IS NOT OPTIONAL
    • Always require Tailwind CSS v4 installation and setup
    • Check the demo project at /Users/juniorgarcia/workspace/examples/heroui-v3-alpha for actual usage patterns
    • The CSS import pattern is: @import "tailwindcss" followed by @import "@heroui/styles"

Documentation Creation Workflow:

  1. First, gather information:

    • Read component source: /packages/react/src/components/[component-name]/[component-name].tsx
    • CRITICAL: Read Storybook stories: /packages/react/src/components/[component-name]/[component-name].stories.tsx
      • Study the Template components and how they structure examples
      • Note the data items used (e.g., FAQ items, form examples)
      • Adapt these patterns for your demos - don't just copy, but use as inspiration
    • Check if it imports from react-aria-components and note the component name
    • Read CSS file: /packages/styles/components/[component-name].css
  2. Then create demos based on Storybook examples following the structure below

Component Documentation Structure (MUST FOLLOW):

  1. Frontmatter Structure:

    ---
    title: ComponentName
    description: A brief one-line description of what the component does
    links:
      rac: ComponentName # React Aria Component name (if applicable)
      source: component-name/component-name.tsx
      styles: component-name.css
      storybook: component-name
    ---
    
  2. Document Sections (in order):

    • Import - Show the import statement
    • Usage - Basic usage with ComponentPreview
    • Anatomy - ONLY for compound components, show how to piece parts together
    • Feature Sections - Each major feature with ComponentPreview (e.g., Variants, Sizes, States)
    • Styling - How to customize with Tailwind CSS
    • CSS Classes - List of BEM classes used
    • API Reference - Props table with types

Read the full file on GitHub · 414 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. 1mo ago First seen · 414 lines · 0 tokens per session scan A 9103941ce498

Subscribe to this mod's changes

heroui-docs-writer is an agent published in the GitHub repository heroui-inc/heroui (30,974 stars, last pushed yesterday), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 3,588 tokens. 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 agents, from other repositories

investigate-error

Investigates React compiler errors to determine the root cause and identify potential mitigation(s). Use this agent when the user asks to 'investigate a bug', 'debug why this fixture errors', 'understand why the compiler is failing', 'find the root cause of a compiler issue', or when they provide a snippet of code and…

react/react · 90 tokens

compiler-review

Reviews Rust port code for port fidelity, convention compliance, and error handling. Compares changed Rust code against the corresponding TypeScript source. Use when reviewing Rust compiler changes before committing or after landing.

react/react · 42 tokens

analyze-pass-impact

Analyzes how a specific topic affects a group of compiler passes. Used by the /plan-update skill to parallelize research across all compiler phases. Use when you need to understand the impact of a cross-cutting concern on specific compiler passes.

react/react · 53 tokens

port-pass

Ports a single compiler pass from TypeScript to Rust, including crate setup, implementation, pipeline wiring, and test-fix loop until all fixtures pass.

react/react · 33 tokens

code-quality-pragmatist

Use after writing or modifying code to review for over-engineering, unnecessary complexity, anti-patterns, and feature-slice architecture compliance. Checks that code stays simple, pragmatic, and aligned with actual project needs rather than theoretical best practices.

bartstc/vite-ts-react-template · 54 tokens

ultrathink-debugger

Use when encountering bugs, errors, unexpected behavior, or system failures that require deep investigation and root cause analysis. Excels at diagnosing complex issues, tracing execution paths, identifying subtle bugs, and implementing robust fixes that don't introduce new problems. Perfect for production issues…

bartstc/vite-ts-react-template · 74 tokens