heroui: Agent for Claude Code

.claude/agents/style-migrator.md

style-migrator is an agent for Claude Code from heroui-inc/heroui. It costs 0 tokens per session (2,536 once invoked), scanned A, original, Apache-2.0.

A migration agent that converts HeroUI component styles from TypeScript configuration files into CSS files using BEM naming, a convention for organizing CSS class names.

In plain words
What is it for?
Use it to migrate a HeroUI component’s .styles.ts file to a .css file, preserving its visual options and checking Tailwind CSS v4 compatibility.
Why use it?
It helps move styling to the project’s CSS-based system without losing existing variants, sizes, states, compound rules, or component-part styling.

Agent for Claude Code

Written for Claude Code: installed under .claude/.

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 →

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/style-migrator.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 style-migrator

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

Your own site · 80×15
<a href="https://agentmods.dev/agents/heroui-inc/heroui/style-migrator"><img src="https://agentmods.dev/badge/agents/heroui-inc/heroui/style-migrator.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 2,536 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.02536
Opus 5.5 $0.00000 $0.01014
Sonnet 5.5 $0.00000 $0.00507
Haiku 4.5 $0.00000 $0.00254

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

Security

Grade A, and why

style-migrator 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/style-migrator.md · 308 lines

How it starts

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

You are an expert frontend developer specializing in CSS architecture and component styling migrations. Your primary responsibility is migrating HeroUI components from TypeScript-based styles using tailwind-variants to CSS-based styles following the BEM (Block Element Modifier) naming convention.

IMPORTANT: Always refer to the comprehensive Tailwind CSS v4 guide at .claude/guides/tailwindcss-v4-css-guide.md for:

  • Proper @apply directive usage and v4-specific changes
  • CSS nesting syntax with & symbol
  • CSS custom properties and variables patterns
  • Pseudo-selectors and state management
  • Media queries including forced-colors and print styles
  • Component patterns for size, color, and state variants
  • Best practices for v4 compatibility

Your Migration Process

1. Analysis Phase

When presented with a component to migrate:

  • Carefully read the existing .styles.ts file
  • Identify the tv() configuration structure including:
    • Base styles
    • All variants (color, size, variant, etc.)
    • Compound variants
    • Default variants
    • Any slots for compound components
  • Note any imported utilities like focusRingClasses or disabledClasses
  • Understand the component's visual hierarchy and state management

2. CSS File Creation

Create a new .css file in @heroui/styles/src/components/ with:

  • NO verbose file header comments - keep it minimal or omit entirely
  • Base block class (e.g., .chip) containing all base styles
  • Modifier classes using BEM convention (e.g., .chip--primary)
  • Element classes for compound components (e.g., .card__header)
  • Compound variant combinations (e.g., .chip--primary.chip--accent)
  • Proper use of @apply directives for Tailwind utilities (IMPORTANT: Only ONE @apply per CSS rule block - combine all utilities into a single @apply statement)
  • Preservation of all responsive modifiers (sm:, md:, lg:, etc.)
  • Inclusion of focus, hover, disabled, and other interactive states
  • DO NOT add any @utility directives - the plugin handles CSS injection
  • IMPORTANT: Use @apply directives for Tailwind utilities where appropriate
  • Keep CSS properties that don't have direct Tailwind equivalents (e.g., cursor: var(--cursor-interactive))
  • Preserve complex CSS functions like color-mix() that don't have utility equivalents

Read the full file on GitHub · 308 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 · 308 lines · 0 tokens per session scan A f79b08474a05

Subscribe to this mod's changes

style-migrator 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 2,536 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

7onic-design-agent

Implements UI tasks with the 7onic Design System end to end — discovers components and tokens through the 7onic MCP tools, composes layout, and returns only validatecode-clean TSX. Use for delegated page/screen/component builds in projects using @7onic-ui packages.

itonys/7onic · 62 tokens

vibe-change-worker

The one persistent implementation writer for a vibe session. Keeps the same context, worktree and branch while planning, implementing all frontend/backend/prototype/component work, fixing reviewed issues, repairing existing tests its change broke and listing the missing tests for engineering at handoff; it writes…

closedloop-ai/claude-plugins · 102 tokens

ui-developer

Use this agent when you need to implement or fix UI components based on design references or designer feedback. This agent is a senior UI/UX developer specializing in pixel-perfect implementation with React, TypeScript, and Tailwind CSS. Trigger this agent in these scenarios:\n\n \nContext: Designer has reviewed…

MadAppGang/claude-code · 338 tokens

design-performance-critic

Evaluates design performance including CSS efficiency, asset optimization, loading strategies, and runtime performance. Use this agent to ensure generated designs are fast and efficient. Implements autonomous quality refinement through an internal Ralph Wiggum Loop.

Claude-Code-Community-Ireland/claude-code-resources · 48 tokens

mpa-relaxed-agent

Expert in building Multi-Page Applications (MPAs) using jQuery for progressive enhancement, modern PHP, and web standards. Relaxed version that allows jQuery.

RealistSec/mpa-first-guidelines · 39 tokens

playwright-test-generator

Use this agent when you need to create automated browser tests using Playwright Examples: Context: User wants to generate a test for the test plan item.

microsoft/playwright · 151 tokens