Skills Prompts Hues

Popular categories

Agent skill · Stitch Skills

/stitch-loop Build a multi-page site with an autonomous Stitch loop

stitch-loop sets up a repeatable cycle in which each agent run builds one page. A baton file names the next page and carries its prompt; the agent generates it in Stitch, moves the HTML into the site, wires navigation, updates the sitemap and writes the next baton. It can run under CI, agent chains or manual review.

Works with

  • Codex
  • Claude Code
  • Cursor
  • Any Agent Skills host
  • OpenCode

When to use it

  • You want a multi-page marketing or portfolio site generated in consistent style.
  • You want an agent to keep extending a site from a roadmap across many runs.
  • You want each page checked against its Stitch screenshot in a browser.

How it works

  1. 1
    Read the baton

    The agent parses .stitch/next-prompt.md for the page name and prompt, which must include the design-system block from DESIGN.md.

  2. 2
    Consult context

    It reads SITE.md for the project ID, existing pages, roadmap and ideas, and refuses to recreate pages already built.

  3. 3
    Generate and download

    It generates the screen in Stitch, records IDs in metadata.json and downloads full-resolution HTML and screenshots, asking before overwriting local files.

  4. 4
    Integrate and verify

    It moves the page into site/public, fixes asset paths, wires placeholder links and, if Chrome DevTools MCP is present, compares a screenshot.

  5. 5
    Pass the baton

    It marks the page in the sitemap, updates the roadmap and writes the next page's prompt so the loop continues.

What it steers the agent away from

  • Rebuilding a page that is already in the sitemap
  • Leaving href="#" placeholder links unwired
  • Ending a run without writing the next baton

Install this skill

It installs with the Stitch Skills pack.

CodexAdds the marketplace; then install stitch-design, stitch-build and stitch-utilities as needed. The sparse flags are optional.
codex plugin marketplace add google-labs-code/stitch-skills --ref main \
--sparse .agents/plugins \
--sparse plugins/stitch-design \
--sparse plugins/stitch-build \
--sparse plugins/stitch-utilities
Claude CodeInstalls the plugin suite into the current project.
npx plugins add google-labs-code/stitch-skills --scope project --target claude-code
CursorInstalls the plugin suite into the current workspace.
npx plugins add google-labs-code/stitch-skills --scope workspace --target cursor
Any Agent Skills host (selective)Lets you pick individual skills; include the ones they depend on.
npx skills add google-labs-code/stitch-skills
OpenCodeCopy each skill folder by hand and add the Stitch MCP server as a remote entry in opencode.json; skills named stitch::… need renaming to kebab-case.
mkdir -p .opencode/skills
cp -R plugins/stitch-design/skills/generate-design .opencode/skills/generate-design

Commands come from the author’s README; check it for changes before you run them.

Questions

What files must exist before the first run?

A .stitch/DESIGN.md, which the design-md skill can create, and a .stitch/SITE.md describing the vision and roadmap, which site-md can draft.

What triggers the next iteration?

The skill does not care: a CI job watching the baton file, a person rerunning the agent, or one agent dispatching another all work.

More guides from Stitch Skills

Also in this pack

All 16 skills →

Summary by trendhub. The skill itself lives in google-labs-code/stitch-skills/plugins/stitch-utilities/skills/stitch-loop by Google Labs Code (Apache-2.0); read the full, current text there.