stitch-loop

Automates iterative website generation using Stitch MCP tools through a baton-passing loop pattern.

Updated Aug 22, 2026
One-click install
npx skills add https://github.com/mewishu/awesome-skills --skill stitch-loop-mewishu
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: stitch-loop
Source: https://github.com/mewishu/awesome-skills/tree/main/skills/pattern/baton-relay/stitch-loop
Command: npx skills add https://github.com/mewishu/awesome-skills --skill stitch-loop-mewishu

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Building a multi-page website with AI-generated designs requires repetitive manual prompting, file management, and navigation wiring for every page. This Skill turns that into an autonomous loop where each iteration reads a task, generates a page with Stitch, integrates it into the site, and hands off the next task. ## Core Features & Use Cases - Baton-Passing Loop: Reads the current task from .stitch/next-prompt.md, generates the page via Stitch MCP tools, then writes the next task to keep the loop alive. - Site Context Management: Maintains .stitch/SITE.md (vision, sitemap, roadmap) and .stitch/DESIGN.md (design system) so every generated page stays consistent and no page is duplicated. - Project State Persistence: Stores Stitch project and screen IDs in .stitch/metadata.json so future iterations can edit or create variants of existing screens. - Use Case: A developer sets up a furniture showroom site, seeds the roadmap in SITE.md, and lets the agent autonomously build the contact page, product pages, and gallery one iteration at a time, optionally triggered by CI/CD on each commit. ## Quick Start Read my .stitch/next-prompt.md file, generate the page using Stitch, integrate it into the site, and prepare the next iteration.

Frequently Asked Questions about stitch-loop

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate website generation with Stitch MCP tools?

Set up a .stitch directory containing next-prompt.md, SITE.md, and DESIGN.md, then run the loop: the agent reads the baton file, calls generate_screen_from_text with the prompt, downloads the HTML and screenshot, and integrates the page into site/public.

What is the baton-passing pattern for autonomous agents?

The baton pattern uses a next-prompt.md file with YAML frontmatter specifying the target page. Each agent iteration reads the file, completes the task, then rewrites the file with the next task so the loop continues without human intervention.

Can I trigger the Stitch build loop with GitHub Actions?

Yes, the loop is orchestration-agnostic. GitHub Actions can trigger a new iteration whenever .stitch/next-prompt.md changes, and alternatives include human review, agent chains like the Jules API, or manual repeated runs.

Why does the Stitch build loop stall between iterations?

The loop stalls when the agent forgets to update .stitch/next-prompt.md before completing, or writes it without valid YAML frontmatter containing the page field. Always validate the baton file against the schema before finishing.

What files are required before running the Stitch loop?

You need access to the Stitch MCP Server, a .stitch/DESIGN.md design system file (generatable with the design-md skill), and a .stitch/SITE.md file documenting the site vision, sitemap, and roadmap. Chrome DevTools MCP is optional for visual verification.