Authoring Stitch Prompts
Quick Start
- Collect context – accept natural language, specs, or referenced files describing the screen/app.
- 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). 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 (.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:
.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
.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}/.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: .google-stitch/dashboard/prompt-v1.md
Directory created:
.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: .google-stitch/login/prompt-v1.md
Directory created:
.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: .google-stitch/admin-panel/prompt-v1-part1.md (6 prompts)
- Layout: Admin Panel
- Component: Navigation
- Component: Dashboard
- Component: Users
- Component: Roles
- Component: Settings
Output: .google-stitch/admin-panel/prompt-v1-part2.md (2 prompts)
- Component: Audit Logs
- Component: Notifications
Directory created:
.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: .google-stitch/dashboard/prompt-v1.md
Input: "Update analytics dashboard with new metrics"
Auto-detected version → prompt-v2.md
Output: .google-stitch/dashboard/prompt-v2.md
Directory structure:
.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")
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.
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.
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. The Skill follows Stitch best practices—short, directive prompts focused on screens, structure, and visual hierarchy with clear UI vocabulary, concise style cues, and one primary intent per prompt. Trigger when the user wants to prepare or improve prompts for Stitch.4---5
6# Authoring Stitch Prompts
7
8## Quick Start
91. **Collect context** – accept natural language, specs, or referenced files describing the screen/app.
102. **Parse essentials** – identify app type, screen focus, layout elements, and visual cues.
113. **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.
124. **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.
135. **Condense** – rewrite into one atomic Stitch directive using "Design/Create/Add…" phrasing.
146. **Structure output** – follow the Stitch prompt template (directive sentence → bullet list → 3–6 style cues → constraints). Do NOT use multi-section headings.
157. **Validate** – ensure UI nouns are present, word count <250, NO technical implementation terms, and format matches EXAMPLES.md structure before returning the prompt.
16
17Use this Skill whenever users need Stitch-ready wording, prompt refinements, or style-consistent rewrites.
18
19---
20
21## File Output (.google-stitch/{feature}/)
22
23Generate optimized prompts in **feature-based directories** with organized artifact storage:
24
251. **Feature Name (Directory)**:
26 - Derive from main screen/page purpose
27 - Lowercase, replace whitespace with hyphens
28 - Strip non `a-z0-9-` characters, collapse duplicate hyphens, trim ends
29 - Examples: "analytics dashboard" → `dashboard`, "landing page" → `landing`, "admin panel" → `admin-panel`
30 - Keep semantic and concise (prefer "dashboard" over "analytics-dashboard" when unambiguous)
31
322. **Directory Structure**:
33 - Create feature directory: `.google-stitch/{feature}/`
34 - Pre-create subdirectories:
35 * `exports/` - For Stitch-generated outputs (PNG, SVG, HTML)
36 * `wireframes/` - For pre-work mockups and reference images
37 - Prompt files live at feature root
38
393. **File Composition**:
40 - Start with `<!-- Layout: {Title Case Name} -->` HTML comment label
41 - Add layout prompt content
42 - Add `---` separator line
43 - For each component:
44 * Add `<!-- Component: {Title Case Name} -->` HTML comment label
45 * Add component prompt content
46 * Add `---` separator (between components, not after last)
47
484. **6-Prompt Stitch Limit**:
49 - Count total prompts (layout + all components)
50 - If ≤6 prompts: Save as `prompt-v{version}.md`
51 - If >6 prompts: Split into multiple part files
52 * Part 1: Layout + first 5 components (6 prompts)
53 * Part 2: Next 6 components
54 * Part N: Remaining components (max 6 per part)
55 * Save as: `prompt-v{version}-part{N}.md`
56 * Warn user about Stitch's 6-screen generation limit
57
585. **Version Auto-Increment**:
59 - Scan `.google-stitch/{feature}/prompt-v*.md`
60 - Find highest version number, increment automatically
61 - Start at v1 if no matches
62 - Each feature maintains independent version history
63 - Note: Entire file versioned together (not per-component)
64
656. **File Path Resolution**:
66 - Resolve repo root via `git rev-parse --show-toplevel`
67 - Create `{root}/.google-stitch/{feature}/` directory
68 - Create `{feature}/exports/` and `{feature}/wireframes/` subdirectories
69 - Write composed Markdown file to `{feature}/prompt-v{version}.md`
70
717. **Report**:
72 - After presenting prompts inline, show file info:
73 ```
74 📂 Feature: {feature}/
75 📄 File: prompt-v{version}.md
76
77 Contains {N} prompts (within 6-prompt limit ✓):
78 • Layout: {Title}
79 • Component: {Title}
80 • Component: {Title}
81
82 Directory structure:
83 .google-stitch/{feature}/
84 ├── prompt-v{version}.md ← Generated prompt
85 ├── exports/ ← Place Stitch outputs here
86 └── wireframes/ ← Place mockups/references here
87
88 Usage:
89 1. Copy prompt file → Paste into Stitch → Generate designs
90 2. Save Stitch exports to exports/ directory
91 3. Store wireframes/mockups in wireframes/ directory
92 ```
93
94**Examples:**
95
96Multi-component page (4 prompts):
97```
98Input: "Analytics dashboard with KPI cards, revenue chart, and subscriptions table"
99
100Output: .google-stitch/dashboard/prompt-v1.md
101
102Directory created:
103 .google-stitch/dashboard/
104 ├── prompt-v1.md
105 ├── exports/
106 └── wireframes/
107
108File content:
109 <!-- Layout: Analytics Dashboard -->
110 Design a web dashboard page for SaaS analytics overview.
111 [...layout prompt content...]
112
113 ---
114
115 <!-- Component: KPI Metrics -->
116 Design metric cards displaying key SaaS performance indicators.
117 [...component prompt content...]
118
119 ---
120
121 <!-- Component: Revenue Chart -->
122 Design an interactive line chart for monthly revenue tracking.
123 [...component prompt content...]
124
125 ---
126
127 <!-- Component: Subscriptions Table -->
128 Design a subscription activity table showing recent changes.
129 [...component prompt content...]
130```
131
132Single component (1 prompt):
133```
134Input: "Login form with email and password"
135
136Output: .google-stitch/login/prompt-v1.md
137
138Directory created:
139 .google-stitch/login/
140 ├── prompt-v1.md
141 ├── exports/
142 └── wireframes/
143
144File content:
145 <!-- Component: Login Form -->
146 Design a login form for web application.
147 [...component prompt content...]
148```
149
150Large page split (8 prompts → 2 files):
151```
152Input: "Admin panel with navigation, dashboard, users, roles, settings, audit logs, notifications"
153
154Output: .google-stitch/admin-panel/prompt-v1-part1.md (6 prompts)
155- Layout: Admin Panel
156- Component: Navigation
157- Component: Dashboard
158- Component: Users
159- Component: Roles
160- Component: Settings
161
162Output: .google-stitch/admin-panel/prompt-v1-part2.md (2 prompts)
163- Component: Audit Logs
164- Component: Notifications
165
166Directory created:
167 .google-stitch/admin-panel/
168 ├── prompt-v1-part1.md
169 ├── prompt-v1-part2.md
170 ├── exports/
171 └── wireframes/
172
173⚠️ Warning: Use part1 first, then part2 in separate Stitch session
174```
175
176Iteration (auto-increment):
177```
178Existing: .google-stitch/dashboard/prompt-v1.md
179
180Input: "Update analytics dashboard with new metrics"
181
182Auto-detected version → prompt-v2.md
183
184Output: .google-stitch/dashboard/prompt-v2.md
185
186Directory structure:
187 .google-stitch/dashboard/
188 ├── prompt-v1.md ← Previous version
189 ├── prompt-v2.md ← New version
190 ├── exports/
191 └── wireframes/
192
193(Entire file versioned together, versions coexist in same directory)
194```
195
196**Feature Directory Benefits:**
197- **Organized artifacts**: All design files grouped by feature
198- **Version history**: All versions accessible in one location
199- **Design workflow**: Natural home for Stitch exports and wireframes
200- **Stitch-native**: Uses Stitch's `---` separator convention
201- **Auto-increment**: Detects existing versions, increments automatically
202- **Batch generation**: Copy one file, generate entire page
203- **Copy-paste ready**: File content works directly in Stitch interface
204
205---
206
207## Input Types
208
209**Accepted**
210- Natural-language descriptions (single screen or short flows)
211- Markdown/YAML/JSON specs (`/specs/dashboard.md`)
212- Revision directives ("move KPI cards above chart", "convert to French", "change button to green")
213- References to uploaded wireframes or images
214- Language conversion requests ("switch to Spanish", "German version")
215
216**Input Detail Levels**
217
218All detail levels are valid—Stitch infers patterns from minimal descriptions:
219
220- **High-level** (minimal): "fitness tracker app", "professional project management dashboard"
221- **Medium**: "fitness tracker with daily goals and progress charts"
222- **Detailed**: Full component list with specific features and interactions
223
224Use adjectives to convey vibe when details are sparse ("vibrant fitness app", "minimal meditation app").
225
226---
227
228## Workflow Overview
229
230High-level loop: parse → condense → format → validate.
231Detailed branching logic, including cue extraction and revision handling, lives in [WORKFLOW.md](WORKFLOW.md).
232
233---
234
235## Output Structure
236
237Prompts must follow the Stitch-friendly template:
238- One-sentence description of the app/screen + primary intent.
239- Bullet list (3–6 items) covering layout, components, or flows.
240- Visual style cues (palette, typography, density, tone).
241- Optional behavior/constraint reminders (responsiveness, export format).
242
243Reference [templates/authoring-stitch-prompts-template.md](templates/authoring-stitch-prompts-template.md) for wording patterns.
244
245---
246
247## Examples
248
249Representative 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.
250
251---
252
253## Implementation Notes
254
255* Keep SKILL.md under 500 lines; detailed prompt transformation logic can go in `REFERENCE.md` or `templates/authoring-stitch-prompts-template.md`.
256* Use concise, declarative language.
257* Avoid narrative, meta, or conversational phrasing in outputs.
258* Always output one atomic, Stitch-compatible prompt per request.
259
260---
261
262## Common Issues
263
264- **Prompts too verbose** – Re-run formatting with the template and trim narration. See [TROUBLESHOOTING.md](TROUBLESHOOTING.md)#L1 for guidance.
265- **Missing style cues** – Derive palette/typography keywords from user input or prior session context before finalizing. See [TROUBLESHOOTING.md](TROUBLESHOOTING.md)#L25.
266- **Multi-goal briefs** – Split into multiple prompts; re-emphasize Stitch’s atomic focus. See [TROUBLESHOOTING.md](TROUBLESHOOTING.md)#L43.
267
268---
269
270## Reference Files
271
272For advanced usage:
273
274* [REFERENCE.md](REFERENCE.md) — Overview of Stitch best practices
275* [EXAMPLES.md](EXAMPLES.md) — Sample transformations
276* [WORKFLOW.md](WORKFLOW.md) — Detailed processing loop
277* [TROUBLESHOOTING.md](TROUBLESHOOTING.md) — Error-handling guidance
278* [templates/authoring-stitch-prompts-template.md](templates/authoring-stitch-prompts-template.md) — Output format template
279
280---
281
282## Version History
283
284* v1.0.0 (2025-11-10): Initial release — authoring assistant for Stitch prompt optimization.