Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/CodySwannGT/expostarter --skill atomic-design-gluestack명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
SKILL.md 표시 중
SOC 직업 분류 기준
| name | atomic-design-gluestack |
| description | Enforces atomic design… |
This skill enforces Brad Frost's atomic design methodology adapted for React Native/Expo projects using Gluestack UI v3 + NativeWind v4. It provides clear guidelines for component categorization, directory structure, composition patterns, and testing strategies for each atomic level.
Before applying this skill, check whether the target project has a sealed or closed design system. Common markers include .claude/rules/use-the-design-library.md, .claude/rules/figma-design-system.md, design-system ESLint rules, or a project-owned @/components/atoms barrel paired with design-system docs/configuration.
If a sealed design system is present, defer to the project's design-library rules and skills instead, such as use-the-design-library and add-design-library-item. Keep the atomic hierarchy concepts only when they match the local seal. Do not redefine the atom library as @/components/ui, use Gluestack compound trees as canonical atoms, or recommend className and raw Gluestack tokens where the project seal forbids them.
For open Gluestack UI v3 + NativeWind v4 projects without those seal markers, continue with the guidance below.
Components are organized into five levels, from simplest to most complex:
| Level | Definition | State | Examples |
|---|---|---|---|
| Atoms | Foundational building blocks that cannot be broken down further while remaining functional | Stateless (purely presentational) | Button, Text, Icon, Input, Badge |
| Molecules | Simple groups of UI elements functioning together as a unit | Isolated state (form validation, toggles) | SearchField, FormField, AvatarWithName |
| Organisms | Complex components composed of molecules and atoms forming distinct interface sections | Feature state, coordinates children | Header, ProductCard, NavigationDrawer |
| Templates | Page-level layouts that place components into a structure (skeleton without real content) | Layout state only | MainLayout, AuthLayout, DashboardLayout |
| Pages | Specific instances of templates with real content and data | Connected to global state | HomeScreen, ProfileScreen, SettingsScreen |
Design tokens sit below atoms as the foundational layer. In this project, tokens are defined in:
components/ui/gluestack-ui-provider/config.ts - Color tokens (primary, secondary, error, success, etc.)tailwind.config.js - Spacing, typography, and other design tokens via NativeWindcomponents/
├── ui/ # Gluestack UI library components (DO NOT MODIFY unless extending)
├── atoms/ # Project-specific atoms
│ ├── AppIcon/
│ │ ├── index.tsx
│ │ ├── AppIcon.test.tsx
│ │ └── types.ts
│ └── index.ts # Barrel export for atoms
├── molecules/ # Composite simple components
│ ├── SearchField/
│ │ ├── index.tsx
│ │ ├── SearchFieldView.tsx
│ │ ├── SearchField.test.tsx
│ │ └── types.ts
│ └── index.ts
├── organisms/ # Complex feature components
│ ├── Header/
│ │ ├── index.tsx
│ │ ├── HeaderView.tsx
│ │ ├── Header.test.tsx
│ │ └── types.ts
│ └── index.ts
└── templates/ # Page layouts
├── MainLayout/
│ ├── index.tsx
│ ├── MainLayoutView.tsx
│ └── types.ts
└── index.ts
features/
└── [feature-name]/
├── components/ # Feature-specific components (follow atomic naming)
│ ├── atoms/
│ ├── molecules/
│ └── organisms/
└── screens/ # Pages (specific to this feature)
app/ # Expo Router pages (connect templates with data)
The 40+ Gluestack UI components in components/ui/ serve as the foundation atom library. When building custom components:
@/components/ui/components/atoms/components/ui/ - Except for theme customization in config.tsDefinition: Smallest functional UI elements that cannot be broken down further.
Characteristics:
Gluestack Atoms (use directly from @/components/ui/):
When to create custom atoms:
/**
* AppLogo atom - Branded logo component
* @description Displays the application logo with consistent sizing
*/
const AppLogo = memo(function AppLogo({ size = "md" }: AppLogoProps) {
return (
<Image
source={logoSource}
className={logoSizes[size]}
alt="App Logo"
/>
);
});
Definition: Simple groups of atoms functioning together as a unit.
Characteristics:
Examples:
/**
* SearchField molecule - Search input with button
* @description Combines Input and Button atoms for search functionality
*/
const SearchField = memo(function SearchField({
onSearch,
placeholder
}: SearchFieldProps) {
const [value, setValue] = useState("");
return (
<HStack space="sm" className="items-center">
<Input className="flex-1">
<InputField
value={value}
onChangeText={setValue}
placeholder={placeholder}
/>
</Input>
<Button onPress={() => onSearch(value)}>
<ButtonIcon as={SearchIcon} />
</Button>
</HStack>
);
});
Molecule Checklist:
Definition: Relatively complex components forming distinct interface sections.
Characteristics:
Examples:
/**
* ProductCard organism - Complete product display
* @description Displays product information with actions
*/
const ProductCard = memo(function ProductCard({
product,
onAddToCart
}: ProductCardProps) {
return (
<Card variant="elevated" size="md">
<ProductImage source={product.image} /> {/* Atom */}
<VStack space="sm" className="p-4">
<Heading size="md">{product.name}</Heading> {/* Atom */}
<PriceDisplay price={product.price} /> {/* Molecule */}
<RatingStars rating={product.rating} /> {/* Molecule */}
<AddToCartButton onPress={onAddToCart} /> {/* Molecule */}
</VStack>
</Card>
);
});
Organism Checklist:
Definition: Page-level layouts that place components into a structure.
Characteristics:
Example:
/**
* MainLayout template - Primary app layout
* @description Provides consistent header, content, and footer structure
*/
const MainLayout = memo(function MainLayout({
children,
showHeader = true,
showFooter = true
}: MainLayoutProps) {
return (
<SafeAreaView className="flex-1 bg-background-0">
{showHeader && <Header />}
<ScrollView className="flex-1">
{children}
</ScrollView>
{showFooter && <Footer />}
</SafeAreaView>
);
});
Definition: Specific instances of templates with real content and data.
Characteristics:
app/ (Expo Router) or features/*/screens/Example:
/**
* HomeScreen page - Main home page
* @description Renders home content with fetched data
*/
export default function HomeScreen() {
const { data, loading } = useHomeDataQuery();
return (
<MainLayout>
{loading ? (
<LoadingSpinner />
) : (
<VStack space="lg">
<FeaturedProducts products={data.featured} />
<RecentActivity items={data.activity} />
</VStack>
)}
</MainLayout>
);
}
When creating or reviewing components, verify:
Correct Directory Placement
components/atoms/ or features/*/components/atoms/components/molecules/ or features/*/components/molecules/components/organisms/ or features/*/components/organisms/components/templates/app/ or features/*/screens/State Appropriateness
Import Direction (dependencies flow upward only)
Pages → Templates → Organisms → Molecules → Atoms → Design Tokens
Composition Appropriateness
| Mistake | Problem | Solution |
|---|---|---|
| Atom with useState | Atoms should be stateless | Move state to parent molecule |
| Molecule fetching data | Data fetching belongs in pages | Accept data as props |
| Organism in atoms folder | Misclassification | Move to organisms folder |
| Template with business logic | Templates handle layout only | Move logic to page |
| Importing organism in atom | Wrong dependency direction | Restructure component hierarchy |
| Level | Test Type | Focus |
|---|---|---|
| Atoms | Unit + Snapshot | Props rendering, accessibility |
| Molecules | Unit + Interaction | Composition, isolated state |
| Organisms | Integration | Data flow, child coordination |
| Templates | Layout | Slot rendering, responsiveness |
| Pages | E2E | Full user flows |
Is it a single, indivisible UI element?
├─ YES → ATOM
└─ NO → Does it combine 2-5 atoms for a single purpose?
├─ YES → MOLECULE
└─ NO → Does it form a distinct interface section?
├─ YES → ORGANISM
└─ NO → Is it a layout skeleton?
├─ YES → TEMPLATE
└─ NO → PAGE
Reference references/gluestack-mapping.md for the complete mapping of all 40 Gluestack UI components to their atomic levels.
atomic-levels.md - Detailed definitions with comprehensive examplesgluestack-mapping.md - Complete Gluestack UI component classificationfolder-structure.md - Detailed directory structure requirementsvalidate_atomic_structure.py - Validates component placement and imports