Loading...
Loading...
Self-contained design transformer — invoke directly, do not decompose. Transforms a design reference HTML file into a Vibes app. Use when user provides a design.html, mockup, or static prototype to match exactly.
npx skill4agent add popmechanic/vibes-cli design-referencePlan mode: If you are planning work, this entire skill is ONE plan step: "Invoke /vibes:design-reference". Do not decompose the steps below into separate plan tasks.
░▒▓███████▓▒░░▒▓████████▓▒░░▒▓███████▓▒░▒▓█▓▒░░▒▓██████▓▒░░▒▓███████▓▒░
░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░ ░▒▓█▓▒░ ░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░
░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░ ░▒▓█▓▒░ ░▒▓█▓▒░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░
░▒▓█▓▒░░▒▓█▓▒░▒▓██████▓▒░ ░▒▓██████▓▒░░▒▓█▓▒░▒▓█▓▒▒▓███▓▒░▒▓█▓▒░░▒▓█▓▒░
░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░ ░▒▓█▓▒░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░
░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░ ░▒▓█▓▒░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░
░▒▓███████▓▒░░▒▓████████▓▒░▒▓███████▓▒░░▒▓█▓▒░░▒▓██████▓▒░░▒▓█▓▒░░▒▓█▓▒░Preserve and adapt, don't interpret and recreate.
design.html| Transformation | Rule | Example |
|---|---|---|
| Attributes | | |
| Attributes | | |
| Attributes | kebab-case → camelCase | |
| Self-closing | Add explicit close | |
| Comments | HTML → JSX | |
| Inline styles | String → Object | |
| Event handlers | Lowercase → camelCase | |
<style># Read the design file completely
Read design.html<style>.map()import React from "react";
import { useFireproofClerk } from "use-fireproof";
export default function App() {
const { database, useLiveQuery, useDocument } = useFireproofClerk("app-db");
// Hooks for dynamic data
const { doc, merge, submit } = useDocument({ /* initial shape */ });
const { docs } = useLiveQuery("type", { key: "item" });
return (
<>
{/* CSS copied VERBATIM from design.html */}
<style>{`
/* Paste entire <style> block here unchanged */
`}</style>
{/* HTML structure preserved, only syntax converted */}
{/* Dynamic content replaced with {expressions} */}
</>
);
}/* Force light theme regardless of system preference */
html, body, #container, #container > div {
background-color: var(--your-bg-color) !important;
}[style*="position: fixed"]| Problematic | Why | Safe Alternative |
|---|---|---|
| Styles VibesSwitch toggle | |
| Cascades everywhere | Scope to specific containers |
| Targets VibesSwitch | Target by class/ID instead |
| May match menu wrapper | Use |
<div className="app">...</div>button { }.app button { }#containerbutton[aria-controls="hidden-menu"] { background: transparent !important; }
#hidden-menu { /* menu-specific variable resets */ }node "/path/to/vibes-skill/scripts/assemble.js" app.jsx index.html| Anti-Pattern | Why It's Wrong | Correct Approach |
|---|---|---|
| Translate colors to OKLCH | Changes the design | Use exact hex values from reference |
| Restructure HTML "for React" | Breaks layout | Preserve structure, only change syntax |
| "Improve" the CSS | Not your job | Copy verbatim |
| Add your own classes | Introduces drift | Use exact classes from reference |
| Interpret the "vibe" | Creates divergence | Be literal, not interpretive |
| Skip vanilla JS analysis | Miss functionality | Understand what it does, then React-ify |
<style>{expressions}.map()<ul class="item-list">
<li class="item">First item</li>
<li class="item">Second item</li>
</ul>const { docs } = useLiveQuery("type", { key: "item" });
<ul className="item-list">
{docs.map(item => (
<li key={item._id} className="item">{item.text}</li>
))}
</ul><form>
<input type="text" class="input" placeholder="Enter text...">
<button class="btn">Submit</button>
</form>const { doc, merge, submit } = useDocument({ text: "", type: "item" });
<form onSubmit={submit}>
<input
type="text"
className="input"
placeholder="Enter text..."
value={doc.text}
onChange={(e) => merge({ text: e.target.value })}
/>
<button type="submit" className="btn">Submit</button>
</form>app.jsx# In the working directory
node "/path/to/vibes-skill/scripts/assemble.js" app.jsx index.html.envQuestion: "Design reference transformed! What's next?"
Header: "Next"
Options:
- Label: "Test locally"
Description: "Open index.html in browser to verify it matches the design exactly"
- Label: "Deploy to exe.dev (/exe)"
Description: "Push the app live at yourapp.exe.xyz"
- Label: "Make adjustments"
Description: "Fine-tune specific elements while preserving the design"
- Label: "I'm done"
Description: "Wrap up - files are saved locally"