react-component-builder

react-component-builder is a command for Claude Code, Cursor from vanessamarely/ai-playbook-reposito. It costs 0 tokens per session (734 once invoked), scanned A, original, MIT.

A guided procedure for creating or changing an accessible React component written in TypeScript. React components are reusable pieces of a web interface, and accessibility includes keyboard use, meaningful HTML, screen-reader support, and focus handling.

In plain words
What is it for?
Building a named component from its behavior and properties, placing it in a chosen project folder, and optionally adding a Storybook example or style file.
Why use it?
It checks the component name, destination, and naming conflicts while following the project's accessibility and TypeScript conventions. It also requires a matching test file.

Command for Claude CodeCursor

Written for Cursor and Claude Code: installed under .cursor/, but also a Claude Code command (commands/*.md).

Good fit Building a named component from its behavior and properties, placing it in…

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/vanessamarely/ai-playbook-reposito/react-component-builder
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/vanessamarely/ai-playbook-reposito

Made for: Claude Code, Cursor.

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 react-component-builder

README.md
[![agentmods](https://agentmods.dev/badge/commands/vanessamarely/ai-playbook-reposito/react-component-builder.svg)](https://agentmods.dev/commands/vanessamarely/ai-playbook-reposito/react-component-builder)
Your own site
<a href="https://agentmods.dev/commands/vanessamarely/ai-playbook-reposito/react-component-builder"><img src="https://agentmods.dev/badge/commands/vanessamarely/ai-playbook-reposito/react-component-builder.svg" alt="Measured on agentmods" 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 734 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.00734
Opus 5 $0.00000 $0.00367
Sonnet 5 $0.00000 $0.00147
Haiku 4.5 $0.00000 $0.00073

Measured 6d ago against content hash 97b2bd78a543, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

react-component-builder 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 6d 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.

ai-playbook/.cursor/commands/react-component-builder.md · 56 lines

How it starts

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

React Component Builder

Create or modify a React component with TypeScript, ensuring accessibility compliance and adherence to project conventions. This follows the same standards as the always-applied react-components rule, run as a guided end-to-end build.

Inputs

  • componentName: PascalCase component name.
  • specification: component behavior, props, and requirements.
  • targetFolder: location within the project for the new component.

Outputs

  • Component file (.tsx), and — required — a matching test file.
  • Optional: Storybook story or style file.
  • Verification command suggestions.

Procedure

  1. Validate inputscomponentName is PascalCase, targetFolder exists and is within project scope, check for naming conflicts with existing components.
  2. Follow the react-components rule for the full accessibility/TypeScript procedure (semantic HTML, keyboard support, ARIA, focus management).
  3. Generate the component structure at <targetFolder>/<componentName>.tsx:
    • Explicit TypeScript prop interface — discriminated unions for variants, readonly where appropriate, React.ReactNode for children, JSDoc on complex props:
      interface ButtonProps {
        /** Visual style variant */
        variant: 'primary' | 'secondary' | 'danger'
        onClick: (event: React.MouseEvent<HTMLButtonElement>) => void
        disabled?: boolean
        children: React.ReactNode
      }
      
    • Semantic HTML, accessibility attributes, explicit return type (const Component = (props: Props): JSX.Element => { ... }), no any (use unknown + type guards instead).
  4. Apply project-specific overrides — check for an existing style guide or component-library documentation in the project and follow it; otherwise follow the project's existing conventions.
  5. Validate accessibility — semantic HTML, keyboard handlers on interactive elements, focus management for modals/dynamic content, ARIA valid and necessary. If eslint-plugin-jsx-a11y is configured, suggest npm run lint.
  6. Handle errors and edge cases:
    • Async data: use an AsyncState<T> discriminated union (idle | loading | success | error).
    • Add error boundaries for top-level components.
    • Loading states get proper ARIA announcements; use exhaustive never-type checks for state machines.
  7. Generate a test file (required)<componentName>.test.tsx: basic render test with RTL, an accessibility test with jest-axe:
    import { axe, toHaveNoViolations } from 'jest-axe'
    expect.extend(toHaveNoViolations)
    test('should have no accessibility violations', async () => {
      const { container } = render(<Component {...props} />)
      expect(await axe(container)).toHaveNoViolations()
    })
    
    Plus keyboard-interaction tests and error-state tests where applicable.
  8. Report a summary: paths to the component and test files, functionality description, TypeScript patterns used, accessibility features implemented, and verification commands (npm run lint, npm test -- <componentName>, npm run type-check, npm run lint:a11y if available).

Read the full file on GitHub · 56 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. 6d ago First seen · 56 lines · 0 tokens per session scan A 97b2bd78a543

Subscribe to this mod's changes

react-component-builder is a command published in the GitHub repository vanessamarely/ai-playbook-reposito (2 stars, last pushed 1mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 734 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-31.