add-component

A command for creating a named React user-interface component in the project's components folder. It follows the project's TypeScript, Tailwind CSS, Framer Motion, Zustand, and Tauri integration patterns.

In plain words
What is it for?
Use it to create frontend components, define their properties, add the project's dark visual style and animations, and connect them to backend data or application state when needed.
Why use it?
It removes the need to remember the project's conventions when starting a component. It also reminds you to connect the new component to a parent and add any required state or event handling.

Command for Claude Code

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/talayash/agentrium/add-component
Clone the repo
git clone --depth 1 https://github.com/talayash/agentrium

Made for: Claude Code.

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 315 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.00000 $0.00315
Opus 5 $0.00000 $0.00158
Sonnet 5 $0.00000 $0.00063
Haiku 4.5 $0.00000 $0.00032

Measured 2d ago against content hash 5d18b793c3d7, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

add-component 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 2d 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/commands/add-component.md · 26 lines

What it actually says

Add a new React component

Create a new React component named $ARGUMENTS in src/components/. If no name is provided, ask the user.

Requirements

Follow existing project patterns:

  1. TypeScript - Define a props interface if the component accepts props
  2. Styling - Use Tailwind CSS classes with the project's dark glassmorphic theme:
    • Backgrounds: bg-gray-800/80, bg-gray-900/90 with backdrop-blur
    • Borders: border border-gray-700/50, rounded-lg
    • Text: text-gray-100, text-gray-400 for secondary
    • Hover states: hover:bg-gray-700/50
  3. Animations - Use Framer Motion (motion.div, AnimatePresence) for enter/exit transitions where appropriate
  4. State - Use Zustand stores:
    • appStore for UI state (modals, sidebar, settings)
    • terminalStore for terminal instance state
  5. IPC - If the component needs backend data, use invoke from @tauri-apps/api/core
  6. Events - If listening for Tauri events, use listen from @tauri-apps/api/event and clean up in useEffect return

After creation

  • Add the component to the appropriate parent (App.tsx or another component)
  • Wire up any needed state or event handling
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. 2d ago First seen · 26 lines · 0 tokens per session scan A 5d18b793c3d7

Subscribe to this mod's changes

add-component is a command published in the GitHub repository talayash/agentrium (39 stars, last pushed 2d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 315 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.