From claude-skills
Generate high-fidelity UI mockup PNGs for any project by calling Gemini's image model through LiteLLM. Use this whenever the user asks to mock up, generate, regenerate, or update a UI screen, page, modal, or component — login screens, dashboards, settings panels, wizards, admin views, anything with a visual surface. The skill reads the project's visual identity from its `CLAUDE.md` at runtime, frames every output in macOS Safari chrome with a project-appropriate URL, saves to a stable filename so reruns overwrite cleanly, and scans in arrears for older mockups in the same directory that may be stylistically out of date. Prefer this over the bundled `mockup-generator` skill when LiteLLM is the gateway (env vars `OPENAI_BASE_URL` and `OPENAI_API_KEY` live in the user's login shell) and when project visual identity should drive style rather than light-mode DaisyUI defaults.
How this skill is triggered — by the user, by Claude, or both
Slash command
/claude-skills:gemini-mockupThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Generate production-quality UI mockup screenshots by calling Gemini's image model
Generate production-quality UI mockup screenshots by calling Gemini's image model
(gemini-3-pro-image-preview) through LiteLLM. The skill is project-agnostic:
each project supplies its own visual identity via its CLAUDE.md. The skill
handles env loading, browser-chrome framing, the API call, and lifecycle
discipline (stable filenames, scan-in-arrears, image opening).
Trigger this skill whenever:
Don't use this skill when:
caller → SKILL.md (you) → scripts/generate.sh → LiteLLM → Gemini → PNG → disk
The skill drives a five-step workflow:
CLAUDE.md).scripts/generate.sh with the prompt and output path. It
handles env loading, the API call, file I/O, and opening the image.Most of the deterministic work lives in scripts/generate.sh. Most of the
judgment work — what visual identity applies, what filename to use, what
older mockups need refreshing — lives in this SKILL.md.
Visual identity lives in the active project's CLAUDE.md. Look for a section
heading that matches one of:
## Visual Identity## Style Guide## Mockup Style### Visual Identity (subsection of Architecture Context)Read that section in full. It typically describes color palette, typography, component framework (Tailwind / DaisyUI / shadcn / custom), iconography (Hero Icons / Lucide / Phosphor), motif/aesthetic notes, and example URL patterns.
If no such section exists, pause and ask the user:
The project's
CLAUDE.mddoesn't have a## Visual Identitysection. Want me to draft one based on the design ADR / spec for this project, or pass the visual identity directly as a one-shot for this mockup?
Don't fabricate a visual identity silently — let the user choose to either
formalize it in CLAUDE.md (recommended, durable) or pass it inline this
once.
Two cases:
Case A — caller specifies an explicit path. Use it verbatim. The path
SHOULD be a stable filename (e.g., 01-login.png, account-dashboard.png)
so that regenerating overwrites cleanly. Reject timestamp-style filenames
(mockup_20260427_123456.png) — they fragment the spec across versions.
Case B — caller specifies a spec/capability and a screen name. Default the output path to:
<project-root>/docs/openspec/specs/<capability>/mockups/<NN>-<slug>.png
where <NN> is a two-digit ordinal (use the next available, or the natural
flow order if defined by the spec) and <slug> is a descriptive kebab-case
name. Create the parent directory if it doesn't exist.
Other common patterns to recognize:
<project-root>/docs/ui/<slug>.png<project-root>/.claude/mockups/<slug>.pngPrefer the spec-adjacent location (docs/openspec/specs/.../mockups/) when a
spec is the driver — it keeps mockups reviewable next to the requirements
they illustrate.
Before generating, list every existing image file in the target directory:
ls -la <output-dir>
For each existing mockup:
Report the results to the user before generating the new mockup:
Found 4 existing mockups in this directory. 3 match the current visual identity. 1 looks like it predates the dark-mode decision (
02-account-dashboard.png) — want me to regenerate it after this one?
If everything looks current, just say so briefly and proceed.
The point of this step is to keep design artifacts honest: mockups that contradict the current spec mislead reviewers and rot the design record.
The prompt has three layers, concatenated in this order:
Read references/browser-chrome.md and use the prompt fragment there. It
specifies macOS Safari window framing, traffic-light buttons, address bar,
tab bar, drop shadow on a neutral desktop background. This layer is the same
for every mockup; consistency matters because the framing tells the eye
"this is a mockup of a web app" at a glance.
Customize one detail: the address bar URL. Construct a plausible URL based on:
CLAUDE.md's
Deployment Context section)./auth/login,
/accounts, /admin/accounts/42/settings).If the project has no documented deployment domain, default to
https://<project-name>.example.com/<route>.
Inline the visual identity prose from step 1, paraphrased to fit naturally
into an image-generation prompt. Don't quote the CLAUDE.md section
verbatim — translate it into descriptive language Gemini understands
(colors as hex or named hues, typography as named fonts, components as
"DaisyUI cards with rounded corners and soft shadows" rather than as
literal class names).
The caller's specific description of what this screen is and what's on it.
Be concrete: list the actual elements the user should see (header text,
button labels, input placeholders, sample data, navigation items). Use
realistic sample data — never lorem ipsum, never [email protected]
when the project's deployment context implies a different domain.
Read references/quality-bar.md and append. It specifies things like:
"clean, modern, production-ready appearance — not wireframe, not sketch;
proper visual hierarchy with font-size variation; adequate whitespace;
photorealistic rendering quality." Same on every prompt — sets the floor.
Run scripts/generate.sh. It expects:
--prompt <text> — the full assembled prompt from step 4--output <path> — the absolute output path from step 2--size <WxH> — optional, defaults to 1536x1024 (3:2 desktop-feeling
aspect, matches Gemini's preferred sizes)The script:
bash -lc if OPENAI_BASE_URL/OPENAI_API_KEY
aren't set (these typically live in the user's login shell rc).gemini-3-pro-image-preview is
primary; falls back to a sensible alternative if the response is a
model-not-found error).$OPENAI_BASE_URL/v1/images/generations.xdg-open on Linux, open on macOS) — only when a
display is available; in headless environments, just reports the path.After the script returns, report to the user:
Caller request: "Mock up the login screen for SPEC-0005 of Reduit."
Skill workflow:
~/src/reduit/CLAUDE.md → find ## Visual Identity section (or
### Visual Identity under Architecture Context). Identity says: dark
mode, deep indigo + slate, DaisyUI 5 on Tailwind 4, Heroicons, Inter
font, alpine motif.~/src/reduit/docs/openspec/specs/admin-ui-flows/mockups/01-login.png
(next-available ordinal, descriptive slug).ls of mockups directory returns nothing. Report "Empty mockups
dir — no in-arrears candidates."https://reduit.family.tld/auth/login
generate.sh --prompt "..." --output "/path/to/01-login.png"./path/to/01-login.png. No in-arrears mockups to
refresh."Caller request: "Generate a mockup of the dashboard for joe-links and
save it to /tmp/joe-links-dash.png."
Skill workflow:
~/src/joe-links/CLAUDE.md → find visual identity (DaisyUI pastel
theme, system-detect, etc.)./tmp/joe-links-dash.png.ls /tmp/ for joe-links-dash* — none. Report empty.Caller request: "We just changed the spotter style guide to dark-only.
Regenerate the existing mockups under docs/ui/."
Skill workflow:
CLAUDE.md for the new identity.docs/ui/: list every .png, read each one, identify which
look light-mode or otherwise stylistically off.scripts/generate.sh — the generator script.references/browser-chrome.md — universal Layer 1 framing.references/quality-bar.md — universal Layer 4 quality floor.mockup-generator skill — older alternative, light-mode
DaisyUI defaults, doesn't load login env. Use this skill instead when
you have LiteLLM and want project-driven identity.npx claudepluginhub joestump/claude-skills --plugin claude-skillsBuilds a throwaway prototype to answer a design question about UI appearance or state/logic behavior. Guides you through two branches: interactive terminal app for logic validation, or multiple UI variations for visual exploration.