stitch-loop
by google-labs-codestitch-loop is a workflow automation skill for building pages with Stitch in an iterative baton-passing loop. It helps agents read .stitch/next-prompt.md, generate the next page, integrate it into the site, and prepare the next handoff with less guesswork.
This skill scores 78/100, which means it is a solid listing candidate for directory users who want an agentic Stitch website-building loop instead of a generic prompt. The repository shows a real, repeatable workflow: read a baton file, generate a page with Stitch MCP tools, integrate it, and write the next prompt. That is enough operational substance to justify installation, though users should still expect some setup overhead around Stitch MCP, DESIGN.md, and SITE.md.
- Explicit autonomous loop pattern with baton-file triggering (`.stitch/next-prompt.md`) and step-by-step iteration flow.
- Good operational scaffolding: required prerequisites, baton schema, example prompts, and templates for SITE.md/DESIGN.md.
- Agent leverage is clear: designed for repeated site generation, integration, and handoff to the next iteration rather than one-off page writing.
- Requires external setup and dependencies (Stitch MCP Server, DESIGN.md, SITE.md), so it is not turnkey.
- Some content is still template-driven and example-based, so users need to adapt the workflow to their own project conventions.
Overview of stitch-loop skill
stitch-loop is a workflow automation skill for building pages with Stitch in an iterative baton-passing loop. It is best for agents or builders who want a repeatable way to create a page, merge it into a site, and leave the next task ready for the following pass. The stitch-loop skill matters most when you need continuity: one prompt should not just make a page, it should keep the site-building process moving.
What stitch-loop is for
Use stitch-loop when the job is “keep producing the next good page” rather than “answer one isolated design request.” It helps with structured site assembly, where next-prompt.md, SITE.md, and DESIGN.md act as operating context instead of forcing the model to rediscover the project each time.
Why it is different from a normal prompt
A plain prompt can generate a page once. stitch-loop adds a looped execution pattern with a baton file, so the next iteration has a clear handoff. That makes it more useful for multi-page site work, agent chains, and other workflow automation setups where state needs to survive across runs.
Best-fit users and projects
This skill fits users who already have, or are willing to maintain, a Stitch project plus project memory files. It is a stronger fit for site builders, automation pipelines, and agent operators than for casual one-off page generation. If you only need a single landing page and no follow-up iteration, stitch-loop is probably more structure than you need.
How to Use stitch-loop skill
Install the skill first
Use the repository’s install command from the README: npx skills add google-labs-code/stitch-skills --skill stitch-loop --global. The stitch-loop install step is only useful if your environment can also access the Stitch MCP server and the other allowed tools listed in SKILL.md.
Prepare the files stitch-loop expects
Before triggering the loop, make sure these inputs exist and are current:
.stitch/DESIGN.mdwith the design system details the skill should follow.stitch/SITE.mdwith site vision, roadmap, and current sitemap.stitch/next-prompt.mdwith one concrete page task
For a strong stitch-loop usage request, do not say only “make the next page.” Include the page name, mood, audience, and required sections. The baton file should read like a real page brief, not a vague idea.
A good prompt shape for the loop
A practical prompt is: “Read .stitch/next-prompt.md, generate the page in Stitch, integrate it into the site, verify it visually if Chrome DevTools is available, then write the next baton task.” That tells the skill what to consume, what to produce, and how to continue.
Read these files before you adapt it
Start with SKILL.md, then README.md, resources/baton-schema.md, resources/site-template.md, and the example files in examples/. The schema file is especially useful because it shows the baton contract; the templates help you avoid drifting from the expected site-memory format. If you are adopting stitch-loop for Workflow Automation, these files tell you where the loop can break.
stitch-loop skill FAQ
Is stitch-loop only for fully autonomous agents?
No. You can use stitch-loop in semi-automated workflows too, where a human reviews each iteration before the next baton is written. The skill is still useful because it standardizes the handoff format and reduces re-briefing.
Do I need Stitch already set up?
Yes, that is the practical boundary. stitch-loop assumes access to Stitch MCP tools and a Stitch project. Without that infrastructure, the skill’s main workflow cannot run as intended.
Is this better than just prompting Stitch directly?
Usually yes for repeated site work. A direct prompt is fine for a one-off screen, but stitch-loop is better when you need a durable process, consistent context, and a predictable next step for the next run. The tradeoff is that you must maintain the baton and project-memory files.
Is stitch-loop beginner-friendly?
It is beginner-friendly only if the user can handle lightweight project files and understands that the skill depends on a site context. Beginners can use it, but they should expect to read the example baton and the template files first rather than relying on the skill to infer everything automatically.
How to Improve stitch-loop skill
Give the baton fewer unknowns
The fastest way to improve stitch-loop results is to make .stitch/next-prompt.md specific. Strong inputs name the page, state the purpose, identify the audience, and list the required page structure. Weak inputs force the agent to invent too much and increase the chance of mismatched output.
Keep design and content constraints explicit
The skill performs best when DESIGN.md and SITE.md clearly state voice, layout, and sitemap priorities. If your prompt says “match the existing site” but the site file does not describe the site, output quality will drop. For stitch-loop guide quality, prefer concrete constraints like “desktop-first,” “centered container,” or “navigation includes About, Shop, Contact.”
Watch for loop-breaking failure modes
Common problems are stale site memory, missing baton frontmatter, vague next-page descriptions, or ignoring the design system block. Another frequent issue is asking for a page that already exists in the sitemap, which reduces the value of the iteration. Review resources/baton-schema.md when the loop stops behaving predictably.
Iterate after the first page
After one page is generated, improve the next pass by updating the roadmap and tightening the baton prompt with what the first output revealed. If the page came back too generic, add stronger content requirements. If the layout drifted, make the design language more explicit. That is where stitch-loop becomes genuinely useful for Workflow Automation: each cycle should reduce ambiguity, not repeat it.
