tddworks/claude-skills/swiftui-atomic-design
- community
Checking that the SKILL.md file is still in the repository.
Guide for building SwiftUI components using Brad Frost's Atomic Design methodology — organizing views into Atoms, Molecules, Organisms, Templates, and Pages with Design Tokens for theming. Use this skill whenever building new SwiftUI UI components, refactoring existing views into reusable pieces, creating a design system, or organizing a component library. Also trigger when the user mentions "atomic design", "design system", "component hierarchy", "reusable components", "atoms and molecules", "design tokens", or wants to decompose a complex SwiftUI view into smaller, composable parts, or needs to implement theming/customization across a SwiftUI app.
Install
npx vskill@latest install tddworks/claude-skills/swiftui-atomic-designSKILL.md
SwiftUI Atomic Design System
Atomic Design is Brad Frost's methodology for building UI systems from small, composable pieces. In SwiftUI, this maps naturally to the framework's declarative, compositional view architecture. The hierarchy flows from simple to complex:
Design Tokens → Atoms → Molecules → Organisms → Templates → Pages
Each level composes the one below it. Design Tokens provide the visual foundation that all levels reference. The discipline is knowing where a component belongs — that's what makes the system scalable, consistent, and maintainable.
Design Tokens — The Visual Foundation
Design tokens are the centralized source of truth for all visual properties: colors, typography, spacing. They sit beneath atoms — every component references tokens rather than hardcoding values. This ensures consistency across the entire design system and makes sweeping visual changes (rebranding, dark mode, accessibility) a single-point update.
Why tokens matter:
- Change a brand color once, and it propagates everywhere
- Enable theming (light/dark, high contrast) without touching component code
- Create a shared vocabulary between design and development
- Prevent visual drift as the codebase grows
Common token categories: colors, typography (font families, sizes, weights), spacing (margins, padding), corner radii, shadows/elevations, animation durations, opacity values.
Theming and Customization
Tokens become powerful when combined with SwiftUI's Environment system for runtime theming. Define theme variants and inject them through the environment so every component adapts automatically.
Components read from @Environment(\.appTheme) instead of hardcoding colors, making the entire UI theme-switchable.
The Hierarchy
Atoms — Single-responsibility UI primitives
An atom is the smallest meaningful UI element. It does one thing and has no awareness of its context. Atoms reference Design Tokens for all visual properties — they never hardcode colors, fonts, or spacing.
What qualifies as an atom:
- Renders a single visual concept (a badge, an icon, a divider, a label, a button)
- Takes only primitive/value-type inputs (String, Color, Bool, CGFloat, enums)
- Has zero business logic — purely presentational
- Never reads from Environment or stores (except theme tokens)
- References Design Tokens for all visual values
SwiftUI patterns for atoms:
- Small structs, typically 10–30 lines
- Use computed properties for style variants rather than complex switch statements in
body - Proportional sizing (e.g.,
size * 0.5) so atoms scale naturally
Common atoms: badges, pills, dividers, icon wrappers, character counters, section headers (text-only), card backgrounds, simple labels, primary/secondary buttons, text field wrappers.
Molecules — Functional combinations of atoms
A molecule combines 2–3 atoms (or atom-level elements) into a unit that serves a single user purpose. Molecules are the backbone of the design system — they create the reusable patterns that appear throughout the app. The key test: does this combination appear in multiple places?
What qualifies as a molecule:
- Combines atoms into a meaningful group (icon + label + value)
- Serves one user-facing function (show info, trigger action, display status)
- May accept closures for actions, but doesn't manage state itself
- Can accept
@Bindingfor two-way data flow (e.g., text fields) - Can accept domain types if they simplify the API, but the view itself stays presentational
Common molecules: info rows, action buttons with labels, search bars, form fields with validation, stat cards, option/toggle rows, tip views, labeled input fields.
Organisms — Complex, self-contained UI sections
An organism is a distinct section of the interface that could stand alone. It composes multiple molecules (and atoms) into a cohesive unit. Organisms form the significant parts of your UI — login forms, navigation bars, metric dashboards. This is where you introduce @ViewBuilder content slots and section-level structure.
What qualifies as an organism:
- Represents a visually distinct region (a section, a card group, a toolbar, a form)
- Composes multiple molecules into a layout
- May use
@ViewBuilderfor content injection - May read from
@Environmentfor contextual data - Can manage local UI state (
@Statefor expand/collapse, selection, etc.)
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/swiftui-atomic-design/SKILL.md
Popularity
- Repository stars
- 35
- Repository forks
- 6
- 7-day trend score
- 18
Stars and forks are for the whole GitHub repository, not this skill alone. 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/tddworks/claude-skills/swiftui-atomic-design)