stitch-mcp-generate-variants
npx machina-cli add skill gabelul/stitch-kit/stitch-mcp-generate-variants --openclawStitch MCP — Generate Variants
Generates alternative versions of existing screens using Stitch's native variant generation API. This is more efficient than the text-prompt approach (1 API call vs. 3) and offers fine-grained control over what aspects to vary.
Critical prerequisite
Only use this skill when the user explicitly mentions "Stitch".
You must have both a projectId AND at least one screenId of an existing screen. Variants are always based on an existing design — you can't generate variants from scratch.
When to use
- User wants to explore alternative versions of an existing screen
- After generation, user says "show me some variations" or "try different styles"
- The orchestrator's Step 5b offers "Generate variants"
- A/B testing — creating multiple options for stakeholder review
Call the MCP tool
{
"name": "generate_variants",
"arguments": {
"projectId": "3780309359108792857",
"selectedScreenIds": ["88805abc123def456"],
"prompt": "Explore different color schemes while keeping the layout structure",
"variantOptions": {
"variantCount": 3,
"creativeRange": "EXPLORE",
"aspects": ["COLOR_SCHEME", "IMAGES"]
},
"deviceType": "DESKTOP",
"modelId": "GEMINI_3_PRO"
}
}
Parameter reference
projectId — numeric ID only, no prefix
✅ "3780309359108792857"
❌ "projects/3780309359108792857"
selectedScreenIds — array of numeric screen IDs
✅ ["88805abc123def456"]
❌ ["projects/123/screens/88805abc123def456"]
The source screen(s) to generate variants from.
prompt — optional guidance for variant direction
Provide context about what kind of variations the user wants. The variantOptions do the heavy lifting, but the prompt adds nuance.
variantOptions — controls what and how much to vary
| Field | Type | Values | Description |
|---|---|---|---|
variantCount | int | 1–5 | Number of variants to generate |
creativeRange | enum | REFINE, EXPLORE, REIMAGINE | How much to deviate from the original |
aspects | array | See below | Which design aspects to vary |
creativeRange mapping from user language
| User says | → creativeRange | What it does |
|---|---|---|
| "subtle changes", "minor tweaks", "polish" | REFINE | Small refinements, stays close to original |
| "alternatives", "different options", "explore" | EXPLORE | Meaningful differences while keeping the concept |
| "radical", "completely different", "reimagine" | REIMAGINE | Major departures from the original design |
aspects — what to vary
| Value | Varies | Keeps stable |
|---|---|---|
LAYOUT | Structure, spacing, component arrangement | Colors, fonts, content |
COLOR_SCHEME | Colors, gradients, contrast | Layout, fonts, content |
IMAGES | Photography, illustrations, icons | Layout, colors, text |
TEXT_FONT | Typography, font choices, sizes | Layout, colors, content |
TEXT_CONTENT | Copy, labels, placeholder text | Layout, colors, fonts |
You can combine aspects: ["LAYOUT", "COLOR_SCHEME"] varies both simultaneously.
deviceType — optional
Same enum: MOBILE, DESKTOP, TABLET, AGNOSTIC
modelId — optional
| Value | Use when |
|---|---|
GEMINI_3_PRO | Higher quality variants, complex designs |
GEMINI_3_FLASH | Faster iteration, simpler screens |
Output
Returns new screens added to the project. Each variant appears as a separate screen in list_screens.
After generating variants
- Call
stitch-mcp-list-screensto find all new variant screens - Call
stitch-mcp-get-screenfor each to get screenshots - Present side by side: "Here are your 3 variants: [screenshots]. Which one do you prefer?"
- Once the user picks a winner, offer:
- "Edit the chosen variant further?" →
stitch-mcp-edit-screens - "Convert to code?" → framework conversion workflow
- "Generate more variants from the winner?" → another
generate_variantscall
- "Edit the chosen variant further?" →
Anti-patterns
- Never generate variants without an existing screen — you need a source design
- Never use
projects/IDformat for projectId or screenId — both must be numeric - Never set
variantCountabove 5 — the API caps at 5
Source
git clone https://github.com/gabelul/stitch-kit/blob/main/skills/stitch-mcp-generate-variants/SKILL.mdView on GitHub Overview
Generates alternative versions of existing Stitch screens using the native variant API. Variants are based on an existing design, enabling testing of different color schemes, layouts, fonts, or content while preserving core structure.
How This Skill Works
You must supply a Stitch projectId and at least one screenId. Optionally include a prompt for direction, then provide variantOptions to control how many variants to create, how far they deviate (REFINE/EXPLORE/REIMAGINE), and which aspects to vary (LAYOUT, COLOR_SCHEME, IMAGES, TEXT_FONT, TEXT_CONTENT). The MCP tool returns new variant screens added to the project; you can then list and fetch each variant for review.
When to Use It
- When you want alternative versions of an existing screen.
- After generation, when the user asks for variations or different styles.
- For A/B testing, providing multiple options for stakeholder review.
- When you need controlled deviations using variantOptions instead of text prompts.
- When iterating on color schemes, imagery, or typography while preserving layout.
Quick Start
- Step 1: Gather projectId and the screenIds you want to variant; optionally add a guiding prompt.
- Step 2: Call stitch-mcp-generate-variants with variantCount, creativeRange, aspects, deviceType, and (optionally) modelId.
- Step 3: Run stitch-mcp-list-screens to see new variant IDs, then stitch-mcp-get-screen for screenshots.
Best Practices
- Ensure you have a valid projectId and at least one screenId before generating variants.
- Choose variantCount between 1 and 5 and select an appropriate creativeRange (REFINE, EXPLORE, REIMAGINE).
- Target specific changes by listing relevant aspects (e.g., COLOR_SCHEME, LAYOUT, IMAGES).
- Match deviceType to your target platform (e.g., DESKTOP) and use modelId for quality needs.
- After generation, use stitch-mcp-list-screens and stitch-mcp-get-screen to review and compare variants.
Example Use Cases
- Generate three COLOR_SCHEME and IMAGES variants of a checkout screen for desktop users.
- Create EXPLORE-range layout variants of a dashboard, testing different component arrangements.
- Reimagine typography on a profile screen by varying TEXT_FONT and COLOR_SCHEME.
- Apply subtle TEXT_CONTENT tweaks to an onboarding screen while preserving layout.
- Radically reimagine a landing page (REIMAGINE) to test new messaging and visuals.