designmd-to-react-lua
You turn a DESIGN.roblox.md (format spec bundled at
references/spec/SPEC.md) plus a screen requirement ("build the HUD and
shop") into working react-lua code. When working inside the catalog
repository, the canonical worked example is preview-place/ (hand-built
from design-md/cartoon-chunky/DESIGN.roblox.md) — read a component or two
from it to absorb the register before generating. Installed standalone via
npx skills, the repo isn't present: the reference docs' inline patterns
(button/window/motion anatomies, worked code shapes) are the register —
they are sufficient on their own.
Non-negotiables (read the references before writing any code)
references/react-lua-rules.md — the exact API surface and hard bans.
react-lua is React 17 in Luau: NO JSX, NO Roact API, no Suspense.
references/layout-rules.md — Scale-first sizing, layout delegation
(UIListLayout/UIGridLayout — never hand-computed positions for repeating
content), safe areas, ZIndexBehavior = Sibling ALWAYS set explicitly.
- Components before screens: generate the theme module and themed
components first; screens may only compose those components. No free-form
drawing inside screens — that is how quality is structurally guaranteed.
- Precedence on conflicts: the DESIGN.roblox.md owns TASTE (colors, shapes,
strokes, motion feel); the user's explicit requirement owns STRUCTURE and
BEHAVIOR (which screens, which data, which interactions). When a
requirement contradicts the DESIGN.md's taste rules, follow the explicit
requirement only if it is unambiguous, and ALWAYS surface the conflict in
your delivery notes so a human can arbitrate.
Workflow
1. Read the DESIGN.roblox.md
Lint it first with the bundled linter
(node <this-skill-dir>/references/linter/lint.bundle.mjs <file> —
self-contained; in the catalog repo node tools/linter/lint.mjs <file> is
the same linter from source); refuse to build from a file with errors. Then
read the prose — the Overview, Do's and Don'ts, and Agent Prompt Guide
constrain every choice the tokens don't.
2. Generate in this order
Follow references/generation-procedure.md:
Theme.luau — mechanical translation of the front matter (colors →
Color3.fromHex, typography → Font.fromName, rounded → UDim,
strokes/spacing → tables, motion → duration numbers + easing enums).
- Components — one module per Components-section entry, states included
(pressed/disabled/selected), every visual property bound to Theme, never
a literal hex in a component file (exception: values the DESIGN.md itself
inlines, e.g. bevel shades).
- Motion — per
references/motion-implementation.md: press squash and
entrance/exit are mandatory when the Motion section defines them.
- Screens — compose components per the Screen Patterns section.
- Stories — a UI-Labs story per component/screen (see
references/verification.md for the exact story format), so every
deliverable is visually inspectable. For catalog/e2e slices, build the
fixed set in references/standard-showcase.md (same content through
every taste's grammar — that is what makes tastes comparable).
- Assets — icon/texture slots get REAL image assets per
references/asset-sourcing.md (Creator Store free assets via the
search_asset MCP tool, recorded in Theme.assets), not glyph
placeholders.
3. Verify before delivering
Per references/verification.md: syntax-check every file (luau <file>,
grep for error markers), then — when a Studio MCP connection exists — run
the visual QA loop (play → mount story → screenshot → compare against the
DESIGN.roblox.md prose → numeric assertions for states/motion). Self-score
against the rubric: 3-second wayfinding, currency/CTA visibility, 44px+ tap
targets, contrast, and every Do's-and-Don'ts rule.
Quality bar
- Zero Roact/JSX vocabulary in the output.
- Every color/font/radius/duration in generated code traces to a Theme token.
- Layout survives resolution changes: Scale + aspect constraints, no manual
Position math for repeating content.
- States and motion are implemented, not stubbed, whenever the DESIGN.md
defines them.
1---2name: designmd-to-react-lua3description: Implement Roblox UI with react-lua from a DESIGN.roblox.md design-system document plus screen requirements. Use when the user has a DESIGN.roblox.md (or asks to build UI "in this taste") and wants components, screens, or UI-Labs stories generated for Roblox.4---56# designmd-to-react-lua78You turn a `DESIGN.roblox.md` (format spec bundled at9`references/spec/SPEC.md`) plus a screen requirement ("build the HUD and10shop") into working react-lua code. When working inside the catalog11repository, the canonical worked example is `preview-place/` (hand-built12from `design-md/cartoon-chunky/DESIGN.roblox.md`) — read a component or two13from it to absorb the register before generating. Installed standalone via14`npx skills`, the repo isn't present: the reference docs' inline patterns15(button/window/motion anatomies, worked code shapes) are the register —16they are sufficient on their own.1718## Non-negotiables (read the references before writing any code)19201. `references/react-lua-rules.md` — the exact API surface and hard bans.21 react-lua is React 17 in Luau: NO JSX, NO Roact API, no Suspense.222. `references/layout-rules.md` — Scale-first sizing, layout delegation23 (UIListLayout/UIGridLayout — never hand-computed positions for repeating24 content), safe areas, `ZIndexBehavior = Sibling` ALWAYS set explicitly.253. Components before screens: generate the theme module and themed26 components first; screens may only compose those components. No free-form27 drawing inside screens — that is how quality is structurally guaranteed.284. Precedence on conflicts: the DESIGN.roblox.md owns TASTE (colors, shapes,29 strokes, motion feel); the user's explicit requirement owns STRUCTURE and30 BEHAVIOR (which screens, which data, which interactions). When a31 requirement contradicts the DESIGN.md's taste rules, follow the explicit32 requirement only if it is unambiguous, and ALWAYS surface the conflict in33 your delivery notes so a human can arbitrate.3435## Workflow3637### 1. Read the DESIGN.roblox.md3839Lint it first with the bundled linter40(`node <this-skill-dir>/references/linter/lint.bundle.mjs <file>` —41self-contained; in the catalog repo `node tools/linter/lint.mjs <file>` is42the same linter from source); refuse to build from a file with errors. Then43read the prose — the Overview, Do's and Don'ts, and Agent Prompt Guide44constrain every choice the tokens don't.4546### 2. Generate in this order4748Follow `references/generation-procedure.md`:49501. **`Theme.luau`** — mechanical translation of the front matter (colors →51 `Color3.fromHex`, typography → `Font.fromName`, rounded → `UDim`,52 strokes/spacing → tables, motion → duration numbers + easing enums).532. **Components** — one module per Components-section entry, states included54 (pressed/disabled/selected), every visual property bound to Theme, never55 a literal hex in a component file (exception: values the DESIGN.md itself56 inlines, e.g. bevel shades).573. **Motion** — per `references/motion-implementation.md`: press squash and58 entrance/exit are mandatory when the Motion section defines them.594. **Screens** — compose components per the Screen Patterns section.605. **Stories** — a UI-Labs story per component/screen (see61 `references/verification.md` for the exact story format), so every62 deliverable is visually inspectable. **For catalog/e2e slices, build the63 fixed set in `references/standard-showcase.md`** (same content through64 every taste's grammar — that is what makes tastes comparable).656. **Assets** — icon/texture slots get REAL image assets per66 `references/asset-sourcing.md` (Creator Store free assets via the67 `search_asset` MCP tool, recorded in `Theme.assets`), not glyph68 placeholders.6970### 3. Verify before delivering7172Per `references/verification.md`: syntax-check every file (`luau <file>`,73grep for error markers), then — when a Studio MCP connection exists — run74the visual QA loop (play → mount story → screenshot → compare against the75DESIGN.roblox.md prose → numeric assertions for states/motion). Self-score76against the rubric: 3-second wayfinding, currency/CTA visibility, 44px+ tap77targets, contrast, and every Do's-and-Don'ts rule.7879## Quality bar8081- Zero Roact/JSX vocabulary in the output.82- Every color/font/radius/duration in generated code traces to a Theme token.83- Layout survives resolution changes: Scale + aspect constraints, no manual84 Position math for repeating content.85- States and motion are implemented, not stubbed, whenever the DESIGN.md86 defines them.