Google Stitch Workflow
Use Google Stitch primarily as a design exploration and screen-iteration system.
For greenfield apps, once a screen direction is accepted and exportable code is available in the active environment, use the generated HTML/CSS as the translation base rather than recreating the design from screenshots by hand.
This skill separates three concerns that are often conflated:
- - verified MCP capabilities in the current environment
- browser-only Stitch product features
- optional local workflow conventions that improve traceability
Quick operating rules
If you only remember a few things, remember these:
- - inspect the project and target screen before editing
- work one screen at a time
- keep prompts short, explicit, and preservation-oriented
- review the visual result before the next major step
- move to code only after one direction is clearly accepted
When to use this skill
Use this skill when the task involves one or more of these goals:
- - inspect Stitch projects and screens before making changes
- generate a new screen from a text prompt
- refine an existing generated screen with small, controlled edits
- organize a multi-screen redesign effort without losing revision history
- convert vague design requests into structured prompts
Do not assume the browser UI, the public product marketing, and the MCP surface expose the same operations.
When not to use this skill
Do not use Stitch as the primary path when the real task is:
- - implementing production UI code directly
- making deterministic pixel-perfect edits to an existing coded screen
- redesigning an app without reliable reference screens or screenshots
- planning an entire product in one step without screen-level iteration
- evaluating engineering feasibility without a prior visual direction
Important nuance:
- - for an existing coded app, Stitch is usually best as a design reference and iteration surface
- for a new app with no established implementation, accepted Stitch exports can be the fastest way to seed the first real UI structure
Design principles
- - prefer verified MCP behavior over product-level assumptions
- use Stitch for exploration and iteration, not implementation
- for greenfield work, treat accepted exported code as a translation seed, not as untouchable production code
- keep prompts narrow, explicit, and preservation-oriented
- treat local workflow enhancements as optional conventions
Read only what you need
Operating model
Stitch is most reliable when treated as an iterative design system:
- 1. inspect the current project and target screen
- generate or edit one screen at a time
- review the visual output immediately
- preserve what must stay stable
- move to code only after the screen direction is coherent
Preferred discipline:
- - review screenshots or returned visual artifacts immediately after each generate or edit
- keep one screen as the unit of iteration
- do not ask the user to reason from opaque screen IDs alone when visual confirmation is available
Avoid using Stitch as if it were a deterministic code generator or a full-product planner in a single prompt.
What a good Stitch pass should produce
A successful pass should leave the session with:
- - one clearly identified target project
- one clearly identified canonical screen or small set of candidate screens
- the exact prompt or edit intent that produced the result
- a short judgment on whether the result is accepted, rejected, or needs another small iteration
If those artifacts are missing, slow down and re-establish state before continuing.
Capability boundaries
Verified MCP capabilities
These tools have been validated in live use and are the default safe surface:
- - INLINECODE4
- INLINECODE5
- INLINECODE6
- INLINECODE7
- INLINECODE8
- INLINECODE9
- INLINECODE10
Known weak or unverified areas
Treat these as unstable until revalidated in the active environment:
- - INLINECODE11
- screenshot-driven redesign through MCP
- prototype creation through MCP
- browser-style canvas operations beyond basic project and screen inspection
Browser-only product features
The Stitch web product may expose richer flows such as:
- - image or screenshot redesign
- prototype-oriented workflows
- broader canvas interactions
- newer browser-facing product features
Do not infer that MCP can perform those actions directly.
Parameter discipline
The MCP surface is parameter-sensitive. Incorrect casing or identifier shape can produce generic invalid-argument failures.
deviceType
Use uppercase enum values when explicitly setting a device:
- - INLINECODE13
- INLINECODE14
If uncertain, omit the parameter instead of guessing.
modelId
Use only verified model identifiers for direct MCP calls in the current environment.
Known working values from live testing:
- - INLINECODE16
- INLINECODE17
If a local wrapper maps model names differently, treat that as wrapper-specific behavior, not as a direct MCP guarantee.
selectedScreenIds
For edit_screens, pass bare screen IDs rather than full resource names.
Example:
CODEBLOCK0
Recommended workflows
Workflow A: inspect before editing
Before any edit:
- - inspect the project
- inspect the target screen
- verify whether the screen is actually generated content
Practical heuristic:
- - if
htmlCode exists, the screen is more likely to be safely editable - if the target is only an uploaded image or reference asset, do not assume
edit_screens will behave well
Workflow B: generate first, then refine
For new directions:
- 1. create or choose the right project
- generate a first screen with the minimum safe parameter set
- review output quality
- move to small edits rather than repeating large generation prompts
Default safe starting point:
- - INLINECODE22
- a short, structured prompt
Then add:
- -
deviceType: "MOBILE" or "DESKTOP" if needed - INLINECODE25 only when there is a reason to choose one
Recommended model usage:
- - use
"GEMINI_3_FLASH" for faster exploratory passes - use
"GEMINI_3_PRO" when the direction is already clear and quality matters more than latency
Workflow B2: greenfield app bootstrap from Stitch exports
Use this when the product is new enough that there is no meaningful coded UI to preserve yet.
- 1. generate the canonical screen family in Stitch first
- get explicit acceptance on the direction before broad implementation
- if code or HTML export is available in the active environment, download it
- read the export completely before rewriting anything
- translate the exported structure into the target stack instead of eyeballing screenshots
- keep the layout system, spacing logic, token choices, and section structure where they are sound
- replace hardcoded content and brittle markup gradually, not all at once
- add the real app concerns after translation: data flow, typing, state, accessibility, dark mode, tests
Use this path especially when:
- - the app is being built from scratch
- Stitch generated a strong screen family quickly
- the main value is the concrete composition, hierarchy, and token choices
- recreating the same layout manually would be slower and less faithful
Do not treat the export as production-ready final code. Treat it as a high-fidelity implementation seed.
Workflow C: full-app redesign
For an existing product redesign:
- 1. create a dedicated Stitch project
- define the main screen families
- generate one canonical screen per family
- refine those canonical screens with preservation-first prompts
- only then add alternate states and edge cases
- move to code after the family set is coherent
This is slower than opportunistic one-off generation, but it reduces design drift.
Workflow D: reference-driven redesign
When redesigning a real app:
- - gather reliable reference captures first
- work one screen family at a time
- name the relevant reference images explicitly in the prompt
- treat those references as the source of truth for current structure
Good pattern:
CODEBLOCK1
Workflow E: visual review before further iteration
Use this when the session already has multiple candidate screens or when the
next edit would otherwise be ambiguous.
- 1. use
list_screens to find the likely targets - use
get_screen to inspect candidate screens - when a screenshot or visual artifact is available, review it before the next major edit
- ask the user to choose using a human description of the screen, not only an opaque ID
- continue only after the canonical target is clear
Workflow F: decide whether to stay in Stitch or move to code
Stay in Stitch when:
- - the information architecture is still drifting
- the visual hierarchy is still weak
- multiple screen directions are still being explored
- the user is reacting to screenshots rather than implementation details
Move to code when:
- - one canonical screen direction is accepted
- the required elements are stable
- the remaining work is implementation fidelity rather than design exploration
- the screen can be implemented coherently in the target stack
For greenfield work, prefer this move-to-code order:
- 1. generate mobile and desktop canonical screens separately when both matter
- accept the visual direction
- export or download the generated code artifact when available
- translate that artifact into the real stack
- only then start screen-by-screen product hardening
Optional local workflow enhancements
If you want aliases, execution artifacts, derivation history, or last-active-screen state, use references/local-workflow-conventions.md.
These are useful for traceability, but they are optional and not part of the Stitch MCP contract.
Session discipline
- - inspect before editing
- review the returned screen before issuing another large prompt
- prefer one short generation followed by controlled edits
- stop repeating the same failing payload
- confirm the visually reviewed canonical screen before moving to export or code translation
- move to code only after the screen family is coherent
Failure handling
Request contains an invalid argument.
Check in this order:
- 1.
deviceType casing - INLINECODE33 spelling
- INLINECODE34 shape
- whether the screen is genuinely editable generated output
- whether the prompt is trying to change too much at once
Long-running operations may still complete even when the client appears to
fail. Re-check list_screens, inspect any likely new screens, and avoid blind
re-submission of the same prompt.
Do not brute-force retries with the same payload.
Generation or edit timeout
Long-running operations may time out even when Stitch completes them asynchronously.
Safe reconciliation pattern:
- 1. do not immediately resend the same request
- re-check INLINECODE36
- inspect whether a new screen appeared
- retry only if no result landed
Incomplete or lagging screen lists
INLINECODE37 may lag behind a successful operation.
If the originating call indicated success, re-check before retrying. Do not assume immediate list lag means failure.
Review gate before code translation
Do not port a Stitch output into code until these conditions are true:
- - required elements are still present
- the primary user task is clearer than before
- mobile density and hierarchy are acceptable
- the screen fits the rest of the project direction
- the design can be implemented coherently in the current application architecture
If the answer is not clearly yes, keep iterating in Stitch.
For greenfield translation from exported Stitch code, also check:
- - the exported code represents the accepted direction, not an older candidate
- the layout system is coherent enough to preserve rather than rewrite immediately
- the token layer can be mapped into the target project's theme system
- there is a plan to replace placeholders and hardcoded demo content with real data
- the team will translate deliberately instead of pasting large exports blindly
Naming guidance for larger projects
If the project will contain many screens, use stable ordered titles from the start.
Recommended pattern:
- - INLINECODE38
- INLINECODE39
- INLINECODE40
- INLINECODE41
- INLINECODE42
- INLINECODE43
This improves canvas scanning and reduces later cleanup.
Practical defaults
- - start with the smallest prompt that can produce a useful screen
- prefer one short generation followed by tiny edits
- preserve explicitly during redesign work
- inspect before editing
- treat wrapper enhancements as optional, not as part of the Stitch contract
Not recommended
- - copying browser-product claims into MCP instructions without revalidation
- treating
generate_variants as fully dependable unless the current environment has confirmed it - using design boards or mood boards as substitutes for real app screens in a product redesign
- attempting to redesign a whole app from memory in a single prompt
- moving into implementation code before the design family is coherent
- rebuilding an accepted greenfield Stitch design from screenshots when a usable export already exists
Google Stitch 工作流程
将 Google Stitch 主要用作设计探索和屏幕迭代系统。
对于全新应用,一旦屏幕方向被接受且当前环境中存在可导出的代码,应使用生成的 HTML/CSS 作为翻译基础,而不是手动从屏幕截图重新创建设计。
本技能将三个经常混淆的关注点分离开来:
- - 当前环境中已验证的 MCP 能力
- 仅限浏览器的 Stitch 产品功能
- 可选的本地工作流程约定(用于提高可追溯性)
快速操作规则
如果你只记住几件事,请记住这些:
- - 在编辑前检查项目和目标屏幕
- 一次只处理一个屏幕
- 保持提示简短、明确且以保留为导向
- 在下一个主要步骤之前审查视觉结果
- 只有在某个方向被明确接受后才转向代码
何时使用本技能
当任务涉及以下一个或多个目标时使用本技能:
- - 在修改前检查 Stitch 项目和屏幕
- 从文本提示生成新屏幕
- 通过小而可控的编辑优化现有生成的屏幕
- 组织多屏幕重新设计工作而不丢失修订历史
- 将模糊的设计请求转换为结构化提示
不要假设浏览器 UI、公开产品营销和 MCP 表面暴露相同的操作。
何时不使用本技能
当实际任务是以下情况时,不要将 Stitch 作为主要路径:
- - 直接实现生产 UI 代码
- 对现有编码屏幕进行确定性的像素级完美编辑
- 在没有可靠参考屏幕或截图的情况下重新设计应用
- 一步规划整个产品而不进行屏幕级迭代
- 在没有事先视觉方向的情况下评估工程可行性
重要细微差别:
- - 对于现有的编码应用,Stitch 通常最适合作为设计参考和迭代表面
- 对于没有既定实现的新应用,被接受的 Stitch 导出可以是播种第一个真实 UI 结构的最快方式
设计原则
- - 优先使用已验证的 MCP 行为而非产品级假设
- 将 Stitch 用于探索和迭代,而非实现
- 对于全新工作,将接受的导出代码视为翻译种子,而非不可触碰的生产代码
- 保持提示狭窄、明确且以保留为导向
- 将本地工作流程增强视为可选约定
只读你需要的
操作模型
当 Stitch 被视为迭代设计系统时最为可靠:
- 1. 检查当前项目和目标屏幕
- 一次生成或编辑一个屏幕
- 立即审查视觉输出
- 保留必须保持稳定的内容
- 只有在屏幕方向一致后才转向代码
推荐纪律:
- - 在每次生成或编辑后立即审查截图或返回的视觉工件
- 将一个屏幕作为迭代单位
- 在可以获得视觉确认时,不要要求用户仅从不透明的屏幕 ID 进行推理
避免将 Stitch 当作确定性代码生成器或单次提示中的完整产品规划器来使用。
一次好的 Stitch 操作应产生的结果
一次成功的操作应在会话中留下:
- - 一个明确标识的目标项目
- 一个明确标识的规范屏幕或一小套候选屏幕
- 产生结果的精确提示或编辑意图
- 关于结果是接受、拒绝还是需要另一次小迭代的简短判断
如果缺少这些工件,请放慢速度并在继续之前重新建立状态。
能力边界
已验证的 MCP 能力
这些工具已在实际使用中得到验证,是默认的安全表面:
- - listprojects
- getproject
- listscreens
- getscreen
- createproject
- generatescreenfromtext
- edit_screens
已知薄弱或未验证的领域
在活动环境中重新验证之前,将这些视为不稳定:
- - generate_variants
- 通过 MCP 进行截图驱动的重新设计
- 通过 MCP 创建原型
- 超出基本项目和屏幕检查的浏览器风格画布操作
仅限浏览器的产品功能
Stitch 网页产品可能暴露更丰富的工作流程,例如:
- - 图像或截图重新设计
- 面向原型的工作流程
- 更广泛的画布交互
- 较新的面向浏览器的产品功能
不要推断 MCP 可以直接执行这些操作。
参数规范
MCP 表面是参数敏感的。错误的大小写或标识符形状可能产生通用的无效参数失败。
deviceType
在明确设置设备时使用大写枚举值:
如果不确定,省略参数而不是猜测。
modelId
在当前环境中直接调用 MCP 时,仅使用已验证的模型标识符。
来自实际测试的已知工作值:
如果本地包装器以不同方式映射模型名称,将其视为包装器特定行为,而非直接的 MCP 保证。
selectedScreenIds
对于 edit_screens,传递裸屏幕 ID 而非完整资源名称。
示例:
json
{
projectId: 15190935684505273965,
selectedScreenIds: [69b3228b6c5f4b9f9efceea4b6a30168],
deviceType: MOBILE,
prompt: 使主按钮颜色更深,并在其下方添加一个小的辅助文本链接。
}
推荐工作流程
工作流程 A:编辑前检查
在任何编辑之前:
- - 检查项目
- 检查目标屏幕
- 验证屏幕是否确实是生成的内容
实用启发式方法:
- - 如果存在 htmlCode,屏幕更可能是安全可编辑的
- 如果目标只是上传的图像或参考资产,不要假设 edit_screens 会表现良好
工作流程 B:先生成,后优化
对于新方向:
- 1. 创建或选择正确的项目
- 使用最小安全参数集生成第一个屏幕
- 审查输出质量
- 转向小编辑而不是重复大型生成提示
默认安全起点:
然后添加:
- - 如果需要,deviceType: MOBILE 或 DESKTOP
- 仅在需要选择时有理由时才添加 modelId
推荐模型使用:
- - 使用 GEMINI3FLASH 进行更快的探索性操作
- 当方向已经明确且质量比延迟更重要时,使用 GEMINI3PRO
工作流程 B2:从 Stitch 导出引导全新应用
当产品足够新且尚无有意义的编码 UI 需要保留时使用此流程。
- 1. 首先在 Stitch 中生成规范屏幕系列
- 在广泛实现之前获得对方向的明确接受
- 如果活动环境中可用代码或 HTML 导出,则下载它
- 在重写任何内容之前完整阅读导出内容
- 将导出的结构翻译到目标技术栈,而不是目测截图
- 保留布局系统、间距逻辑、标记选择和章节结构(在合理的情况下)
- 逐步替换硬编码内容和脆弱标记,而不是一次性全部替换
- 在翻译后添加真实应用关注点:数据流、类型、状态、可访问性、暗色模式、测试
特别在以下情况下使用此路径:
- - 应用是从头开始构建的
- Stitch 快速生成了一个强大的屏幕系列
- 主要价值在于具体的构成、层次结构和标记选择
- 手动重新创建相同布局会更慢且保真度更低
不要将导出视为生产就绪的最终代码。将其视为高保真实现种子。
工作流程 C:完整应用重新设计
对于现有产品的重新设计:
- 1. 创建一个专用的 Stitch 项目
- 定义主要屏幕系列
- 为每个系列生成一个规范屏幕
- 使用保留优先的提示优化这些规范屏幕
- 只有在那之后才添加备选状态和边缘情况
- 在系列集一致后转向代码
这比机会性的一次性生成慢,但减少了设计漂移。
工作流程 D:参考驱动的重新设计
当重新设计真实应用时:
- - 首先收集可靠的参考捕获
- 一次处理一个屏幕系列
- 在提示中明确命名相关参考图像
- 将这些参考视为当前结构的真实来源
良好模式:
text
使用此项目中上传的真实应用参考。
相关图像命名为 todaytop.png、todaydayactions.png 和 todaymeals_mid.png。
这些图像显示当前存在的内容。
保留真实结构,仅改进层次结构、间距和润色。
不要发明新的部分。
工作流程 E