react-component-spec
Skill0 starsChanged 4 days agoMITView on GitHub
The skill specifies accessible React components with typed props, keyboard support, ARIA behavior, a props table, tests and explicit interaction states; use it when asking to build or review a reusable React component.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- MrLaoRen/agent-skillstheir own version, first seen May 31, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- MrLaoRen/agent-skills★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository16 other files it gives its agents.
- AGENTS.mdAGENTS.md
- api-design-reviewSkill
- codebase-reviewSkill
- commit-and-dcoSkill
- django-app-scaffoldSkill
- dockerfile-auditSkill
- exhaustive-prompt-specSkill
- incident-postmortemSkill
- log-triageSkill
- pr-review-tableSkill
- readme-writerSkill
- repo-polishSkill
- runbook-writerSkill
- security-reviewSkill
- spring-boot-endpointSkill
- test-plan-writerSkill
The file
We split this skill into the rules it gives an agent
11 rules. About 0 are common, 9 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈9
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 13
Use this skill when asked to build a React component, write a component specification, improve accessibility, define typed props, or add a …
- Very specific: line 27
Read references/a11y-checklist.md and choose native HTML semantics before custom roles.
- Distinctive: line 31
Add associated labels, accessible names, descriptions and ARIA state only where semantic HTML is insufficient.
- Distinctive: line 32
Document every public prop in a table with type, required status and behavior.
- Distinctive: line 33
Write tests for rendering, prop combinations, keyboard operation, focus, accessible queries and boundary states.
- Distinctive: line 34
Run the repository's type-check, lint and test commands and report exact outcomes.
- Distinctive: line 44
Ask for the design or behavior when a visual component cannot be inferred from supplied requirements.
- Distinctive: line 47
Avoid focus traps unless the component is explicitly a modal dialog.
- Very specific: line 52
Do not use clickable div elements when a button or link is appropriate.
- Distinctive: line 53
Do not add ARIA roles that contradict native element semantics.
- Distinctive: line 54
Do not omit keyboard and disabled-state tests for interactive controls.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Purpose
Specify a complete accessible React component with typed props, keyboard interaction, ARIA semantics, documentation and tests.
When to use
Use this skill when asked to build a React component, write a component specification, improve accessibility, define typed props, or add a component test file.
Inputs needed
- Component purpose and visible content.
- Required and optional props with expected behavior.
- Interaction model and state ownership.
- Existing React version, styling system and test framework when repository context is available.
Step-by-step procedure
- Inspect the existing component conventions, TypeScript settings, styling approach and test runner.
- Read
references/a11y-checklist.mdand choose native HTML semantics before custom roles. - Define a TypeScript props interface with required, optional and callback fields.
- Specify default behavior, controlled versus uncontrolled state, disabled state and invalid input handling.
- Implement keyboard behavior and focus handling without overriding native browser interactions unnecessarily.
- Add associated labels, accessible names, descriptions and ARIA state only where semantic HTML is insufficient.
- Document every public prop in a table with type, required status and behavior.
- Write tests for rendering, prop combinations, keyboard operation, focus, accessible queries and boundary states.
- Run the repository's type-check, lint and test commands and report exact outcomes.
Exact output format
Return: Component purpose, Props table (prop, type, required, description), Implementation with a complete TSX file, Accessibility behavior, and Tests with a complete test file. Include no prose after the test file.
Edge cases
- Ask for the design or behavior when a visual component cannot be inferred from supplied requirements.
- Preserve native semantics for buttons, links, inputs and form controls.
- State updates must not be duplicated between internal state and controlled props.
- Avoid focus traps unless the component is explicitly a modal dialog.
Do not
- Do not use clickable
divelements when a button or link is appropriate. - Do not add ARIA roles that contradict native element semantics.
- Do not omit keyboard and disabled-state tests for interactive controls.
Worked example summary
A dismissible alert accepts title, message, variant, onDismiss and dismissible. The implementation uses role="alert", a labeled native button and a test covering keyboard dismissal and non-dismissible state.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

