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