From stitch
Iterative site building loop using Stitch baton system. Reads next-prompt.md, generates via MCP, converts to Vue SFC, updates SITE.md. Use when: 'stitch loop', 'build loop', 'iterative build', 'baton system'.
How this skill is triggered — by the user, by Claude, or both
Slash command
/stitch:stitch-loopThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
You are an **autonomous frontend builder** participating in an iterative site-building loop. Your goal is to generate a screen using Stitch, convert it to a Vue SFC, integrate it into the Nuxt 4 project, and prepare instructions for the next iteration.
You are an autonomous frontend builder participating in an iterative site-building loop. Your goal is to generate a screen using Stitch, convert it to a Vue SFC, integrate it into the Nuxt 4 project, and prepare instructions for the next iteration.
The Build Loop pattern enables continuous, autonomous website development through a "baton" system. Each iteration:
.stitch/next-prompt.mdmcp__cellm-oracle__context_preflightstitch:html-to-vue pipelinestitch:ingest (DSE sync) and stitch:to-nuxt (theme alignment)mcp__cellm-oracle__context_certifyRequired:
.stitch/DESIGN.md — visual design system (generate with stitch:design-md if needed).stitch/SITE.md — site vision, sitemap, roadmapThe .stitch/next-prompt.md file acts as a relay baton between iterations. See resources/baton-schema.md for the full schema.
Critical rules:
page field in YAML frontmatter determines the component name and route.stitch/DESIGN.md Section 6| Subcommand | Behavior |
|---|---|
start | Initialize the loop: create .stitch/SITE.md from resources/site-template.md, create .stitch/metadata.json, write the first baton for the index page |
continue | Execute one full iteration of the loop (default behavior when no argument given) |
status | Display current baton page, SITE.md sitemap completion, and pending roadmap items — no generation |
Parse .stitch/next-prompt.md to extract:
page frontmatter fielddeviceType frontmatter field (default: DESKTOP)Before generating, read these files and run preflight:
| Source | Purpose |
|---|---|
.stitch/SITE.md | Site vision, Stitch Project ID, existing pages (sitemap), roadmap |
.stitch/DESIGN.md | Required visual style for Stitch prompts |
mcp__cellm-oracle__context_preflight | SCE governance check — must pass before any generation |
Important checks:
[x]Get or create project:
.stitch/metadata.json exists, use the projectId from itmcp__stitch__list_projects to check for an existing project, or create one, then call mcp__stitch__get_project to retrieve full details and save to .stitch/metadata.jsonmcp__stitch__get_project again and update the screens map in .stitch/metadata.jsonConfirm with user: Before generating, call AskUserQuestion to confirm the page name and prompt. Do not auto-trigger generation.
Generate screen: Call mcp__stitch__generate_screen_from_text with:
projectId: the project ID from metadataprompt: the full prompt from the baton (including design system block)deviceType: value from baton frontmatter, defaults to DESKTOPRetrieve assets: Before downloading, check if .stitch/designs/{page}.html and .stitch/designs/{page}.png already exist:
mcp__stitch__get_screen to retrieve screen metadata, then download:
htmlCode.downloadUrl — save as .stitch/designs/{page}.htmlscreenshot.downloadUrl — append =w{width} (using width from screen metadata) before downloading, save as .stitch/designs/{page}.png.stitch/designs/{page}.htmlstitch:html-to-vue pipeline to convert the HTML to a Vue SFCapp/components/Stitch{PagePascal}.vueapp/pages/{page}.vue to import and render the componentpublic/ or use Nuxt's useAssets patternstitch:ingest to sync design tokens to the DSE (design system engine) — ensures Tailwind semantic tokens stay aligned with the Stitch design themestitch:to-nuxt to apply any theme-level changes to app/assets/css/main.cssapp/layouts/default.vue, header, footer) remain consistentYou MUST update .stitch/next-prompt.md before completing. This keeps the loop alive.
.stitch/SITE.md Section 5 (Roadmap) for pending itemsresources/baton-schema.md[x] in Section 4 (Sitemap)mcp__cellm-oracle__context_certify to record the completed iterationmcp__cellm-oracle__context_record_outcome with iteration summaryproject/
├── .stitch/
│ ├── metadata.json # Stitch project & screen IDs (persist this!)
│ ├── DESIGN.md # Visual design system (from stitch:design-md)
│ ├── SITE.md # Site vision, sitemap, roadmap
│ ├── next-prompt.md # The baton — current task
│ └── designs/ # Staging area for raw Stitch output
│ ├── {page}.html
│ └── {page}.png
└── app/
├── components/
│ └── Stitch{Page}.vue # Converted Vue SFCs
└── pages/
└── {page}.vue # Nuxt route pages (import Stitch components)
.stitch/metadata.json SchemaPersists all Stitch identifiers so future iterations can reference them for edits or variants. Populate by calling mcp__stitch__get_project after creating a project or generating screens.
{
"name": "projects/6139132077804554844",
"projectId": "6139132077804554844",
"title": "My App",
"visibility": "PRIVATE",
"createTime": "2026-03-04T23:11:25.514932Z",
"updateTime": "2026-03-04T23:34:40.400007Z",
"projectType": "PROJECT_DESIGN",
"origin": "STITCH",
"deviceType": "DESKTOP",
"designTheme": {
"colorMode": "DARK",
"font": "INTER",
"roundness": "ROUND_EIGHT",
"customColor": "#40baf7",
"saturation": 3
},
"screens": {
"index": {
"id": "d7237c7d78f44befa4f60afb17c818c1",
"sourceScreen": "projects/6139132077804554844/screens/d7237c7d78f44befa4f60afb17c818c1",
"x": 0,
"y": 0,
"width": 1440,
"height": 1249
}
},
"metadata": {
"userRole": "OWNER"
}
}
| Field | Description |
|---|---|
name | Full resource name (projects/{id}) |
projectId | Stitch project ID |
title | Human-readable project title |
designTheme | Design system tokens: color mode, font, roundness, custom color, saturation |
deviceType | Target device: DESKTOP, MOBILE, TABLET |
screens | Map of page name to screen object. Each screen includes id, sourceScreen (resource path for MCP calls), canvas position (x, y), and dimensions (width, height) |
metadata.userRole | User's role on the project (OWNER, EDITOR, VIEWER) |
This skill works best with the stitch:design-md skill:
.stitch/DESIGN.md using stitch:design-md from an existing Stitch screenstitch:ingest, the design tokens from designTheme are reflected in app/assets/css/main.css via --ui-* variables| Issue | Solution |
|---|---|
| Stitch generation fails | Verify the prompt includes the full design system block |
| Inconsistent styles | Ensure .stitch/DESIGN.md is current and Section 6 was copied verbatim |
| Loop stalls | Check that .stitch/next-prompt.md was updated with valid YAML frontmatter |
| Theme drift after ingest | Re-run stitch:to-nuxt to re-align main.css with current design tokens |
| Vue SFC has broken paths | Fix asset references to use public/ or Nuxt asset helpers |
AskUserQuestionmcp__cellm-oracle__context_preflight before generationmcp__cellm-oracle__context_certify after integration[x] in SITE.md Section 4.stitch/next-prompt.md — this breaks the loopapp/ — always convert to Vue SFC via stitch:html-to-vuestitch:ingest after consuming new screens — DSE sync is mandatorynpx claudepluginhub murillodutt/cellm --plugin stitchImplements an autonomous iterative loop for building websites using Stitch MCP tools and baton-passing via .stitch/next-prompt.md for multi-step frontend construction.
Implements repeating Stitch build loops for autonomous multi-page website generation: reads next-prompt.md baton, generates pages via Stitch MCP, integrates into site/public, updates SITE.md, preps next task.
Iteratively builds multi-page websites with Stitch MCP: reads next-prompt.md baton, generates next page HTML, integrates into site via bash scripts, updates baton to continue loop.