# Build Stitch Websites Iteratively

Large website builds often lose context between pages and iterations. This skill gives Claude, Codex, and Claude Code a baton workflow for generating, integrating, and continuing Stitch-based site work.

## Install

```bash
npx skillstore add google-labs-code/stitch-loop
```

## Metadata

- Status: approved
- Slug: google-labs-code-stitch-loop
- Skillstore revision: r1
- Version status: missing
- Tree hash: 1356c00cb212ef4fcf6dd9e3e169cb03124a736d2898d65930dd4e7bba3baaeb
- Author: google-labs-code
- GitHub username: google-labs-code
- License: MIT
- Repository: https://github.com/google-labs-code/stitch-skills/tree/main/skills/stitch-loop/
- Ref: 3e4b6c31a74a3bd1a291c98cf585d720cb9fbc88
- Supported tools: Claude, Codex, Claude Code
- Audit status: complete
- Agent install advisory: allowed
- Manual install advisory: allowed
- Artifact signature: available
- Audit attestation: unavailable
- Human verification: not\_verified
- Risk factors: external\_commands, network
- Quality score: 78
- Quality tier: bronze
- Public page: https://skillstore.pages.dev/skills/google-labs-code-stitch-loop
- Manifest: https://skillstore.pages.dev/api/skills/google-labs-code-stitch-loop/manifest

## Capabilities

- Reads a next-prompt.md baton file to identify the next page to build.
- Uses Stitch MCP tools to create or reuse a Stitch project and generate a screen.
- Retrieves generated HTML and screenshot assets for local integration.
- Moves generated pages into a site/public structure and updates navigation guidance.
- Updates SITE.md and prepares the next baton prompt for another iteration.
- Optionally verifies a local page with Chrome DevTools MCP and screenshot comparison.

## Use Cases

- Expand a marketing site: Generate one new page at a time while keeping the sitemap and design direction synchronized.
- Prototype a product website: Turn a roadmap of page ideas into Stitch-generated static pages across repeated agent runs.
- Maintain design consistency: Reuse a DESIGN.md block in every baton prompt so new pages follow the same visual system.

## Prompt Templates

### Run the next Stitch iteration

```
Read next-prompt.md, generate the requested page with Stitch, integrate it into the site, and prepare the next baton.
```

### Create the first baton

```
Review SITE.md and DESIGN.md, choose the highest priority page, and write a valid next-prompt.md for the next Stitch generation step.
```

### Verify a generated page

```
Integrate the generated page, start a local preview if approved, compare the rendered page with the Stitch screenshot, and fix visible differences.
```

### Continue an autonomous build loop

```
Complete the current baton task, update SITE.md, remove consumed ideas, and write a specific next-prompt.md that keeps the site roadmap moving.
```

## Limitations

- Requires access to Stitch MCP tools and a suitable Stitch project.
- Does not replace human review for design quality, accessibility, or content accuracy.
- May run a local server with Bash when visual verification is requested.
- Works best when SITE.md, DESIGN.md, and next-prompt.md are maintained carefully.

## Best Practices

- Keep SITE.md current before every run so the agent does not recreate existing pages.
- Copy the design system block into each baton prompt for consistent Stitch output.
- Review generated HTML and screenshots before publishing pages beyond the local site.

## Anti Patterns

- Do not leave next-prompt.md empty after an iteration unless you want the loop to stop.
- Do not use vague page prompts that omit structure, device type, or design guidance.
- Do not approve external commands or network downloads without understanding the source.

## Security Audit

- Audited at: 2026-07-09T04:31:05.379\+00:00
- Summary: Most static findings are false positives caused by Markdown backticks around filenames, MCP tool names, and example content. One finding is confirmed: the skill asks agents to run a local server through Bash using npx, which is a legitimate preview step but still executes an external command.

## Stats

- Views: 287
- Downloads: 9
- Favorites: 0
- Popularity score: 0
