mcpField
E
expo-design-system-scaffolder

expo-design-system-scaffolder

github.com/pproencaDesign & UI218122 installsUpdated 11w ago
Repository

About expo-design-system-scaffolder

A template-based skill for scaffolding Expo and React Native design-system components. It helps teams create reusable components and screens with Unistyles v3 variants, design tokens, accessibility, and web/iOS parity built in.

Key features

  1. 01Templates for components, screens, and tokens
  2. 02Unistyles v3 variants and design tokens
  3. 03Accessibility and ref-as-prop patterns
  4. 04Web and iOS interaction parity
  5. 05Storybook stories and component index

Use cases

  1. 01Adding a shared button, card, text, or input component
  2. 02Scaffolding a domain-entity list screen
  3. 03Adding a token group to a Unistyles theme
  4. 04Cataloging component variants in Storybook

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/pproenca/dot-skills --skill expo-design-system-scaffolder

After installing, type/expo-design-system-scaffolderin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

config.json
gotchas.md
metadata.json
assets/templates/
card-surface.tsx.template
component-index.ts.template
component-story.tsx.template
form-field.tsx.template
list-screen.tsx.template
text-primitive.tsx.template
token-group.ts.template
variant-component.tsx.template
references/
conventions.md

Details

From the project README

Expo Design System Scaffolder

Parameterized templates that generate Expo / React Native design system components which start correct instead of being retrofitted. Every template uses Unistyles v3 variants (never a style escape hatch), ref-as-prop, design tokens, built-in accessibility, and web/iOS parity (_web hover/focus/cursor on interactive primitives), and cites the expo-design-system rule IDs it satisfies.

When to Apply

Use this skill when the user wants to:

  • Create or add a new shared component — a button, card, text, input, or other primitive
  • Scaffold a new screen that lists a domain entity (appointments, patients, notes)
  • Add a new design token group (colors, etc.) to the Unistyles theme
  • Add a Storybook story that catalogs a component's variants
  • Start a new feature and want its components to follow the design system from the first commit
  • Set up or update the design system index so agents discover and reuse existing components before building new ones

Available Templates

To scaffold: read the template, substitute the placeholders, and write the result under the design system package (or app/ for the screen). Placeholders are single-brace identifier tokens (e.g., {ComponentName}); literal TSX and Unistyles braces (e.g., { variant }, {item.title}) stay as-is.

TemplateGeneratesPlaceholders
variant-component.tsx.templatePressable primitive with variant/size variants, press/disabled states, web hover/focus/cursor, accessibility, ref prop{ComponentName} {file_path}
card-surface.tsx.templateComposite surface with leading/trailing/children slots, tone/inset variants, elevation token{ComponentName} {file_path}
text-primitive.tsx.templateTyped text component with variant/tone, no raw style, capped font scaling{ComponentName} {file_path}
form-field.tsx.templateLabeled input: controlled/uncontrolled, ref prop, error variant, web focus ring, accessibility{ComponentName} {file_path}
list-screen.tsx.templateEntity list composed from primitives: FlashList, memoized row, web row hover/cursor, safe-area insets{ScreenName} {Entity} {entity} {entity_plural} {route_path} {file_path}
token-group.ts.templateRaw → semantic → component token group to merge into the Unistyles theme{token_group} {file_path}
component-story.tsx.templateStorybook story rendering every variant side by side{ComponentName} {file_path}
component-index.ts.templateThe design system's single public entry and inventory catalog — agents read it before styling to reuse what exists (reuse-first){file_path}

Common placeholders:

  • {ComponentName} — PascalCase component, e.g. AppButton, AppCard, AppText, AppTextField
  • {ScreenName} — PascalCase screen with a Screen suffix, e.g. AppointmentsScreen
  • {Entity} / {entity} / {entity_plural} — PascalCase, camelCase, and plural, e.g. Appointment / appointment / appointments
  • {route_path} — route segment pushed for a row, e.g. appointments
  • {token_group} — camelCase token group name, e.g. statusBadge
  • {file_path} — the destination path, written into the header comment

How to Use

  1. Pick the template for what you are building.
  2. Choose values for its placeholders (see the table and each template's header comment).
  3. Substitute the tokens and write the file under design_system_dir (or app_dir for the screen).
  4. Generate a matching story with component-story.tsx.template so the variants are cataloged.
  5. Append the new component to the design system index (component-index.ts.template) — an export plus a one-line catalog entry — so the next agent finds and reuses it instead of rebuilding it.
  6. Fill in the data layer the screen imports (use{Entity}List, the domain type) — the scaffold owns the view; you own the data.
  7. Read references/conventions.md for the rules each template enforces and when to deviate.

Setup

config.json is optional. Override on first use if your project differs:

  • design_system_dir — design system package source (default packages/design-system/src)
  • app_dir — Expo Router routes directory for the screen template (default app)

Related Skills

  • expo-design-system — the rule pack these templates follow; each generated file cites it.
  • expo-react-native-coder — feature development around the scaffolded components.

Comments

Markdown supported