Self-Improving Agent
一个面向 Automation 场景的 Agent 技能。原始说明:Captures learnings, errors, and corrections to enable continuous improvement. Use when: (1) A command or operation fails unexpectedly, (2) User corrects Clau...
一个面向 Automation 场景的 Agent 技能。原始说明:Use when working with Google Stitch through a disciplined MCP-first workflow. Prefer this skill for project inspection, controlled screen generation and edit...
name: google-stitch-workflow
version: 1.8.0
description: Use when working with Google Stitch through a disciplined MCP-first workflow. Prefer this skill for project inspection, controlled screen generation and editing, prompt structuring, and failure recovery.
Use Google Stitch as a controlled design exploration and screen-iteration surface, not as a blind code generator.
The normal loop is:
For full details, edge cases, and expanded recipes, read references/complete-operator-manual.md as an index and load only the focused reference needed for the task.
Use this skill when the task involves:
Do not use Stitch as the primary path when the real task is:
Run a capability-first check before the first generation or edit.
Critical: do not use generic MCP schema discovery as the reliability test for Stitch. Some Stitch MCP environments return schema discovery errors even when direct tool calls work.
Use your agent runtime's direct MCP call mechanism instead:
# Mavis / MiniMax Agent example
mavis mcp call stitch list_projects '{}'
# mcporter-style example
mcporter call stitch.list_projects '{}'
For other agents, call the equivalent stitch.list_projects tool directly. If list_projects succeeds, Stitch is operational.
Then probe optional tracking tools with the same runtime adapter:
generation_status with {"operation": "last"}list_generations with {"projectId": "<project-id>"}If the optional tracking calls fail with "tool not found", record that this environment uses list_screens polling only.
Only enter setup mode when Stitch is not configured or the user explicitly asks for setup help. Some wrappers auto-detect project IDs; still confirm the active project before editing or generating.
Expected baseline tools:
list_projectsget_projectlist_screensget_screencreate_projectgenerate_screen_from_textedit_screensOptional tools:
list_design_systemscreate_design_systemupdate_design_systemapply_design_systemgenerate_variantsgeneration_statuslist_generationsfetch_screen_imagefetch_screen_codeget_screen_imageget_screen_codebuild_siteIf baseline tools are missing, stop and fix environment state first. If optional tools are missing, continue with the baseline workflow.
This skill is agent-neutral. It requires access to a configured Stitch MCP server, not a specific agent runtime.
Use whichever adapter is available:
mavis mcp call stitch <tool> '<json>'mcporter call stitch.<tool> '<json>'Do not make mavis, mcporter, stitch-mcp-auto, or wrapper image/code helpers a hard requirement unless the local environment or user explicitly chooses that path.
edit_screens to create a revised screen instead of mutating the original.Read references/prompt-structuring.md when the prompt is vague, too long, or producing generic results.
Stitch payloads are parameter-sensitive.
deviceType: use uppercase "MOBILE" or "DESKTOP" for generation. For edit_screens, omit deviceType entirely unless the active schema proves otherwise.selectedScreenIds: use bare screen IDs as an array, not full resource names.modelId: use only identifiers exposed by the active MCP schema.Example edit payload:
{
"projectId": "8675077932533356979",
"selectedScreenIds": ["69b3228b6c5f4b9f9efceea4b6a30168"],
"prompt": "Make the primary button darker. Keep everything else identical."
}
The HTTP timeout is not the same as generation failure. Stitch may drop the connection while the server-side generation continues.
After a generate_screen_from_text timeout:
list_screens with the project ID.Prefer mobile-first generation when possible. Desktop generations can take significantly longer and may need browser-side fallback after repeated MCP failures.
For the complete failure matrix, read references/sections/mcp-api-and-failure-recovery.md.
Never accept a Stitch result based only on text status. Inspect the actual visual output.
Before asking for approval or moving to code, check:
Read references/visual-review-and-artifacts.md for screenshot handling, traceability, and review artifacts.
Fetch code or export artifacts only after a visual direction is accepted.
Choose the transfer strategy from the real target stack:
Before calling implementation complete, verify parity:
Read references/local-workflow-conventions.md for optional artifact naming and traceability conventions.
Use these as the default recipes:
For expanded recipes, read references/sections/workflow-recipes.md.
references/complete-operator-manual.md: index for the full v1.7 operator manualreferences/sections/core-operating-model.md: startup, runtime adapters, approval gates, and core operating modelreferences/sections/mcp-api-and-failure-recovery.md: MCP boundaries, parameter discipline, timeouts, and recoveryreferences/sections/export-and-code-translation.md: export, Fidelity Pack, parity, and implementation handoffreferences/prompt-structuring.md: prompt shaping and repair patternsreferences/redesign-prompt-patterns.md: redesign-specific prompt recipesreferences/visual-review-and-artifacts.md: screenshot review and artifact handoffreferences/local-workflow-conventions.md: optional local aliases, artifact paths, and history conventions