stitch-loop

Generates website pages iteratively using Stitch MCP tools through a baton-passing loop pattern.

Updated Mar 26, 2026
One-click install
npx skills add https://github.com/TranVanTienDat/Milkyway --skill stitch-loop-tranvantiendat
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: stitch-loop
Source: https://github.com/TranVanTienDat/Milkyway/tree/main/apps/storefront/.agents/skills/stitch-loop
Command: npx skills add https://github.com/TranVanTienDat/Milkyway --skill stitch-loop-tranvantiendat

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 each page. This Skill automates the entire iteration cycle so an agent can continuously generate, integrate, and queue up the next page without human intervention between steps. ## 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 (sitemap, roadmap, vision) 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 for future edits and variants, with optional Chrome DevTools visual verification. - Use Case: A developer sets up a SITE.md roadmap for a furniture showroom site, then lets the agent autonomously build the contact page, product pages, and gallery one iteration at a time, triggered manually or via CI/CD. ## 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 set up an autonomous website build loop with Stitch?▼

Create a .stitch directory containing SITE.md (site vision and roadmap), DESIGN.md (design system), and next-prompt.md (the current task baton). The agent reads the baton, generates the page via Stitch MCP tools, integrates it into site/public, and writes the next baton to continue the loop.

What is the next-prompt.md baton file format?▼

The baton is a Markdown file with YAML frontmatter containing a page field (the output filename without extension). The body must include a one-line description, the design system block copied from DESIGN.md, and a numbered page structure list.

Does the stitch-loop skill work with CI/CD pipelines?▼

Yes, the loop is orchestration-agnostic. GitHub Actions can trigger new iterations on changes to next-prompt.md, or you can use human-in-the-loop review, agent chains like the Jules API, or manual repeated runs.

Why does the build loop stall or break between iterations?▼

The most common cause is forgetting to update .stitch/next-prompt.md before completing an iteration, which breaks the relay. Also verify the baton has valid YAML frontmatter with a page field and that the prompt includes the design system block.

Can I verify generated pages visually before publishing?▼

Yes, if the Chrome DevTools MCP Server is available, the skill optionally starts a local dev server, navigates to the generated page, captures a screenshot, and compares it against the Stitch design PNG for fidelity.