component-builder

Builds hand-authored React TypeScript components, forms, screens, and route shells for the client app.

Updated May 21, 2026
One-click install
npx skills add https://github.com/Collins1892/radar-practice --skill component-builder-collins1892
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: component-builder
Source: https://github.com/Collins1892/radar-practice/tree/main/.claude/skills/component-builder
Command: npx skills add https://github.com/Collins1892/radar-practice --skill component-builder-collins1892

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Building consistent React components in this repo requires knowing many conventions at once: where hand-authored code lives, which Tailwind tokens to use, how Radix aria attributes are wired, and how screens compose primitives. This Skill encodes all of those rules so every component matches existing patterns without re-deriving them. ## Core Features & Use Cases - Component taxonomy and patterns: Classifies each request as a primitive, form field, data display, feature form, screen, route shell, or app shell change, then applies the matching build pattern with positive references from the codebase. - Accessibility built in: Enforces a WCAG-oriented checklist (roles, aria attributes, focus-first-error, live regions) and documents shadcn/Radix gotchas such as aria placement on SelectTrigger and autoFocus on Calendar. - Use Case: Ask to add a new audit filter field or a detail screen, and the Skill produces a TypeScript component using cn(), theme tokens, typed API helpers like auditUserMessage, and the correct state machine, then reminds you to run npm test from client/. ## Quick Start Ask the agent to build a new React component, form, screen, or route shell in client/src/components following the component-builder conventions.

Frequently Asked Questions about component-builder

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build a new React component in this project?

Classify the request using the component taxonomy (primitive, form field, data display, feature form, screen, or route shell), then copy structure from the matching positive reference file. Place hand-authored code in client/src/components, never in the shadcn vendor ui/ directory.

How do I add a form field with validation in React and Radix?

Wrap native inputs with FormField, which injects aria-describedby, aria-invalid, and aria-required via cloneElement. For Radix Select, set aria attributes on SelectTrigger rather than Select.Root, and use formFieldErrorId for consistent error element ids.

Does react-day-picker v10 support initialFocus on Calendar?

No, initialFocus is silently ignored in react-day-picker v10. Use the autoFocus prop on Calendar instead so keyboard focus lands inside the date picker when the popover opens.

Where should hand-authored components go versus shadcn ui files?

Hand-authored components belong in client/src/components/. The client/src/components/ui/ directory is shadcn vendor code only, is ESLint-ignored, and must never be hand-edited; add new shadcn components via the CLI.

Why should tests not be generated in the same request as a component?

The Skill enforces one scope per request, so Vitest tests are deferred to the react-test-writer skill unless the user explicitly asks. After any behavioural change, run npm test from client/ and confirm the suite passes before declaring done.