ui-component-create

Create a UI Component in /components/ui with variants, tests, and preview.

Command

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 commands/matteocervelli/llms/ui-component-create
Clone the repo
git clone --depth 1 https://github.com/matteocervelli/llms
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. 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.00015 $0.02150
Opus 5 $0.00008 $0.01075
Sonnet 5 $0.00003 $0.00430
Haiku 4.5 $0.00002 $0.00215

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

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. today 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 3mo ago), licensed MIT. It adds 15 tokens to every session and 2,150 once invoked, about $0.0001 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-09-01.