Перевод: оболочка страницы на русском; тело навыка (SKILL.md) пока на английском — это исходные инструкции агента.
Design To Code Loop
Apply brand tokens from templates into SPA CSS.
Метаданные навыка
| Источник | Встроенный (установлен по умолчанию) |
| Путь | skills/creative/design-to-code-loop |
| Версия | 1.1.0 |
| Автор | VibeOS |
| Лицензия | MIT |
| Платформы | linux, macos, windows |
| Теги | design, tokens, css, popular-web-designs, nextjs, ui, figma |
| Связанные навыки | popular-web-designs, design-md, claude-design, figma-edit, internet-starter, ship-web-service, browser-e2e, desktop-local-preview, saas-mcp-onboarding |
Справка: полный SKILL.md
к сведению
Ниже полное определение навыка, которое VibeOS загружает при активации. Это инструкции, которые видит агент.
Design → Code Loop
Cursor-style design-to-code without an IDE Design sidebar: pick a
popular-web-designs brand (or Figma / screenshot brief) → extract CSS
variables → patch into the SPA → verify with browser / desktop preview.
When to Use
- After
internet-starter/ fullstack scaffold, before polish - User asks for “make it look like Stripe / Linear / Vercel”
- Bridging a screenshot brief or Figma link into concrete CSS tokens
Prerequisites
- A brand template under
popular-web-designs/templates/<brand>.mdor a Figma file URL with MCP enabled or a screenshot to analyze - Target app with a CSS entry (
app/globals.css,styles.css, etc.) - Optional:
design-mdif the deliverable is a formal DESIGN.md instead - Optional Figma:
vibeos mcp install figma+ OAuth (seesaas-mcp-onboarding)
How to Run
Path A — brand template (default)
- Choose a brand (e.g.
stripe,linear.app,vercel). - Extract tokens:
python3 skills/creative/design-to-code-loop/scripts/extract_design_tokens.py \
skills/creative/popular-web-designs/templates/stripe.md \
-o ./tokens.css
- Merge into the SPA:
read_filethe app CSS,patchto import or paste:root { --color-… }fromtokens.css. Paste the Google Fonts<link>from the CSS comment intolayout.tsx/ HTML head. - Apply roles: map
--color-*to buttons, headings, backgrounds (do not leave unused token dump — wire primary CTA + body at minimum). - Smoke:
browser_navigate+browser_vision, or desktop/preview(desktop-local-preview). - Optional formalize: export a DESIGN.md via
design-mdif the user wants a durable token spec.
Path B — Figma MCP
- Enable Figma MCP (read-first):
vibeos mcp install figma→ login → new session. - Paste the Figma file/selection URL; use MCP inspect tools (skill
figma-edit). - Write a short
design-notes.mdwith hex colors, font stacks, spacing. - Run the extractor on that notes file or hand-build
:roottokens andpatch— same merge/verify steps as Path A. - Prefer MCP over
computer_usefor Figma.
Path C — screenshot / live page
- User drops a screenshot, or
browser_navigateto a reference URL. browser_vision/vision_analyze: list primary/background/text/accent hex- font mood (sans/serif) — do not invent colors not visible in the image.
- Save findings as markdown with
**Name** (\#hex`)lines soextract_design_tokens.py` can parse them, then Path A steps 3–5.
Quick Reference
| Step | Surface |
|---|---|
| Brand vocabulary | popular-web-designs |
| Figma file | MCP figma + figma-edit |
| Screenshot / page | browser_vision / vision_analyze |
| Extract CSS/JSON | extract_design_tokens.py |
| Formal spec | design-md |
| Taste / variants | claude-design |
| Verify | browser-e2e / /preview |
Procedure
- Prefer one brand per pass — do not mix Linear + Stripe tokens.
- Keep token names from the extractor; rename only when colliding with existing CSS variables.
- After patch, run network/health checks unchanged — design must not break
/health. - Stop when primary page matches brand colors/fonts in a snapshot; iterate
with
patch, not full rewrites.
Pitfalls
- Do not invent hex values — only use extracted, Figma, vision, or DESIGN.md tokens.
- Do not add a core “design” tool or IDE Design sidebar; this skill +
patchis enough. - Proprietary fonts in templates have CDN substitutes in VibeOS notes — use those.
- Figma mutations only when the user asks and write tools are enabled.
Verification
tokens.csscontains ≥5--color-*variables.- Primary page uses at least background, text, and accent from tokens.
- Browser/desktop preview shows the brand accent on a CTA or link.