
Design Loop
Autonomously build every page of a multi-page marketing or product site via a baton file that chains HTML/Tailwind generations until the sitemap is done.
Overview
Design Loop is an agent skill for the Build phase that autonomously builds multi-page HTML/Tailwind sites using a .design/next-prompt.md baton between iterations.
Install
npx skills add https://github.com/jezweb/claude-skills --skill design-loopWhat is this skill?
- Baton-passing loop driven by .design/next-prompt.md between human or fully autonomous iterations
- Six-step cycle: read task, generate page, integrate nav, optional browser visual verify, update docs, write next task
- Orchestration-agnostic—supports human-in-loop (“next page”) or continuous autonomous runs
- Claude or Google Stitch page generation with site-wide integration after each page
- Six-step cycle per iteration: read baton, generate, integrate, verify, document, write next task
Adoption & trust: 545 installs on skills.sh; 841 GitHub stars; 2/3 security scanners passed (skills.sh audits).
What problem does it solve?
You need many coordinated site pages but lose momentum re-briefing the agent on nav, links, and “what’s next” after every single page.
Who is it for?
Solo builders on Claude Code who want a relay-file workflow for sequential multi-page Tailwind or HTML sites with optional visual checks.
Skip if: One-off single components, large React app shells without HTML export, or teams that already have an approved full-site spec and only need one static page.
When should I use this skill?
User asks to build an entire site autonomously, all pages in sequence, or a design loop / baton loop / autonomous site build—including “next page” or “keep going” mid-flow.
What do I get? / Deliverables
Each loop leaves an integrated page plus an updated next-prompt baton so you or the agent can continue the site build until the planned pages are complete.
- New HTML/Tailwind pages wired into site navigation
- Updated .design/next-prompt.md baton for the next iteration
- Site documentation updates per loop
Recommended Skills
Journey fit
The skill generates and integrates pages into a site structure, which is core Build frontend work for solo builders shipping static or Tailwind sites. Frontend is the canonical shelf because each loop iteration produces HTML/Tailwind pages, navigation links, and visual verification—not backend APIs.
How it compares
Use instead of ad-hoc “build the next page” chat when you need persistent .design/next-prompt.md state and integrated navigation across the whole site.
Common Questions / FAQ
Who is design-loop for?
Claude Code users shipping multi-page brochure, marketing, or lightweight product sites who want autonomous or semi-autonomous page-by-page generation.
When should I use design-loop?
During Build frontend when you ask to build all pages of a site, run a design loop or baton loop, or say “next page” / “just keep going” mid multi-page site work.
Is design-loop safe to install?
It writes and edits project files and may run Bash and browser tools; review the Security Audits panel on this Prism page before enabling it on production repos.
SKILL.md
READMESKILL.md - Design Loop
# Design Loop — Autonomous Site Builder Build complete multi-page websites through an autonomous loop. Each iteration reads a task, generates a page, integrates it, verifies it visually, then writes the next task to keep going. ## Overview The Design Loop uses a "baton" pattern — a file (`.design/next-prompt.md`) acts as a relay baton between iterations. Each cycle: 1. Reads the current task from the baton 2. Generates the page (via Claude or Google Stitch) 3. Integrates into the site structure (navigation, links) 4. Verifies visually via browser automation (if available) 5. Updates site documentation 6. Writes the NEXT task to the baton — keeping the loop alive This is orchestration-agnostic. The loop can be driven by: - **Human-in-loop**: User reviews each page, then says "next" or "keep going" - **Fully autonomous**: Claude runs continuously until the site is complete - **CI/CD**: Triggered on `.design/next-prompt.md` changes ## Generation Backends | Backend | Setup | Quality | Speed | Best for | |---------|-------|---------|-------|----------| | **Claude** (default) | Zero dependencies | Great — production-ready HTML/Tailwind | Fast | Most projects, full code control | | **Google Stitch** | `npm install @google/stitch-sdk` + API key | Higher fidelity AI designs | ~10-20s/screen | Design-heavy projects, visual polish | ### Detecting Stitch At the start of each loop, check if Stitch is available: 1. Check if `@google/stitch-sdk` is installed: `ls node_modules/@google/stitch-sdk 2>/dev/null` 2. Check if `STITCH_API_KEY` is set in `.dev.vars` or environment 3. Check if `.design/metadata.json` exists (contains Stitch project ID) If all three are present, use Stitch. Otherwise, fall back to Claude generation. ### Stitch SDK Reference Install: `npm install @google/stitch-sdk`. Set `STITCH_API_KEY` in environment or `.dev.vars`. ```typescript import { stitch } from "@google/stitch-sdk"; // Create a project const result = await stitch.callTool("create_project", { title: "My Site" }); // Reference an existing project const project = stitch.project("4044680601076201931"); // Generate a screen const screen = await project.generate("A modern landing page with hero section", "DESKTOP"); // Get assets const htmlUrl = await screen.getHtml(); // Download URL for HTML const imageUrl = await screen.getImage(); // Download URL for screenshot // Edit an existing screen (prefer this for refinements) const edited = await screen.edit("Make the background dark and enlarge the CTA button"); // Generate variants const variants = await screen.variants("Try different colour schemes", { variantCount: 3, creativeRange: "EXPLORE", // "REFINE" | "EXPLORE" | "REIMAGINE" aspects: ["COLOR_SCHEME"], // "LAYOUT" | "COLOR_SCHEME" | "IMAGES" | "TEXT_FONT" | "TEXT_CONTENT" }); ``` Device types: `"MOBILE"` | `"DESKTOP"` | `"TABLET"` | `"AGNOSTIC"`. Model selection: pass `"GEMINI_3_PRO"` | `"GEMINI_3_FLASH"` as third arg to `generate()`. Other operations: `stitch.projects()` lists projects, `project.screens()` lists screens, `project.getScreen("id")` fetches one. `getHtml()` and `getImage()` return download URLs. Append `=w1280` to image URLs for full resolution. Auth: `STITCH_API_KEY` required (or `STITCH_ACCESS_TOKEN` + `GOOGLE_CLOUD_PROJECT` for OAuth). Error