stitch/skills/html-to-vue/SKILL.md
Convert Stitch-generated HTML screens to Vue 3 SFCs with semantic Nuxt UI tokens. Remaps Tailwind utility classes, substitutes HTML elements for Nuxt UI components, and removes dark: prefixes. Use when: 'html to vue', 'convert stitch html', 'stitch to component'.
npx skillsauth add murillodutt/cellm stitch/skills/html-to-vueInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Convert Stitch HTML to Vue SFC with semantic tokens and Nuxt UI components.
.stitch/designs/{page}.html file (or user-provided path). If the local file does not exist, fetch HTML via mcp__stitch__get_screen using the screen's htmlCode.downloadUrl.<head>, <script> (including tailwind.config), and <html>/<body> wrappers. Keep only the inner content.tailwind.config from <script> tag to understand project colors, fonts, and radius. This is the token source (Stitch does NOT use CSS variables).@cellm-ai/stitch-bridge/class-map (resolveClass() + matchColor() for DeltaE fallback). Tables below are human-readable reference.dark:* classes. Nuxt UI handles dark mode automatically via the theming layer.bg-[#F8FAFC], text-[#2C2C2C]), compare against tailwind.config colors and DSE palette using deltaE color distance. Map to nearest semantic token if deltaE < 10.<template> + <script setup lang="ts"> with proper imports and typed props.app/components/{PageName}.vue or user-specified path.| Stitch class | Nuxt UI semantic | CSS variable |
|-------------|-----------------|--------------|
| bg-white | bg-default | --ui-bg |
| bg-gray-50 | bg-muted | --ui-bg-muted |
| bg-gray-100 | bg-elevated | --ui-bg-elevated |
| bg-gray-200 | bg-accented | --ui-bg-accented |
| bg-gray-800, bg-gray-900 | bg-inverted | --ui-bg-inverted |
| Stitch class | Nuxt UI semantic | CSS variable |
|-------------|-----------------|--------------|
| text-gray-400 | text-dimmed | --ui-text-dimmed |
| text-gray-500 | text-muted | --ui-text-muted |
| text-gray-600 | text-toned | --ui-text-toned |
| text-gray-700 | text-default | --ui-text |
| text-gray-900, text-black | text-highlighted | --ui-text-highlighted |
| text-white | text-inverted | --ui-text-inverted |
| Stitch class | Nuxt UI semantic | CSS variable |
|-------------|-----------------|--------------|
| border-gray-200 | border-default | --ui-border |
| border-gray-300 | border-accented | --ui-border-accented |
| border-gray-700, border-gray-800 | border-inverted | --ui-border-inverted |
| Stitch class | Nuxt UI semantic |
|-------------|-----------------|
| bg-blue-600, bg-primary, bg-{customColor} | bg-primary |
| text-blue-600, text-primary, text-{customColor} | text-primary |
| border-blue-600, border-primary | border-primary |
| hover:bg-blue-700, hover:bg-primary/90 | hover:bg-primary/90 |
| Stitch class | Nuxt UI semantic |
|-------------|-----------------|
| ring-gray-200, ring-gray-300 | ring-default |
| focus:ring-blue-500, focus:ring-primary | focus:ring-primary |
| Stitch class | Action |
|-------------|--------|
| dark:* (any) | Remove entirely — Nuxt UI theming handles dark mode automatically |
| HTML element | Nuxt UI component | Notes |
|-------------|-------------------|-------|
| <button> | <UButton> | Map class styles to color, variant, size props |
| <input> | <UInput> | Map type, placeholder to props |
| <textarea> | <UTextarea> | Map rows, placeholder to props |
| <select> | <USelect> | Extract <option> elements to :items prop |
| <table> | <UTable> | Extract headers to :columns, rows to :rows |
| <a> (navigation) | <ULink> or <NuxtLink> | Use <NuxtLink> for internal routes |
| <img> | <NuxtImg> | Add loading="lazy" if not present |
| <nav> with links | <UNavigationMenu> | Extract items to :items prop |
| <dialog>, modal divs | <UModal> | Extract trigger and content |
| <details> | <UAccordion> | Extract summary and content to :items |
| <div class="card"> | <UCard> | Map header, body, footer to slots |
| <span class="badge"> | <UBadge> | Map color and variant |
| <div class="avatar"> | <UAvatar> | Map src, alt, size |
Stitch embeds design tokens in an inline <script>tailwind.config = { ... }</script> block — NOT in CSS variables. When extracting tokens:
tailwind.config.theme.extend.colors object for project colorstailwind.config.theme.extend.fontFamily for typographytailwind.config.theme.extend.borderRadius for radius valuesFor arbitrary hex values in classes like bg-[#F8FAFC] or text-[#2C2C2C]:
deltaE < 5: confident match — auto-replace with semantic tokendeltaE 5-10: probable match — replace but flag for reviewdeltaE > 10: no match — keep as custom CSS variable, flag for DSE decisiontailwind.config colors > DSE palette > Tailwind default palettedark: classes — Nuxt UI handles dark mode; keeping them causes conflictstext-primary, not text-blue-600)aria-*, role, alt, for attributes from source HTMLstyle=""data-ai
Prose override — temporarily disable quantization and respond in readable prose. Use when relational density matters, for safety-critical explanations, onboarding handoffs, or when token economy is not the priority.
development
Govern explicit weekly Super PRs or maintainer-requested PR merges. Evaluates a 10-criterion readiness checklist and performs governed merge only when a user-requested PR is READY. Never creates or keeps permanent PRs. Use when: 'pr-check', 'pr-merge', 'merge this PR safely', 'is PR ready', 'guard merge', or /sk-git delegates pr-merge.
data-ai
Operational surface for the compress-llm Layer-1 token I/O compressor. Enable, disable, switch mode, and inspect status without editing config files. Use when tuning compression pressure for the current session or project.
tools
Generate structured upstream feedback for the CELLM engineering team. Produces evidence-first Markdown at docs/evidence/<date>-cellm-feedback-*.md for bugs, anti-patterns, deprecation gaps, and harness surprises, with optional atom registration via knowledge_ops. Use when: 'feedback for CELLM', 'send to CELLM team', 'register this as atom', 'document this anti-pattern', 'report this bug upstream'. Trigger proactively on MCP schema/runtime mismatches, mechanical edit loops (>=3 sequential edits), short deprecation windows (<6 weeks), or reusable harness surprises. Do NOT trigger for routine feature work or project-local bugs.