Authoring Stitch Prompts
Quick Start
- Collect context – accept natural language, specs, or referenced files describing the screen/app.
1.5. Discover design context (optional) – check for
design-intent/:
- If exists: Extract Project Type, Design System from
design-intent/memory/constitution.md
- If not found: Scan codebase for framework hints (package.json)
- Falls back gracefully to standalone mode
- See WORKFLOW.md for details.
- Parse essentials – identify app type, screen focus, layout elements, and visual cues.
- Detect split points – analyze if input contains multiple screens or distinct intents (>2). Apply smart defaults: split if >2 screens/intents, else combine. Users can request regeneration with different approach.
- Filter aggressively – strip ALL non-UI concerns (backend, auth, APIs, caching, error handling, performance metrics, code-level specs). Focus EXCLUSIVELY on visual layout, components, colors, typography, spacing, and interaction patterns.
- Condense – rewrite into one atomic Stitch directive using "Design/Create/Add…" phrasing.
- Structure output – follow the Stitch prompt template (directive sentence → bullet list → 3–6 style cues → constraints). If design context was discovered, inject project-appropriate style cues. Do NOT use multi-section headings.
- Validate – ensure UI nouns are present, word count <250, NO technical implementation terms, and format matches EXAMPLES.md structure before returning the prompt.
Use this Skill whenever users need Stitch-ready wording, prompt refinements, or style-consistent rewrites.
File Output (design-intent/google-stitch/{feature}/)
Generate optimized prompts in feature-based directories with organized artifact storage:
Feature Name (Directory):
- Derive from main screen/page purpose
- Lowercase, replace whitespace with hyphens
- Strip non
a-z0-9- characters, collapse duplicate hyphens, trim ends
- Examples: "analytics dashboard" →
dashboard, "landing page" → landing, "admin panel" → admin-panel
- Keep semantic and concise (prefer "dashboard" over "analytics-dashboard" when unambiguous)
Directory Structure:
- Create feature directory:
design-intent/google-stitch/{feature}/
- Pre-create subdirectories:
exports/ - For Stitch-generated outputs (PNG, SVG, HTML)
wireframes/ - For pre-work mockups and reference images
- Prompt files live at feature root
File Composition:
- Start with
<!-- Layout: {Title Case Name} --> HTML comment label
- Add layout prompt content
- Add
--- separator line
- For each component:
- Add
<!-- Component: {Title Case Name} --> HTML comment label
- Add component prompt content
- Add
--- separator (between components, not after last)
6-Prompt Stitch Limit:
- Count total prompts (layout + all components)
- If ≤6 prompts: Save as
prompt-v{version}.md
- If >6 prompts: Split into multiple part files
- Part 1: Layout + first 5 components (6 prompts)
- Part 2: Next 6 components
- Part N: Remaining components (max 6 per part)
- Save as:
prompt-v{version}-part{N}.md
- Warn user about Stitch's 6-screen generation limit
Version Auto-Increment:
- Scan
design-intent/google-stitch/{feature}/prompt-v*.md
- Find highest version number, increment automatically
- Start at v1 if no matches
- Each feature maintains independent version history
- Note: Entire file versioned together (not per-component)
File Path Resolution:
- Resolve repo root via
git rev-parse --show-toplevel
- Create
{root}/design-intent/google-stitch/{feature}/ directory
- Create
{feature}/exports/ and {feature}/wireframes/ subdirectories
- Write composed Markdown file to
{feature}/prompt-v{version}.md
Report:
Examples:
Multi-component page (4 prompts):
Input: "Analytics dashboard with KPI cards, revenue chart, and subscriptions table"
Output: design-intent/google-stitch/dashboard/prompt-v1.md
Directory created:
design-intent/google-stitch/dashboard/
├── prompt-v1.md
├── exports/
└── wireframes/
File content:
<!-- Layout: Analytics Dashboard -->
Design a web dashboard page for SaaS analytics overview.
[...layout prompt content...]
---
<!-- Component: KPI Metrics -->
Design metric cards displaying key SaaS performance indicators.
[...component prompt content...]
---
<!-- Component: Revenue Chart -->
Design an interactive line chart for monthly revenue tracking.
[...component prompt content...]
---
<!-- Component: Subscriptions Table -->
Design a subscription activity table showing recent changes.
[...component prompt content...]
Single component (1 prompt):
Input: "Login form with email and password"
Output: design-intent/google-stitch/login/prompt-v1.md
Directory created:
design-intent/google-stitch/login/
├── prompt-v1.md
├── exports/
└── wireframes/
File content:
<!-- Component: Login Form -->
Design a login form for web application.
[...component prompt content...]
Large page split (8 prompts → 2 files):
Input: "Admin panel with navigation, dashboard, users, roles, settings, audit logs, notifications"
Output: design-intent/google-stitch/admin-panel/prompt-v1-part1.md (6 prompts)
- Layout: Admin Panel
- Component: Navigation
- Component: Dashboard
- Component: Users
- Component: Roles
- Component: Settings
Output: design-intent/google-stitch/admin-panel/prompt-v1-part2.md (2 prompts)
- Component: Audit Logs
- Component: Notifications
Directory created:
design-intent/google-stitch/admin-panel/
├── prompt-v1-part1.md
├── prompt-v1-part2.md
├── exports/
└── wireframes/
⚠️ Warning: Use part1 first, then part2 in separate Stitch session
Iteration (auto-increment):
Existing: design-intent/google-stitch/dashboard/prompt-v1.md
Input: "Update analytics dashboard with new metrics"
Auto-detected version → prompt-v2.md
Output: design-intent/google-stitch/dashboard/prompt-v2.md
Directory structure:
design-intent/google-stitch/dashboard/
├── prompt-v1.md ← Previous version
├── prompt-v2.md ← New version
├── exports/
└── wireframes/
(Entire file versioned together, versions coexist in same directory)
Feature Directory Benefits:
- Organized artifacts: All design files grouped by feature
- Version history: All versions accessible in one location
- Design workflow: Natural home for Stitch exports and wireframes
- Stitch-native: Uses Stitch's
--- separator convention
- Auto-increment: Detects existing versions, increments automatically
- Batch generation: Copy one file, generate entire page
- Copy-paste ready: File content works directly in Stitch interface
Input Types
Accepted
- Natural-language descriptions (single screen or short flows)
- Markdown/YAML/JSON specs (
/specs/dashboard.md)
- Revision directives ("move KPI cards above chart", "convert to French", "change button to green")
- References to uploaded wireframes or images
- Language conversion requests ("switch to Spanish", "German version")
- Structured input from
/prompt command (see below)
Structured Input (from /prompt command)
When invoked via the /prompt command with user preferences, the skill receives structured input:
Brief: dashboard for fitness app
Components: activity-summary, workout-chart, goals-progress
Style: Consumer
Structure: Combined
Field Handling:
| Field |
Behavior |
Brief |
Original user input - process normally |
Components |
Use specified list, skip auto-detection |
Style |
Apply style mapping, override design context |
Structure |
Respect choice: Combined/Split/Auto |
Style Mapping:
| Style Value |
Applied Cues |
| Enterprise |
enterprise-grade, professional, data-dense, clean sans-serif typography |
| Consumer |
friendly, approachable, vibrant accents, generous whitespace |
| Minimal |
clean, minimal, ample whitespace, subtle shadows, restrained palette |
| Playful |
playful, colorful, fun, animated feel, rounded corners, bold typography |
| Custom: [text] |
Extract cues from user's custom description |
| Auto |
Use design context discovery (Step 0.5) |
Structure Handling:
| Structure Value |
Behavior |
| Combined |
Skip split detection, generate single file with all components |
| Split |
Force separate prompts per component |
| Auto |
Use smart defaults (Step 1.5/1.6) |
See WORKFLOW.md for detailed parsing logic.
Input Detail Levels
All detail levels are valid—Stitch infers patterns from minimal descriptions:
- High-level (minimal): "fitness tracker app", "professional project management dashboard"
- Medium: "fitness tracker with daily goals and progress charts"
- Detailed: Full component list with specific features and interactions
Use adjectives to convey vibe when details are sparse ("vibrant fitness app", "minimal meditation app").
Workflow Overview
High-level loop: parse → condense → format → validate.
Detailed branching logic, including cue extraction and revision handling, lives in WORKFLOW.md.
Output Structure
Prompts must follow the Stitch-friendly template:
- One-sentence description of the app/screen + primary intent.
- Bullet list (3–6 items) covering layout, components, or flows.
- Visual style cues (palette, typography, density, tone).
- Optional behavior/constraint reminders (responsiveness, export format).
Reference templates/authoring-stitch-prompts-template.md for wording patterns and templates/layout-prompt-template.md for layout/foundation prompts.
Examples
Representative before/after samples (SaaS dashboard, banking app, iterative edits, spec conversions) are in EXAMPLES.md. Use them to mirror tone and formatting; keep this file lean by not re-embedding the full transcripts here.
Implementation Notes
- Keep SKILL.md under 500 lines; detailed prompt transformation logic can go in
REFERENCE.md or templates/authoring-stitch-prompts-template.md.
- Use concise, declarative language.
- Avoid narrative, meta, or conversational phrasing in outputs.
- Always output one atomic, Stitch-compatible prompt per request.
Design Context Integration
When design-intent/ exists in the project, the skill enhances style cues with project context:
- Project Type influences tone (e.g., "enterprise-grade" for Enterprise, "friendly, approachable" for Consumer)
- Design System names appear in style cues (e.g., "Fluent UI styling", "Material Design patterns")
The skill does NOT inject specific tokens (hex colors, spacing values)—only high-level descriptors that help Stitch generate contextually appropriate designs.
Fallback behavior: If design-intent/ is not found, the skill works standalone using default style cues.
See WORKFLOW.md for discovery logic and WORKFLOW.md for injection rules.
Common Issues
- Prompts too verbose – Re-run formatting with the template and trim narration. See TROUBLESHOOTING.md#L1 for guidance.
- Missing style cues – Derive palette/typography keywords from user input or prior session context before finalizing. See TROUBLESHOOTING.md#L25.
- Multi-goal briefs – Split into multiple prompts; re-emphasize Stitch’s atomic focus. See TROUBLESHOOTING.md#L43.
Reference Files
For advanced usage:
- REFERENCE.md — Overview of Stitch best practices
- EXAMPLES.md — Sample transformations
- WORKFLOW.md — Detailed processing loop
- TROUBLESHOOTING.md — Error-handling guidance
- templates/authoring-stitch-prompts-template.md — Output format template
Version History
- v1.0.0 (2025-11-10): Initial release — authoring assistant for Stitch prompt optimization.
1---2name: authoring-stitch-prompts3description: Converts natural-language descriptions or UI spec files into optimized Google Stitch prompts. Use when creating, refining, or validating design directives for Google Stitch. Follows Stitch best practices with short, directive prompts focused on screens, structure, and visual hierarchy.4---5
6# Authoring Stitch Prompts
7
8## Quick Start
91. **Collect context** – accept natural language, specs, or referenced files describing the screen/app.
101.5. **Discover design context** (optional) – check for `design-intent/`:
11 - If exists: Extract Project Type, Design System from `design-intent/memory/constitution.md`
12 - If not found: Scan codebase for framework hints (package.json)
13 - Falls back gracefully to standalone mode
14 - See [WORKFLOW.md](WORKFLOW.md#05-design-context-discovery-optional-enhancement) for details.
152. **Parse essentials** – identify app type, screen focus, layout elements, and visual cues.
163. **Detect split points** – analyze if input contains multiple screens or distinct intents (>2). Apply smart defaults: split if >2 screens/intents, else combine. Users can request regeneration with different approach.
174. **Filter aggressively** – strip ALL non-UI concerns (backend, auth, APIs, caching, error handling, performance metrics, code-level specs). Focus EXCLUSIVELY on visual layout, components, colors, typography, spacing, and interaction patterns.
185. **Condense** – rewrite into one atomic Stitch directive using "Design/Create/Add…" phrasing.
196. **Structure output** – follow the Stitch prompt template (directive sentence → bullet list → 3–6 style cues → constraints). If design context was discovered, inject project-appropriate style cues. Do NOT use multi-section headings.
207. **Validate** – ensure UI nouns are present, word count <250, NO technical implementation terms, and format matches EXAMPLES.md structure before returning the prompt.
21
22Use this Skill whenever users need Stitch-ready wording, prompt refinements, or style-consistent rewrites.
23
24---
25
26## File Output (design-intent/google-stitch/{feature}/)
27
28Generate optimized prompts in **feature-based directories** with organized artifact storage:
29
301. **Feature Name (Directory)**:
31 - Derive from main screen/page purpose
32 - Lowercase, replace whitespace with hyphens
33 - Strip non `a-z0-9-` characters, collapse duplicate hyphens, trim ends
34 - Examples: "analytics dashboard" → `dashboard`, "landing page" → `landing`, "admin panel" → `admin-panel`
35 - Keep semantic and concise (prefer "dashboard" over "analytics-dashboard" when unambiguous)
36
372. **Directory Structure**:
38 - Create feature directory: `design-intent/google-stitch/{feature}/`
39 - Pre-create subdirectories:
40 * `exports/` - For Stitch-generated outputs (PNG, SVG, HTML)
41 * `wireframes/` - For pre-work mockups and reference images
42 - Prompt files live at feature root
43
443. **File Composition**:
45 - Start with `<!-- Layout: {Title Case Name} -->` HTML comment label
46 - Add layout prompt content
47 - Add `---` separator line
48 - For each component:
49 * Add `<!-- Component: {Title Case Name} -->` HTML comment label
50 * Add component prompt content
51 * Add `---` separator (between components, not after last)
52
534. **6-Prompt Stitch Limit**:
54 - Count total prompts (layout + all components)
55 - If ≤6 prompts: Save as `prompt-v{version}.md`
56 - If >6 prompts: Split into multiple part files
57 * Part 1: Layout + first 5 components (6 prompts)
58 * Part 2: Next 6 components
59 * Part N: Remaining components (max 6 per part)
60 * Save as: `prompt-v{version}-part{N}.md`
61 * Warn user about Stitch's 6-screen generation limit
62
635. **Version Auto-Increment**:
64 - Scan `design-intent/google-stitch/{feature}/prompt-v*.md`
65 - Find highest version number, increment automatically
66 - Start at v1 if no matches
67 - Each feature maintains independent version history
68 - Note: Entire file versioned together (not per-component)
69
706. **File Path Resolution**:
71 - Resolve repo root via `git rev-parse --show-toplevel`
72 - Create `{root}/design-intent/google-stitch/{feature}/` directory
73 - Create `{feature}/exports/` and `{feature}/wireframes/` subdirectories
74 - Write composed Markdown file to `{feature}/prompt-v{version}.md`
75
767. **Report**:
77 - After presenting prompts inline, show file info:
78 ```
79 📂 Feature: {feature}/
80 📄 File: prompt-v{version}.md
81
82 Contains {N} prompts (within 6-prompt limit ✓):
83 • Layout: {Title}
84 • Component: {Title}
85 • Component: {Title}
86
87 Directory structure:
88 design-intent/google-stitch/{feature}/
89 ├── prompt-v{version}.md ← Generated prompt
90 ├── exports/ ← Place Stitch outputs here
91 └── wireframes/ ← Place mockups/references here
92
93 Usage:
94 1. Copy prompt file → Paste into Stitch → Generate designs
95 2. Save Stitch exports to exports/ directory
96 3. Store wireframes/mockups in wireframes/ directory
97 ```
98
99**Examples:**
100
101Multi-component page (4 prompts):
102```
103Input: "Analytics dashboard with KPI cards, revenue chart, and subscriptions table"
104
105Output: design-intent/google-stitch/dashboard/prompt-v1.md
106
107Directory created:
108 design-intent/google-stitch/dashboard/
109 ├── prompt-v1.md
110 ├── exports/
111 └── wireframes/
112
113File content:
114 <!-- Layout: Analytics Dashboard -->
115 Design a web dashboard page for SaaS analytics overview.
116 [...layout prompt content...]
117
118 ---
119
120 <!-- Component: KPI Metrics -->
121 Design metric cards displaying key SaaS performance indicators.
122 [...component prompt content...]
123
124 ---
125
126 <!-- Component: Revenue Chart -->
127 Design an interactive line chart for monthly revenue tracking.
128 [...component prompt content...]
129
130 ---
131
132 <!-- Component: Subscriptions Table -->
133 Design a subscription activity table showing recent changes.
134 [...component prompt content...]
135```
136
137Single component (1 prompt):
138```
139Input: "Login form with email and password"
140
141Output: design-intent/google-stitch/login/prompt-v1.md
142
143Directory created:
144 design-intent/google-stitch/login/
145 ├── prompt-v1.md
146 ├── exports/
147 └── wireframes/
148
149File content:
150 <!-- Component: Login Form -->
151 Design a login form for web application.
152 [...component prompt content...]
153```
154
155Large page split (8 prompts → 2 files):
156```
157Input: "Admin panel with navigation, dashboard, users, roles, settings, audit logs, notifications"
158
159Output: design-intent/google-stitch/admin-panel/prompt-v1-part1.md (6 prompts)
160- Layout: Admin Panel
161- Component: Navigation
162- Component: Dashboard
163- Component: Users
164- Component: Roles
165- Component: Settings
166
167Output: design-intent/google-stitch/admin-panel/prompt-v1-part2.md (2 prompts)
168- Component: Audit Logs
169- Component: Notifications
170
171Directory created:
172 design-intent/google-stitch/admin-panel/
173 ├── prompt-v1-part1.md
174 ├── prompt-v1-part2.md
175 ├── exports/
176 └── wireframes/
177
178⚠️ Warning: Use part1 first, then part2 in separate Stitch session
179```
180
181Iteration (auto-increment):
182```
183Existing: design-intent/google-stitch/dashboard/prompt-v1.md
184
185Input: "Update analytics dashboard with new metrics"
186
187Auto-detected version → prompt-v2.md
188
189Output: design-intent/google-stitch/dashboard/prompt-v2.md
190
191Directory structure:
192 design-intent/google-stitch/dashboard/
193 ├── prompt-v1.md ← Previous version
194 ├── prompt-v2.md ← New version
195 ├── exports/
196 └── wireframes/
197
198(Entire file versioned together, versions coexist in same directory)
199```
200
201**Feature Directory Benefits:**
202- **Organized artifacts**: All design files grouped by feature
203- **Version history**: All versions accessible in one location
204- **Design workflow**: Natural home for Stitch exports and wireframes
205- **Stitch-native**: Uses Stitch's `---` separator convention
206- **Auto-increment**: Detects existing versions, increments automatically
207- **Batch generation**: Copy one file, generate entire page
208- **Copy-paste ready**: File content works directly in Stitch interface
209
210---
211
212## Input Types
213
214**Accepted**
215- Natural-language descriptions (single screen or short flows)
216- Markdown/YAML/JSON specs (`/specs/dashboard.md`)
217- Revision directives ("move KPI cards above chart", "convert to French", "change button to green")
218- References to uploaded wireframes or images
219- Language conversion requests ("switch to Spanish", "German version")
220- Structured input from `/prompt` command (see below)
221
222---
223
224## Structured Input (from /prompt command)
225
226When invoked via the `/prompt` command with user preferences, the skill receives structured input:
227
228```
229Brief: dashboard for fitness app
230Components: activity-summary, workout-chart, goals-progress
231Style: Consumer
232Structure: Combined
233```
234
235**Field Handling:**
236
237| Field | Behavior |
238|-------|----------|
239| `Brief` | Original user input - process normally |
240| `Components` | Use specified list, skip auto-detection |
241| `Style` | Apply style mapping, override design context |
242| `Structure` | Respect choice: Combined/Split/Auto |
243
244**Style Mapping:**
245
246| Style Value | Applied Cues |
247|-------------|--------------|
248| Enterprise | enterprise-grade, professional, data-dense, clean sans-serif typography |
249| Consumer | friendly, approachable, vibrant accents, generous whitespace |
250| Minimal | clean, minimal, ample whitespace, subtle shadows, restrained palette |
251| Playful | playful, colorful, fun, animated feel, rounded corners, bold typography |
252| Custom: [text] | Extract cues from user's custom description |
253| Auto | Use design context discovery (Step 0.5) |
254
255**Structure Handling:**
256
257| Structure Value | Behavior |
258|-----------------|----------|
259| Combined | Skip split detection, generate single file with all components |
260| Split | Force separate prompts per component |
261| Auto | Use smart defaults (Step 1.5/1.6) |
262
263See [WORKFLOW.md](WORKFLOW.md#08-parse-structured-input-if-present) for detailed parsing logic.
264
265**Input Detail Levels**
266
267All detail levels are valid—Stitch infers patterns from minimal descriptions:
268
269- **High-level** (minimal): "fitness tracker app", "professional project management dashboard"
270- **Medium**: "fitness tracker with daily goals and progress charts"
271- **Detailed**: Full component list with specific features and interactions
272
273Use adjectives to convey vibe when details are sparse ("vibrant fitness app", "minimal meditation app").
274
275---
276
277## Workflow Overview
278
279High-level loop: parse → condense → format → validate.
280Detailed branching logic, including cue extraction and revision handling, lives in [WORKFLOW.md](WORKFLOW.md).
281
282---
283
284## Output Structure
285
286Prompts must follow the Stitch-friendly template:
287- One-sentence description of the app/screen + primary intent.
288- Bullet list (3–6 items) covering layout, components, or flows.
289- Visual style cues (palette, typography, density, tone).
290- Optional behavior/constraint reminders (responsiveness, export format).
291
292Reference [templates/authoring-stitch-prompts-template.md](templates/authoring-stitch-prompts-template.md) for wording patterns and [templates/layout-prompt-template.md](templates/layout-prompt-template.md) for layout/foundation prompts.
293
294---
295
296## Examples
297
298Representative before/after samples (SaaS dashboard, banking app, iterative edits, spec conversions) are in [EXAMPLES.md](EXAMPLES.md). Use them to mirror tone and formatting; keep this file lean by not re-embedding the full transcripts here.
299
300---
301
302## Implementation Notes
303
304* Keep SKILL.md under 500 lines; detailed prompt transformation logic can go in `REFERENCE.md` or `templates/authoring-stitch-prompts-template.md`.
305* Use concise, declarative language.
306* Avoid narrative, meta, or conversational phrasing in outputs.
307* Always output one atomic, Stitch-compatible prompt per request.
308
309---
310
311## Design Context Integration
312
313When `design-intent/` exists in the project, the skill enhances style cues with project context:
314
315- **Project Type** influences tone (e.g., "enterprise-grade" for Enterprise, "friendly, approachable" for Consumer)
316- **Design System** names appear in style cues (e.g., "Fluent UI styling", "Material Design patterns")
317
318The skill does NOT inject specific tokens (hex colors, spacing values)—only high-level descriptors that help Stitch generate contextually appropriate designs.
319
320**Fallback behavior**: If `design-intent/` is not found, the skill works standalone using default style cues.
321
322See [WORKFLOW.md](WORKFLOW.md#05-design-context-discovery-optional-enhancement) for discovery logic and [WORKFLOW.md](WORKFLOW.md#37-inject-design-context-into-style-cues) for injection rules.
323
324---
325
326## Common Issues
327
328- **Prompts too verbose** – Re-run formatting with the template and trim narration. See [TROUBLESHOOTING.md](TROUBLESHOOTING.md)#L1 for guidance.
329- **Missing style cues** – Derive palette/typography keywords from user input or prior session context before finalizing. See [TROUBLESHOOTING.md](TROUBLESHOOTING.md)#L25.
330- **Multi-goal briefs** – Split into multiple prompts; re-emphasize Stitch’s atomic focus. See [TROUBLESHOOTING.md](TROUBLESHOOTING.md)#L43.
331
332---
333
334## Reference Files
335
336For advanced usage:
337
338* [REFERENCE.md](REFERENCE.md) — Overview of Stitch best practices
339* [EXAMPLES.md](EXAMPLES.md) — Sample transformations
340* [WORKFLOW.md](WORKFLOW.md) — Detailed processing loop
341* [TROUBLESHOOTING.md](TROUBLESHOOTING.md) — Error-handling guidance
342* [templates/authoring-stitch-prompts-template.md](templates/authoring-stitch-prompts-template.md) — Output format template
343
344---
345
346## Version History
347
348* v1.0.0 (2025-11-10): Initial release — authoring assistant for Stitch prompt optimization.