ui-component-create

ui-component-create is a command for Claude Code from matteocervelli/llms. It costs 15 tokens per session (2,150 once invoked), scanned A, original, MIT.

A command that creates a React and TypeScript UI component, including variants, tests, and a preview entry.

In plain words
What is it for?
Use it to add buttons, dialogs, inputs, and other reusable interface components under the project’s UI component directory.
Why use it?
It removes the repetitive setup involved in adding a component and checks the result for code quality and accessibility.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter.

Good fit Use it to add buttons, dialogs, inputs, and other reusable interface components under the project’s UI component directory.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/matteocervelli/llms/ui-component-create
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.

Clone the repo
git clone --depth 1 https://github.com/matteocervelli/llms

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 ui-component-create

README.md
[![agentmods](https://agentmods.dev/badge/commands/matteocervelli/llms/ui-component-create/github.svg)](https://agentmods.dev/commands/matteocervelli/llms/ui-component-create)
Your own site
<a href="https://agentmods.dev/commands/matteocervelli/llms/ui-component-create"><img src="https://agentmods.dev/badge/commands/matteocervelli/llms/ui-component-create/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 ui-component-create

Your own site · 80×15
<a href="https://agentmods.dev/commands/matteocervelli/llms/ui-component-create"><img src="https://agentmods.dev/badge/commands/matteocervelli/llms/ui-component-create.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 15 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,150 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.00015 $0.02150
Opus 5.5 $0.00006 $0.00860
Sonnet 5.5 $0.00003 $0.00430
Haiku 4.5 $0.00002 $0.00215

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

Security

Grade A, and why

ui-component-create 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.

.archive/claude-v1/commands/ui-component-create.md · 358 lines

How it starts

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

Create UI Component

Create a production-ready UI component with TypeScript, variants, comprehensive tests, and preview integration.

What it does

  1. Parses component name and summary from arguments
  2. Creates component file with TypeScript and variants
  3. Generates comprehensive test file
  4. Adds component to preview page
  5. Runs quality checks (linting, type checking, tests)
  6. Verifies accessibility compliance

Usage

/ui-component Button "Primary action button with variants"
/ui-component Modal "Dialog component for user interactions"
/ui-component Input "Text input field with validation"

💡 Tip: For safer planning, activate Plan Mode (press Shift+Tab twice) before running this command to review the component structure before creation.

Context

Parse $ARGUMENTS to extract:

  • [name]: Component name (converted to PascalCase)
  • [summary]: Component purpose/description

Example: /ui-component Card "Display content in a card layout"

  • [name] = Card
  • [summary] = Display content in a card layout

Component Creation

File Structure

Create in: src/components/ui/[name]/[name].tsx

import { FC } from 'react';

interface [name]Props {
  variant?: 'primary' | 'secondary' | 'success' | 'danger' | 'warning';
  size?: 'sm' | 'md' | 'lg';
  disabled?: boolean;
  className?: string;
  children?: React.ReactNode;
}

/**
 * [name] Component
 *
 * [summary]
 *
 * @example
 * ```tsx
 * <[name] variant="primary" size="md">
 *   Content here
 * </[name]>
 * ```
 */
export const [name]: FC<[name]Props> = ({
  variant = 'primary',
  size = 'md',
  disabled = false,
  className,
  children,
}) => {
  // Implementation
  return (
    <div
      className={cn(baseStyles, variantStyles[variant], sizeStyles[size], className)}
      aria-disabled={disabled}
    >
      {children}
    </div>
  );
};

Required Variants

Use theme colors from @src/app/globals.css:

  1. primary - Main brand color (primary action)
  2. secondary - Secondary brand color (less emphasis)
  3. success - Success/confirmation actions (green)
  4. danger - Destructive/error actions (red)
  5. warning - Caution/warning states (orange)

Read the full file on GitHub · 358 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 · 358 lines · 15 tokens per session scan A d6540de4b637

Subscribe to this mod's changes

ui-component-create is a command published in the GitHub repository matteocervelli/llms (25 stars, last pushed 4mo ago), licensed MIT. It adds 15 tokens to every session and 2,150 once invoked, about $0.0001 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-09-01.