Help us improve
Share bugs, ideas, or general feedback.
From moldui
Applies pending moldui visual edits (styles, text, reorder, swap, clone) to source code, targeting Tailwind classes, JSX, HTML in Next.js/Vite/Vue projects. Invoke via /moldui-sync after browser changes.
npx claudepluginhub manavarya09/moldui --plugin molduiHow this skill is triggered — by the user, by Claude, or both
Slash command
/moldui:moldui-syncThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
This skill reads pending visual edit batches from `.moldui/` in the current project and translates them into source code edits.
Launches visual editor overlay on running web app dev servers. Drag/resize elements, edit text/styles in browser; changes sync to source code via Claude with Tailwind/CSS support.
Generates jscodeshift or ts-morph codemods for design system migrations: token renames, component API changes, prop deprecations, import updates.
Generates frontend code (HTML, React, Flutter) from screenshots, mockups, text descriptions, HTML files, or URLs via GLM vision API. Supports CREATE, REVIEW, FIX modes for generation, visual review, and fixes.
Share bugs, ideas, or general feedback.
This skill reads pending visual edit batches from .moldui/ in the current project and translates them into source code edits.
/moldui-syncmoldui and clicked SaveCheck for pending batches
ls -1 .moldui/batch-*.json 2>/dev/null
If no batches found, tell the user: "No pending moldui edits found. Run npx moldui and make some visual changes first."
Read all pending batches in chronological order (sorted by timestamp in filename). Each batch is JSON with:
timestamp: when the batch was createdframework: detected framework (e.g. nextjs, vite, vue, static)sourceHints: array of { file, confidence, reason } — likely source fileschanges: array of change descriptorsprompt: pre-built prompt describing changesFor each batch, apply changes intelligently:
For style changes (type: style):
element.classes to find the element in sourcep-6 → p-8 when padding changes from 24px to 32px)changes object: { padding: { from: "24px", to: "32px" } }For text changes (type: text):
oldText in source files (prefer files from sourceHints)newTextFor reorder changes (type: reorder):
fromParent selector or class namesfromIndex to toIndexfromParent !== toParent, move the element to a different containerFor swap changes (type: swap):
selector and swapSelectorFor clone changes (type: clone):
Use sourceHints first — these are the most likely source files. Read them first, then grep if needed.
Edit files minimally — preserve existing code style, formatting, indentation.
After applying each batch, delete it:
rm .moldui/batch-{timestamp}.json
Report to the user:
When the framework uses Tailwind CSS, translate CSS values to Tailwind classes:
| CSS | Tailwind |
|---|---|
padding: 24px | p-6 |
padding: 32px | p-8 |
margin: 16px | m-4 |
gap: 16px | gap-4 |
border-radius: 8px | rounded-lg |
border-radius: 12px | rounded-xl |
border-radius: 16px | rounded-2xl |
font-size: 16px | text-base |
font-size: 18px | text-lg |
font-size: 24px | text-2xl |
width: 100% | w-full |
Base unit = 4px. So {N}px → {N/4} (e.g., 12px → 3).
Next.js / React:
app/*/page.tsx, pages/*/index.tsx, components/*.tsxVue:
<template>, <script>, <style>Svelte:
.svelte files with <script>, HTML, and <style>Django/Rails/Laravel:
Static HTML:
<style> block or linked CSSUser: /moldui-sync
Claude: Found 1 pending batch with 3 changes.
Reading batch-1713300000000.json...
Framework: nextjs + tailwind
Source hints: src/app/page.tsx (route match)
Applied changes:
✓ src/app/page.tsx — padding p-6 → p-8 on .card (3 instances)
✓ src/app/page.tsx — text "Welcome to My App" → "Ship Faster with AI" (h1)
✓ src/app/page.tsx — reordered grid children [0,1,2] → [2,0,1]
Deleted batch file.