agentleFS
DannykkhDannykkh/skill-olympus/skills/stitch/SKILL.md

stitch

Skill9 starsChanged 3 months agoMITView on GitHub

Operate Google Stitch through an already configured Stitch MCP server. Use when the user explicitly mentions Stitch or asks to generate, edit, vary, import, export, synchronize, or convert Stitch screens; manage a Stitch design system; run a resumable multi-page Stitch loop; or turn Stitch screens into React. Do not trigger for generic UI design requests that do not require Stitch.

  • Reads credentials

11 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use bold, cafe and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • bergsideSkill

    bold

    Strong visual presence with heavyweight typography, high-contrast colors, and commanding layouts.

    Also in 4 projects that use this

  • bergsideSkill

    cafe

    Cozy cafe-inspired interface with warm tones, soft typography, and clean layouts for a relaxed browsing experience.

    Also in 4 projects that use this

  • +10 more from bergside

The file

Show its rules and text

We split this skill into the rules it gives an agent

28 rules. 0 are common, 17 are distinctive, and 11 are very specific to this project.

  • 0

    Common

    Most of the 11 edited versions we read keep these.

  • 17

    Distinctive

    This author's own choices. Worth a look.

  • 11

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Distinctive:

    Treat Stitch as a design execution backend.

    line 8
  2. Distinctive:

    Use standalone Stitch mode only when the user explicitly wants direct Stitch work without Aphrodite.

    line 15
  3. Very specific:

    Never invent a visual direction inside this skill when DESIGN.md or docs/design-refs/ exists.

    line 17
  4. Distinctive:

    Stop and report the missing dependency if no Stitch MCP tools are available.

    line 22
  5. Distinctive:

    Read references/mcp-contract.md completely before any Stitch MCP call.

    line 23
  6. Very specific:

    Read the project root DESIGN.md and relevant docs/design-refs/ artifacts before generating or editing a screen.

    line 24
  7. Very specific:

    Check .stitch/metadata.json before remote lookup.

    line 25
  8. Distinctive:

    Read-only: list/get projects, retrieve screens, download artifacts, compare state.

    line 34
  9. Very specific:

    Treat the user's explicit request to create/edit/vary as authorization for that scoped remote mutation.

    line 37
  10. Distinctive:

    When the full-install compatibility aliases are active, preserve these mappings:

    line 60
  11. Distinctive:

    If the request is ambiguous, infer the least-mutating route from the available artifacts.

    line 65
  12. Distinctive:

    Use this order when artifacts disagree:

    line 69
  13. Very specific:

    Use .stitch/DESIGN.md only as a synchronized transport copy of root DESIGN.md.

    line 77
  14. Distinctive:

    Create variants for exploration around a good base.

    line 86
  15. Distinctive:

    Avoid rerolling a screen whose structure is already correct.

    line 87
  16. Very specific:

    Update .stitch/metadata.json only from observed remote state, then run the state validator.

    line 92
  17. Distinctive:

    Run code-level and visual verification required by the selected route.

    line 93
  18. Very specific:

    Never assume legacy tools such as get_screen_html, get_screen_metadata, or download_screen_asset exist.

    line 98
  19. Distinctive:

    Never repeat colors, fonts, and theme instructions in every generation prompt when a project-level Stitch design system is applied.

    line 99
  20. Very specific:

    Never send position or dimension fields to apply_design_system.

    line 100
  21. Very specific:

    Never expose an API key in a prompt, command transcript, committed file, or report.

    line 101
  22. Very specific:

    Never overwrite an existing root DESIGN.md, staged screen, or application file without first comparing the old and new state.

    line 102
  23. Distinctive:

    Never keep an autonomous loop alive by inventing unnecessary pages.

    line 103
  24. Distinctive:

    Never impose a new React architecture merely because Stitch emitted static HTML.

    line 104
  25. Distinctive:

    Never declare visual fidelity from HTML inspection alone.

    line 105
  26. Distinctive:

    Use the bundled scripts instead of re-emitting binary/base64 payloads or writing ad hoc state checks:

    line 109
  27. Very specific:

    Read references/import-export.md before using the uploader.

    line 124
  28. Distinctive:

    Do not report completion until all applicable evidence exists:

    line 128

“Common” is measured: kept by at least 6 in 10 of the 11 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Stitch

Treat Stitch as a design execution backend. Keep product structure, visual direction, and design policy in Aphrodite; use this skill to translate those decisions into Stitch operations and code artifacts.

Boundary

  • Let design-plan (/aphrodite) own discovery, IA, layout blueprints, and the root DESIGN.md.
  • Let Stitch own remote project/screen operations and .stitch/ runtime state.
  • Let the existing application architecture own routing, state, data, and component conventions.
  • Use standalone Stitch mode only when the user explicitly wants direct Stitch work without Aphrodite.

Never invent a visual direction inside this skill when DESIGN.md or docs/design-refs/ exists. Compile those artifacts into Stitch inputs.

Preflight

  1. Inspect the available tools and identify the Stitch MCP namespace by capability, not by a hard-coded prefix.
  2. Stop and report the missing dependency if no Stitch MCP tools are available. Never fabricate project IDs, screen IDs, URLs, or tool results.
  3. Read references/mcp-contract.md completely before any Stitch MCP call.
  4. Read the project root DESIGN.md and relevant docs/design-refs/ artifacts before generating or editing a screen.
  5. Check .stitch/metadata.json before remote lookup. Validate it with:
python <STITCH_SKILL_DIR>/scripts/validate_stitch_state.py .stitch/metadata.json

Resolve <STITCH_SKILL_DIR> to the directory containing this SKILL.md; do not assume the skill is installed inside the target project.

  1. Classify the action:
    • Read-only: list/get projects, retrieve screens, download artifacts, compare state.
    • Remote mutation: create/edit/vary/apply a design system.
    • Sensitive upload: send a local image, HTML file, or DESIGN.md to Stitch.
  2. Treat the user's explicit request to create/edit/vary as authorization for that scoped remote mutation. Before a sensitive upload, still show the exact project, files, types, and sizes and obtain confirmation.

Route the Request

The first column is a semantic route key. In the default source-only install, a parent harness or the current LLM selects the route after reading this file; it does not issue a slash command. The /stitch ... text in parentheses is only a compatibility alias when source-only skills were explicitly activated with --include-source-only-skills.

Route key (full-install compatibility alias)RouteRequired reference
generate (/stitch generate)Generate a screen from text or an uploaded imagegenerate-and-design-system.md
edit (/stitch edit)Modify selected existing screensgenerate-and-design-system.md
variants (/stitch variants)Produce controlled alternatives from a selected screengenerate-and-design-system.md
design-system pull (/stitch design-system pull)Reverse-extract remote visual language into a proposed DESIGN.md updategenerate-and-design-system.md
design-system push (/stitch design-system push)Synchronize the root DESIGN.md into Stitchgenerate-and-design-system.md
design-system apply (/stitch design-system apply)Apply a Stitch design-system asset to selected screensgenerate-and-design-system.md
loop (/stitch loop)Generate a resumable multi-page setloop-state.md
react (/stitch react)Convert or synchronize Stitch screens with a React appreact-handoff.md
import (/stitch import)Capture local UI and upload it into Stitchimport-export.md
sync (/stitch sync)Refresh remote metadata and local staged artifactsloop-state.md
status (/stitch status)Compare local runtime state with the remote projectloop-state.md

When the full-install compatibility aliases are active, preserve these mappings:

  • /stitch design means /stitch design-system pull.
  • /stitch prompt means compile an Aphrodite brief into the generate route without calling Stitch unless generation was requested.

If the request is ambiguous, infer the least-mutating route from the available artifacts. Ask only when two routes would materially change different remote state.

Artifact Authority

Use this order when artifacts disagree:

  1. Root DESIGN.md: design-system source of truth.
  2. Latest docs/design-refs/ brief, sitemap, direction, and layout blueprint: page structure and content contract.
  3. Existing application code: functional and architectural contract.
  4. .stitch/ files: transport, cache, and resumable execution state.
  5. Remote Stitch screen: generated implementation candidate.

Use .stitch/DESIGN.md only as a synchronized transport copy of root DESIGN.md. Do not let it become a second independently edited design system. See references/loop-state.md for the full artifact contract.

Core Execution Protocol

  1. Retrieve the current project and selected screens before mutation.
  2. Resolve the intended device type, target screen instances, and design-system asset.
  3. Compile only the requested change:
    • Generate for a new structure.
    • Edit for a localized change.
    • Create variants for exploration around a good base.
    • Avoid rerolling a screen whose structure is already correct.
  4. Perform the smallest sufficient Stitch operation.
  5. Retrieve the resulting project and screen metadata again; do not trust a mutation response alone.
  6. Download the resulting HTML and full-width screenshot into .stitch/designs/ without overwriting existing files unless refresh was requested.
  7. View the screenshot and compare it with DESIGN.md, the layout blueprint, and the requested delta.
  8. Update .stitch/metadata.json only from observed remote state, then run the state validator.
  9. Run code-level and visual verification required by the selected route.
  10. Report project ID, affected screen IDs, local artifacts, verification evidence, and any residual drift.

Non-Negotiable Rules

  • Never assume legacy tools such as get_screen_html, get_screen_metadata, or download_screen_asset exist. Discover the live contract and prefer get_screen download URLs when available.
  • Never repeat colors, fonts, and theme instructions in every generation prompt when a project-level Stitch design system is applied. This creates two competing theme sources.
  • Never send position or dimension fields to apply_design_system; pass only id and sourceScreen for real screen instances.
  • Never expose an API key in a prompt, command transcript, committed file, or report. Use the STITCH_API_KEY environment variable for direct uploads.
  • Never overwrite an existing root DESIGN.md, staged screen, or application file without first comparing the old and new state.
  • Never keep an autonomous loop alive by inventing unnecessary pages. Finish when the declared roadmap is complete.
  • Never impose a new React architecture merely because Stitch emitted static HTML. Adapt to the repository's stack and conventions.
  • Never declare visual fidelity from HTML inspection alone. Inspect the downloaded screenshot or a rendered local page.

Deterministic Helpers

Use the bundled scripts instead of re-emitting binary/base64 payloads or writing ad hoc state checks:

# Validate resumable state
python <STITCH_SKILL_DIR>/scripts/validate_stitch_state.py .stitch/metadata.json

# Download a screen artifact without accidental overwrite
python <STITCH_SKILL_DIR>/scripts/fetch_stitch_asset.py \
  --url "<download-url>" --output .stitch/designs/home.html

# Preview an upload without network mutation
python <STITCH_SKILL_DIR>/scripts/upload_to_stitch.py \
  --project-id "<project-id>" --file DESIGN.md --dry-run

Read references/import-export.md before using the uploader. An actual upload requires STITCH_API_KEY and --confirm-upload after user confirmation.

Completion Evidence

Do not report completion until all applicable evidence exists:

  • Stitch MCP capability and target project confirmed.
  • Resulting screen or design-system IDs retrieved after mutation.
  • .stitch/metadata.json updated and validator passed.
  • Generated screenshot visually inspected.
  • React route: typecheck/lint and rendered comparison completed when the project supports them.
  • Loop route: sitemap and baton agree; baton is explicitly complete when no declared page remains.

Provenance

This local adapter selectively incorporates operational patterns from google-labs-code/stitch-skills as reviewed at commit 535b0889a46868c9b08f8a7f7084db3c1958a2b6 on 2026-08-09. The upstream project is a useful implementation reference, not the local design-policy authority and not an officially supported Google product.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.