CtrlK
BlogDocsLog inGet started
Tessl Logo
SkillPublic

common-stitch-design

Drive Google Stitch over MCP safely - read screens, write and lint DESIGN.md, create design systems, and fix designs through variants instead of overwriting. Use when reviewing, editing, or generating Stitch screens or DESIGN.md files.

Quality

89%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide
SecuritybySnyk

Low

Low-risk findings worth noting

SKILL.md
Quality
Evals
Security

Stitch Design

Priority: P1 (HIGH)

Preflight

  • Stitch tools (list_projects, list_screens, get_screen) must be in the tool list. Missing → BLOCKED (stitch-mcp).
  • Endpoint https://stitch.googleapis.com/mcp, header X-Goog-Api-Key. Config added mid-session loads only after restart. Setup: Stitch MCP.

Read

  • list_screens, then group by title: many versions share one title. Confirm the current one with the author; default most recent.
  • Before opening an image, fetch it to disk without attaching it to the model; verify decoded width and height and create a proportional preview with a longest edge <=1600 px. This is a conservative workflow budget, not a guaranteed model limit. =w390/=w1280 is optional optimization, not a size guarantee. Preserve originals; use the bounded review procedure in Stitch MCP.
  • Read SVG source as text first. Bound raster output and both browser screenshot dimensions before image ingestion; never request fullPage. Account for physical pixels (CSS pixels × devicePixelRatio); review tall pages with an overview and separate viewport captures.
  • A rejected image in a generation/edit response does not prove the backend write failed. Recover IDs, metadata, and completed screens before any retry. If documented tool behavior can embed an oversized image and no host-supported resize/text-only route exists, stop before the write call.
  • If a retained conversation image blocks work, query advertised commands and follow OMP image recovery; preserve source screenshots before /shake images.
  • Run node scripts/audit_html.js <dir>. Audit output is evidence; screenshots confirm visual judgement.

Human Direction

  • Anchor generation, review, and edits in human direction: audience, task, concrete character, and keep / change / avoid boundaries. See Human Direction.
  • Existing designs default to polish (preserves IA, major composition, navigation, content, behavior; permits local spacing, wrapping, sizing). restyle is visual-only (tokens, styling) preserving structure/behavior without freezing pixel positions. rethink alters layout/flows only on explicit human choice.
  • New designs require human direction (not an absent baseline); references guide borrow vs avoid (optional when unneeded).
  • Human approval is mandatory before material creative changes. Branch to justified no-change BEFORE creating design systems or variants when the original satisfies direction. Human taste may prefer original or variant without objective proof; record as preference, not measured quality.
  • Critique follows observation -> impact -> smallest change -> preservation. Classify findings as defects, context concerns, or taste. Review checks regressions and preservation via observed proof, never automatic score winning.
  • Stitch is the sole generator; respect documented tool capabilities without invented settings (mode != creativeRange).

Write Safely

  • Never overwrite originals. Fix through generate_variants (default creativeRange: REFINE, variantCount: 1; use EXPLORE only for approved rethink or device adaptation per Prompting) or a new design system.
  • Explicit approval before delete_project, update_design_system on an existing asset, or apply_design_system to original screens.
  • New design system: create_design_system with theme.designMd, then update_design_system on that new asset.
  • apply_design_system takes screen instance ids from get_project, not screen ids.
  • Generation takes minutes. On timeout do not retry; poll get_screen every 30 s, max 10.
  • Variant output includes illustration image screens with null deviceType: skip them. Check device class on the screenshot; a TABLET request can return DESKTOP.

DESIGN.md

  • Google design.md format. npx @google/design.md lint DESIGN.md must report 0 errors and 0 warnings before upload.
  • Every component backgroundColor/textColor pair must pass contrast. Rules: DESIGN.md.

Prompting

  • Generation prompts: layout and content only; appearance lives in DESIGN.md. Edit and variant prompts may carry hex values.
  • Structure prompts with explicit keep / change / avoid. One shared fix block plus per-screen specifics; re-audit after each pass; max 2 edit_screens passes on variants only. See Prompting.

Anti-Patterns

  • No in-place fixes: editing originals destroys the baseline.
  • No trusting labels: titles and device labels drift; check screenshots.
  • No unlinted DESIGN.md: one bad colour pair ships to every screen.
  • No unapproved creative leaps: rethink or restyle without human mandate violates preservation.
  • No invented tool settings: refinement modes are orchestration contracts, not MCP arguments.
Repository

HoangNguyen0403/agent-skills-standard

Path

.agents/skills/common/common-stitch-design/SKILL.md

Last updated
First committed

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.