atomic-design
Skill2 starsChanged 29 days agoMITView on GitHub
Atomic Design reference for React and Next.js component libraries: the five levels (atoms, molecules, organisms, templates, pages), import rules, classification tests and anti-patterns. Use when creating, reviewing or restructuring frontend components, or when the user asks where a component belongs. Not for backend code or UI questions that are not about component structure.
3 other projects use a version of this.
Adopted by
Most recently taken up by
- memi-design/design-skillstheir own version, first seen Nov 8, 2026
- jwilger/agent-skillstheir own version, first seen Oct 11, 2026
- CorentinGC/claude-skillstheir own version, first seen Mar 7, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- memi-design/design-skills★ 7same name
- jwilger/agent-skills★ 4same name
- CorentinGC/claude-skills★ 0same 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 repository32 other files it gives its agents.
- AGENTS.mdAGENTS.md
- check-consistencySkill
- adopt-brownfieldSkill
- code-reviewSkill
- deutschland-stack-apiSkill
- document-releaseSkill
- european-alternatives-apiSkill
- finish-branchSkill
- grillSkill
- handoff-sessionSkill
- init-projectSkill
- minimal-codeSkill
- office-hoursSkill
- oss-projectSkill
- plan-ceo-reviewSkill
- plan-eng-reviewSkill
- plan-milestoneSkill
- plan-taskSkill
- quick-taskSkill
- reassess-roadmapSkill
- reconcileSkill
- resume-sessionSkill
- retroSkill
- shipSkill
- slice-milestoneSkill
- software-craftsmanshipSkill
- spawn-milestone-teamSkill
- summarize-taskSkill
- systematic-debuggingSkill
- test-driven-developmentSkill
- using-ytstackSkill
- verification-before-completionSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
17 rules. About 0 are common, 16 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈16
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 35
Never import other atoms -- they are leaf nodes
- Distinctive: line 36
Must work in complete isolation -- render one on a blank page and it must make visual sense
- Distinctive: line 38
No business logic, no domain knowledge, no data fetching
- Very specific: line 47
Import from atoms/ only (rare exceptions for small utility molecules)
- Distinctive: line 51
If you cannot describe it without "and," it is an organism
- Distinctive: line 75
Use slots/children patterns -- accept organisms as props or children, not raw data
- Distinctive: line 79
Never hardcode specific organisms -- use composition
- Distinctive: line 88
If real content breaks the layout, fix at the component level, not the page level
- Distinctive: line 89
Test edge cases: empty states, max-length content, errors, loading, role differences
- Distinctive: line 129
Do not create atoms/molecules for one-off components.
- Distinctive: line 138
If a component needs custom styling on one page, add a variant prop to the component.
- Distinctive: line 144
Every component must handle: empty, error, loading, max-length, min-length, missing data, different roles, and disabled states.
- Distinctive: line 153
Before creating a new component:
- Distinctive: line 159
Import direction: Only imports from lower levels?
- Distinctive: line 168
When modifying an atom, verify every molecule and organism that uses it.
- Distinctive: line 170
Test with real content, not Lorem ipsum -- placeholder content hides layout bugs.
- Distinctive: line 177
Before applying this skill, verify:
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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
Atomic Design -- Frontend Component Architecture
Reference: Brad Frost, Atomic Design (https://atomicdesign.bradfrost.com/)
Core Principle
Atomic Design is a mental model, not a linear process. You do not build atoms first, then molecules, then organisms. You think about the interface simultaneously as a cohesive whole and a collection of parts. Every component decision considers both its isolated purpose and its role in the larger system.
The Five Levels
1. Atoms (components/atoms/)
The smallest, indivisible UI elements. They cannot be broken down further without losing their meaning.
Examples: Button, Input, Label, Badge, Avatar, Icon, Toggle, Divider, Skeleton, Spinner
Rules:
- Accept only generic, presentational props (size, variant, color, disabled)
- Never import other atoms -- they are leaf nodes
- Must work in complete isolation -- render one on a blank page and it must make visual sense
- Define variants via props, not separate components (
<Button variant="primary">not<PrimaryButton>) - No business logic, no domain knowledge, no data fetching
2. Molecules (components/molecules/)
Simple groups of atoms functioning together as a single unit with one clear purpose.
Examples: SearchField (Label + Input + Button), FormField (Label + Input + Error), ConfirmButton (Button + confirm state), RevealableSecret (EyeIcon + redacted text), Section (title + children container)
Rules:
- Import from
atoms/only (rare exceptions for small utility molecules) - Single responsibility: describe in one sentence without "and"
- Context-agnostic -- a SearchField works identically in header, sidebar, or modal
- Own simple interaction state (hover, focus, open/closed) but not application state
- If you cannot describe it without "and," it is an organism
3. Organisms (components/organisms/)
Complex, distinct sections of the interface composed of molecules, atoms, and potentially other organisms. They form recognizable, standalone regions of a page.
Examples: SiteHeader, DataTable, AuthProfileManager, JsonViewer, ConfigActions, ChatPanel, CommentThread, Sidebar
Rules:
- Can import atoms, molecules, and other organisms
- Represent a distinct section you can point at on the screen
- May accept data props but should not fetch data themselves
- Can have meaningful internal state (tabs, sort, accordion)
- Still reusable -- a DataTable can appear on multiple pages
Molecule vs. organism test: Groups items serving different purposes (navigation AND search AND user account) = organism. Groups items serving one purpose (search input + submit button) = molecule.
4. Templates (components/templates/)
Page-level layout components that arrange organisms into a structure. Define WHERE things go, not WHAT they contain.
Examples: DashboardLayout (Sidebar + Main + TopBar slots), SettingsLayout, AuthLayout
Rules:
- Use slots/children patterns -- accept organisms as props or children, not raw data
- Define responsive grid behavior
- Testable with skeleton content
- In Next.js: map to
layout.tsxfiles or shared layout components - Never hardcode specific organisms -- use composition
5. Pages (app/ routes)
Specific instances of templates populated with real content and real data.
Rules:
- The ONLY level that fetches data
- Compose templates with organisms, passing real data down
- If real content breaks the layout, fix at the component level, not the page level
- Test edge cases: empty states, max-length content, errors, loading, role differences
Directory Structure
src/
components/
atoms/ # Button, Input, Badge, Toggle, Spinner, EmptyState
molecules/ # SearchField, FormField, ConfirmButton, Section, Row
organisms/ # SiteHeader, DataTable, JsonViewer, ChatPanel
agent/ # Agent-specific organisms
instance/ # Instance-specific organisms
settings/ # Settings organisms
templates/ # DashboardLayout, AuthLayout
app/ # Next.js pages (data fetching + composition)
lib/
hooks/ # Shared hooks (useClickOutside, useDebounce)Import Rules (Hard Constraints)
| From / To | atoms | molecules | organisms | templates | pages |
| atoms | NO | NO | NO | NO | NO |
| molecules | YES | rare | NO | NO | NO |
| organisms | YES | YES | YES | NO | NO |
| templates | NO | NO | YES | NO | NO |
| pages | rare | rare | YES | YES | NO |
Dependencies flow downward only. Violations indicate misclassification.
Anti-Patterns
1. Premature Abstraction
Do not create atoms/molecules for one-off components. Start concrete, extract when you see repetition. Three inline usages before extracting.
2. God Organisms
An organism containing half the page is misclassified. If it defines layout for the whole page, it is a template. Split if it does too many things.
3. Atoms with Business Logic
An atom that knows about user roles, pricing tiers, or feature flags is broken. Domain knowledge enters at the organism or page level via props.
4. Page-Level CSS Hacks
If a component needs custom styling on one page, add a variant prop to the component. Do not override from page-level CSS.
5. Skipping Templates
Jumping from organisms to pages leaks layout logic into page components. Always define page skeleton as a template.
6. Happy Path Only
Every component must handle: empty, error, loading, max-length, min-length, missing data, different roles, and disabled states.
7. Naming Drift
One pattern, one name, everywhere. If it is SearchField in the library, call it SearchField in code, design, conversation, and tickets. Never SearchBar / SearchBox / SearchInput.
Component Creation Checklist
Before creating a new component:
- Level: Which level? Apply the definitions strictly.
- Single responsibility: One sentence without "and"?
- Existing patterns: Similar component exists that could get a variant?
- Reusability: Used in more than one place? If not, start inline and extract later.
- Import direction: Only imports from lower levels?
- Edge cases: Empty, loading, error, extreme content states handled?
- Naming: Consistent with existing vocabulary?
Maintenance
- The design system is a product with ongoing maintenance, not a one-time project.
- When modifying an atom, verify every molecule and organism that uses it.
- Deprecate gracefully with recommended alternatives before removing.
- Test with real content, not Lorem ipsum -- placeholder content hides layout bugs.
- The pattern library and production app use the same component code. One source of truth.
Self-Check
Before applying this skill, verify:
- Project uses React or Next.js with a
components/directory - Project has enough components (10+) to benefit from structured classification
- Team has agreed to adopt component classification (do not impose unilaterally)
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
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.

