stitch-loop

Automate iterative Stitch page generation, sanitization, and baton handoff.

1|Updated Apr 4, 2026
One-click install
npx skills add https://github.com/lagarcess/argus --skill stitch-loop-lagarcess
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: stitch-loop
Source: https://github.com/lagarcess/argus/tree/main/.agent/skills/stitch-loop
Command: npx skills add https://github.com/lagarcess/argus --skill stitch-loop-lagarcess

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Many teams and agents struggle to continuously generate, integrate, and verify design-driven web pages at scale; this Skill automates the baton-passing loop that reads a task, generates a Stitch screen, retrieves assets, sanitizes and integrates HTML, and writes the next task to keep the loop running.

Core Features & Use Cases

  • Baton-based orchestration: Read and write the .stitch/next-prompt.md baton to coordinate iterative work between agents or CI/CD.
  • Stitch MCP integration: Discover Stitch tools, create or reuse projects, generate screens from text prompts, and persist project/screen metadata in .stitch/metadata.json.
  • Asset retrieval and safety: Download HTML and screenshots, perform a required safety audit to detect and sanitize scripts, then move production-ready pages to site/public and update navigation and SITE.md.
  • Optional visual verification: Use Chrome DevTools MCP when available to render pages, capture screenshots, and compare fidelity against Stitch-generated images.
  • Use Cases: Autonomous site generation in agent chains, CI/CD-driven page creation, and iterative design-to-production workflows for product teams and designers.

Quick Start

Read .stitch/next-prompt.md, generate the page with Stitch MCP, integrate the sanitized HTML into site/public, update .stitch/metadata.json and .stitch/SITE.md, and write the next .stitch/next-prompt.md to continue the loop.

Frequently Asked Questions about stitch-loop

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

FAQPage Schema
How do I automate iterative website page generation and integration?

Automate iterative website page generation by using a baton-passing loop where an agent reads a .stitch/next-prompt.md file, generates screens via Stitch MCP, sanitizes HTML, updates navigation, and writes the next prompt to continue the cycle.

How does baton-based orchestration work for autonomous design-to-production workflows?

Baton-based orchestration works by reading and writing the .stitch/next-prompt.md file to coordinate iterative tasks between agents or CI/CD pipelines, ensuring continuous generation, integration, and verification of design-driven web pages at scale.

Do I need a Stitch MCP server to use autonomous site generation workflows?

Yes, autonomous site generation requires access to a Stitch MCP server, a .stitch project containing DESIGN.md and SITE.md files, callable MCP endpoints for project queries, and file system permissions to persist assets and metadata.

How to sanitize Stitch HTML output and integrate it into a public site directory?

Sanitize Stitch HTML output by downloading the generated pages, performing a required safety audit to detect and remove scripts, then moving the production-ready HTML into the site/public directory while updating navigation and SITE.md.

Can I use Chrome DevTools MCP for visual verification of generated Stitch screens?

Yes, when available, you can use Chrome DevTools MCP to render pages, capture screenshots, and compare visual fidelity against the Stitch-generated images during the iterative site generation loop.

What are the limitations of using a baton loop for frontend automation?

The baton loop requires continuous file system permissions to persist assets and metadata, relies on callable Stitch MCP endpoints for generation, and depends on maintaining valid DESIGN.md and SITE.md files to function without interruption.