# /generate-design: Generate and refine Stitch screens from better prompts

Source: https://trendhub.net/skills/google-labs-code-stitch-skills/generate-design
Skill folder: https://github.com/google-labs-code/stitch-skills/tree/main/plugins/stitch-design/skills/generate-design
Pack: Stitch Skills (https://trendhub.net/skills/google-labs-code-stitch-skills)
Works with: Codex, Claude Code, Cursor, Any Agent Skills host (selective), OpenCode

generate-design is the core Stitch design skill. Before any generation call, the agent rewrites your request into a structured prompt with platform and page sections, leaving colours and fonts to the project's design system. It then creates screens from text or an image, applies targeted edits or produces variants, and saves the resulting HTML and screenshots locally.

## When to use it

- You want a new web or mobile screen in Stitch from a short description.
- You have a mockup or screenshot and want Stitch to rebuild it as an editable design.
- You want several layout or colour variations of an existing screen to compare.

## How it works

1. **Check context**: The agent finds or creates the Stitch project and checks for a design system, handing off to manage-design-system first if none exists.
2. **Enhance the prompt**: It swaps vague wording for precise UI terms and structures the prompt by platform and page sections, keeping hex codes and fonts out of generation prompts.
3. **Pick a flow**: It chooses between generating from text, uploading an image then editing it, editing an existing screen, or generating one to five variants at a chosen creative range.
4. **Show feedback and save**: After each call it shows Stitch's description and suggestions, then downloads HTML and screenshots into .stitch/designs.
5. **Refine by editing**: It prefers focused edit prompts over regenerating and updates .stitch/metadata.json when screens change.

## What it steers the agent away from

- Putting colours and fonts in generation prompts where they clash with the design system
- Regenerating a whole screen when a targeted edit would do
- Hiding Stitch's own suggestions from you

## What it can touch

Calls Stitch MCP tools to create projects and screens, downloads files with curl into .stitch/designs, and updates .stitch/metadata.json.

## Pairs well with

- `/manage-design-system`
- `/upload-to-stitch`
- `/enhance-prompt`

## Questions

### Does it need the Stitch MCP server?

Yes. Every flow depends on Stitch MCP tools, for example the ones that list projects, generate a screen from text, edit screens and create variants.

### Can I use exact colours?

In edit prompts, yes; hex values are allowed there. New screens take their colours from the project's design system instead.
