Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+21 more

    UI Component Architect: Reusable, Accessible Components

    3

    UI Component Architect makes your agent design components like a design-system engineer.

    Free

    11 uses5.0 (1 review)
    UI Component Architect: Reusable, Accessible Components

    UI Component Architect: Reusable, Accessible Components

    Example session with this skill installed

    We have 6 different modal implementations in our React app. Build one accessible Modal component (with confirm and form variants) and replace the others.

    • Read your context and instructions
    • Compiled the ui component architect
    • Generated the UI component

    Inventory

    React 18 + TypeScript, Tailwind, Vitest + Testing Library, Storybook 8. @radix-ui/react-dialog already installed (used by 1 of 6 modals) → build on it.

    FileProblems found
    OrderModal.tsxno focus trap, Esc doesn't close
    ConfirmDelete.tsxdiv buttons, no labels
    AddressModal.tsxbody scroll not locked, hard-coded colours
    InviteModal.tsxfocus not returned on close
    NotesModal.tsx, ExportModal.tsxduplicated markup, 3 different paddings

    API

    <Modal open={open} onOpenChange={setOpen} size="md">
      <Modal.Title>Edit address</Modal.Title>
      <Modal.Description>Changes apply to future shipments.</Modal.Description>
      <Modal.Body>{/* form */}</Modal.Body>
      <Modal.Footer><Button variant="secondary">Cancel</Button><Button>Save</Button></Modal.Footer>
    </Modal>
    
    <ConfirmModal open={open} onOpenChange={setOpen} tone="danger"
      title="Delete shipment?" description="This can't be undone." confirmLabel="Delete" onConfirm={remove} />
    

    Props: size (sm/md/lg), tone (default/danger); controlled or uncontrolled; tokens only.

    Accessibility

    Radix Dialog: role=dialog, aria-modal, labelled by Title, described by Description, focus trapped, Esc and overlay close (overlay close disabled for forms with unsaved changes), focus returned to trigger, scroll locked, reduced-motion animations.

    Delivered

    • ui/modal/Modal.tsx, ConfirmModal.tsx, modal.stories.tsx (7 stories: sizes, danger confirm, long content, form with validation, loading)
    • modal.test.tsx: 9 tests (Esc, focus return, trap, confirm/cancel, axe) — all passing
    • 6 old modals migrated, −412 lines; tsc --noEmit and lint clean

    Migration note

    All call sites updated in this PR; OrderModal kept a custom footer via Modal.Footer. No visual changes except unified padding (24 px) and the focus ring.

    OrderModal.tsx

    TSX · React component

    Generated

    Example file from a real run - the skill writes it into your workspace.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Components your team reuses instead of copying

    Most codebases end up with five slightly different buttons, modals without focus traps and props like isPrimary, isBig, isRed. UI Component Architect makes your agent design components like a design-system engineer.

    What it does

    • Inventory first: framework, styling (Tailwind, CSS Modules, Vuetify, MUI, shadcn), TypeScript, tests, Storybook; builds on headless primitives you already have (Radix, React Aria, Headless UI, Reka) instead of re-implementing focus traps.
    • Tokens before components: colour roles, spacing, radii, type, shadows, motion; light and dark via CSS variables; no hard-coded values.
    • API designed before code: variant and size enums instead of boolean soup, composition with slots or compound components, controlled + uncontrolled, forwarded refs and native attributes, consistent naming and deprecation paths.
    • Every state: hover, focus-visible, active, disabled, loading, error, empty, selected, read-only, long text, RTL, small screens.
    • Accessibility built in: WAI-ARIA patterns for 12 common components (dialog, menu, tabs, combobox, toast, table...) with keyboard maps, focus management, labels, contrast and reduced motion.
    • Docs & tests: a story per variant and state, props table, do/don't; behaviour and axe accessibility tests; typecheck and lint green.
    • Refactor mode: finds duplicated UI, consolidates it into one component with variants and gives a migration list.

    Includes

    • SKILL.md workflow
    • references/patterns.md - tokens, React (cva) and Vue 3 button examples, compound components, API anti-patterns, story template
    • references/a11y.md - accessibility patterns table and checklist

    Pairs with Frontend Design Pro and Vue Pro Patterns. Works with Claude Code, Codex, Cursor, Copilot, Gemini CLI and any SKILL.md-compatible agent.

    Requires existing framework context. Does not add new UI libraries without permission. Interactive widgets require headless primitives or custom keyboard mapping logic.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before any payment.

    Reviews

    5.0
    1 review
    5
    1
    4
    0
    3
    0
    2
    0
    1
    0

    This skill has been used 11 times.

    Trust & safety

    Security scan

    Security scan passed 8 days ago

    • Free with an Agensi account

    Permissions

    No special permissions declared or detected

    Listed8 days ago
    Updated5 days ago

    What's inside

    Frequently Asked Questions

    It replaces fragmented, 'div soup' layouts with structured design systems using headless primitives like Radix or React Aria to ensure WCAG-compliant keyboard navigation and focus management out of the box.

    The skill is compatible with React, Vue, and Svelte, and integrates seamlessly with styling tools like Tailwind CSS or CSS Modules and documentation platforms like Storybook.

    By enforcing 'tokens-first' architecture and compound component patterns, it prevents the creation of bloated 'mega-components' and ensures styles are mapped to semantic roles rather than hard-coded values.

    You receive a specialized agent configuration capable of generating production-ready component code, comprehensive Storybook documentation, and unit tests for interaction behavior.

    To maintain code quality and modularity, the skill follows a strict 200-line limit per file, encouraging the separation of complex logic into reusable hooks or composables.

    New in Frontend & Web Apps