Agent skill
atomic-atom
Create or refactor a React ATOM component (smallest reusable UI primitive). Use for buttons, inputs, icons, text, badges, loaders, etc. Keep atoms presentational and composable.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/atomic-atom
SKILL.md
Atomic Design: ATOM (React Functional Components)
You are creating an ATOM: the smallest reusable UI primitive.
Inputs
$ARGUMENTSmay include a component name and a short intent.
Hard rules
- Functional component only (no class components).
- No business logic, no data fetching, no app state. Atoms are presentational primitives.
- Accessibility first: correct semantics (
button,label,input), keyboard support,aria-*only when necessary. - Composable API:
- Prefer children/slots over many boolean props.
- Avoid prop explosions; keep the surface area minimal.
- Styling:
- Support
classNameand merge with base classes. - Avoid styling decisions that depend on application state.
- Support
- TypeScript-friendly:
- Prefer extending intrinsic element props (e.g.,
React.ButtonHTMLAttributes<HTMLButtonElement>). - Use
forwardRefwhen wrapping DOM elements.
- Prefer extending intrinsic element props (e.g.,
- Performance:
- Keep atoms cheap; use
React.memoonly if there’s a proven need (don’t add by default).
- Keep atoms cheap; use
Output expectations (when generating code)
- Provide:
Component.tsx(or.jsxif project is JS)Component.test.tsx(minimal: render + key interaction)Component.stories.tsx(basic variants)
- Export as a named export by default.
- Include a short usage snippet.
Recommended folder conventions
src/components/atoms/<ComponentName>/index.ts<ComponentName>.tsx<ComponentName>.test.tsx<ComponentName>.stories.tsx
Atom checklist
- Correct semantic element
- Keyboard operable
- Accepts
className - Props extend intrinsic element props
- No app-specific dependencies
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?