vanessamarely/ai-playbook-reposito/react-components
Claude Code and agent skill by vanessamarely/ai-playbook-reposito
- community
Checking that the SKILL.md file is still in the repository.
Creates and modifies React components using TypeScript, Tailwind CSS, shadcn/ui, and WCAG 2.2 Level AA accessibility patterns. Use when the user wants to build, update, or fix a React UI component, add keyboard navigation, or apply ARIA attributes. Do not use for Node.js services, API endpoints, database schemas, or non-React frontend frameworks (Vue, Svelte, Angular).
Install
npx vskill@latest install vanessamarely/ai-playbook-reposito/react-componentsSKILL.md
The same SKILL.md was published earlier as vanessamarely/ai-playbook-reposito/react-components.
Skill: React Components
Purpose
Create or modify React components using TypeScript with strict accessibility compliance (WCAG 2.2 Level AA), semantic HTML, and type safety.
Inputs
componentName: PascalCase component identifierfunctionality: Description of component behavior and interactionsprops: Expected component props with typesaccessibility: Specific accessibility requirements (keyboard, screen reader, ARIA)
Outputs
- Component file (
.tsx) - TypeScript prop interface
- Accessibility attributes and handlers
- Optional: test file, style file
Procedures
1. Validate Component Name
Ensure name follows PascalCase convention.
Check for conflicts with existing components in the target directory.
2. Load Accessibility Guidelines
Read: references/a11y-wcag22.md
Identify applicable WCAG requirements based on component type (button, form, modal, etc.).
3. Define TypeScript Interface
Create interface for component props:
- Required props without
? - Optional props with
? - Use specific types (avoid
any) - Include event handler types (e.g.,
onClick?: (event: React.MouseEvent) => void)
Refer to: references/react-ts-patterns.md
4. Choose Semantic HTML
Select appropriate HTML element:
<button>for actions<a>for navigation<input>,<select>,<textarea>for form fields<nav>,<header>,<main>,<footer>for landmarks<article>,<section>for content structure
Avoid <div> or <span> for interactive elements.
5. Implement Keyboard Support
For interactive components:
- Add
onKeyDownhandler for Enter and Space keys. - Implement arrow key navigation for lists or menus.
- Manage focus for modals (trap focus, restore on close).
- Ensure all interactive elements are reachable via Tab.
Pattern:
6. Add ARIA Attributes
Apply ARIA only when semantic HTML is insufficient:
aria-labelfor icon buttons without visible textaria-labelledbyto reference visible labelsaria-describedbyfor additional contextaria-expandedfor toggles and dropdownsaria-livefor dynamic content updates
Validate against: references/a11y-wcag22.md
7. Implement Focus Management
For modals and dialogs:
- Move focus to modal when opened.
- Trap focus within modal (prevent Tab from escaping).
- Restore focus to trigger element when closed.
Use useEffect with ref:
8. Apply Project-Specific Conventions
Follow the project's existing style and conventions. Check the project's own CLAUDE.md for local overrides before applying this skill's defaults.
9. Generate Component File
Structure:
- Imports
- TypeScript interface
- Component function with typed props
- Return JSX with semantic elements and accessibility attributes
- Export
10. Validate Accessibility
Check:
- Semantic HTML used correctly
- Keyboard handlers present for interactive elements
- ARIA attributes valid and necessary
- Focus management implemented for modals
- Color contrast meets 4.5:1 for normal text, 3:1 for large text
11. Suggest Testing
Recommend:
- Unit tests for logic
- Accessibility tests with
@axe-core/react - Keyboard navigation manual testing
Commands:
npm run lint(if eslint-plugin-jsx-a11y configured)npm test -- <ComponentName>
Error Handling
Non-semantic element used for interaction: Suggest replacing <div> with <button> or appropriate element.
Missing keyboard handler: Add onKeyDown handler for Enter/Space.
Invalid ARIA combination: Refer to references/a11y-wcag22.md for correct usage.
Focus trap missing in modal: Implement focus management with refs and event listeners.
References
- WCAG 2.2 Guidelines: references/a11y-wcag22.md
- TypeScript Patterns: references/react-ts-patterns.md
- Component Specification Template: assets/component-spec.template.md
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingai-playbook/.github/skills/react-components/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/vanessamarely/ai-playbook-reposito/react-components)