Xpersona
S

Stitch Design

CLAWHUB · Unverified

Official Google Stitch SDK wrapper for OpenClaw. Requires only STITCH_API_KEY. Generate UI screens from text, apply targeted edits, branch variants, export H... Skill: Stitch Design Owner: rasimme Summary: Official Google Stitch SDK wrapper for OpenClaw. Requires only STITCH_API_KEY. Generate UI screens from text, apply targeted edits, branch variants, export H... Tags: latest:1.2.3 Version history: v1.2.3 | 2026-03-29T07:36:30.699Z | user Sync with google-stitch-design@1.2.3. v1.2.2 | 2026-03-29T00:55:41.476Z | user Clarified runtime scope, setup guidance, and dependency/in

62
Rank
84
Safety
1.4k
Downloads

About

What it does, and when to use it.

Capability contract not published. No trust telemetry is available yet. 1.4K downloads reported by the source. Last updated 10/10/2026.

Avoid when

  • Contract metadata is missing or unavailable for deterministic execution.

Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing

Install and run

Setup complexity: low.

clawhub skill install s1733ceh2knhecccb4gr5brqmh83h2hw:stitch-design
  1. Setup complexity is classified as HIGH. You must provision dedicated cloud infrastructure or an isolated VM. Do not run this directly on your local workstation.
  2. Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.

Contract: missing

curl -s "https://www.xpersona.co/api/v1/agents/clawhub-rasimme-stitch-design/snapshot"

Run-check

$0.02 USD

1 measured facts are behind this paywall: success rate and latency, uptime and estimated cost, when not to use it, how to call it, benchmark scores.

Agents pay $0.02 in USDC. A card payment is $0.50, the smallest a card allows.

Documentation

CLAWHUB

146,932 characters of source documentation, loaded on request.

Extracted files

5 files captured from the source.

SKILL.md

---
name: stitch-design
description: Official Google Stitch SDK wrapper for OpenClaw. Requires only STITCH_API_KEY. Generate UI screens from text, apply targeted edits, branch variants, export HTML/images, and track design lineage with screen aliases plus append-only event history. Stores local artifacts under the skill folder and talks only to Google Stitch endpoints needed for generation and screenshot delivery.
metadata: {"openclaw": {"requires": {"anyBins": ["node", "node18", "node20", "node22"], "env": ["STITCH_API_KEY"]}, "primaryEnv": "STITCH_API_KEY", "homepage": "https://github.com/rasimme/stitch-design"}}
---

# Stitch Design

AI-powered UI design with Google Stitch — generate, iterate, export.

## Setup

**Required:** Node.js 18+ and `STITCH_API_KEY` env var.
Get a key at: https://stitch.withgoogle.com → Profile → API Keys
Configure the key in your OpenClaw skill env settings or in the shell used to run the CLI.

```bash
# Install dependencies (one-time, from skill root)
cd scripts && npm install
```

Install scope: this installs the Node dependency declared in `scripts/package.json` (`@google/stitch-sdk`) plus its npm transitive dependencies.

**Troubleshooting:**
- `STITCH_API_KEY not set` → ensure the env var is configured in OpenClaw skill settings or shell
- `ECONNRESET` / timeouts → Stitch API calls take 1-5 min; the CLI retries automatically
- `Corrupt names.json` → run `node scripts/stitch.mjs rebuild --project <id>` to reconstruct from event log

## Usage

## Runtime Scope

- Network: Google Stitch API and Google-hosted screenshot URLs returned by Stitch
- Credentials: `STITCH_API_KEY` only
- Local writes: `runs/`, `state/`, `latest-screen.json`
- No extra services, daemons, browser automation, or unrelated credentials required


The CLI is at `scripts/stitch.mjs`. All output is JSON on stdout.

```bash
node scripts/stitch.mjs <command> [args] [--flags]
```

---

## Workflow: New Design

Use when user wants to design something from scratch.

**Step 1 — Shape the prompt** (see `references/prompt-guide.md` for keywords)

Transform the user's brief into a richer prompt:
- Add layout terms (sidebar, card grid, hero section...)
- Add visual tone (minimal, dark mode, editorial...)
- Specify device explicitly

**Step 2 — Generate**

```bash
node scripts/stitch.mjs generate <project-id> "shaped prompt" --device desktop
```

Typical time: 1–5 minutes. The CLI downloads HTML + PNG automatically.

**Step 3 — Preview**

Show the hi-res screenshot: run `show <alias>` → display via `MEDIA:<screenshotUrl>` (see Image Delivery).

**Step 4 — Iterate** (edit or variants)

---

## Workflow: Edit Design

Use when user wants targeted changes to an existing screen.

```bash
node scripts/stitch.mjs edit <screen-id> "change the header to blue, add a search bar"
# --project auto-detected from latest-screen.json
```

Focused edits work better than vague ones. Be specific: colors, layout, components.

---

## Workflow: Design Variants

Use when user wan

design-systems/README.md

# Design Systems

Add design system markdown files here and reference them by slug.

Examples:
- `design-systems/brand-core.md` → `--design-system brand-core`
- `design-systems/mobile-app.md` → `--design-system mobile-app`

Rules:
- Markdown files only (`.md`)
- Filenames become the allowed design system names
- Allowed characters: lowercase letters, numbers, `-`, `_`

README.md

<h1 align="center">Stitch Design</h1>

<p align="center">
  <strong>AI-powered UI design with Google Stitch — generate, iterate, track, export.</strong><br>
  An <a href="https://github.com/openclaw/openclaw">OpenClaw</a> skill wrapping the official <a href="https://www.npmjs.com/package/@google/stitch-sdk">@google/stitch-sdk</a>.
</p>

<p align="center">
  <a href="https://github.com/rasimme/stitch-design/blob/master/LICENSE"><img src="https://img.shields.io/badge/License-MIT-green.svg" alt="License"></a>
  <a href="https://github.com/rasimme/stitch-design/blob/master/CHANGELOG.md"><img src="https://img.shields.io/badge/version-v1.2.3-blue.svg" alt="Version"></a>
  <a href="https://clawhub.com"><img src="https://img.shields.io/badge/ClawHub-skill-purple.svg" alt="ClawHub"></a>
</p>

<p align="center">
  <a href="#features">Features</a> •
  <a href="#quick-start">Quick Start</a> •
  <a href="#commands">Commands</a> •
  <a href="#screen-names">Screen Names</a> •
  <a href="#event-log">Event Log</a> •
  <a href="#workflows">Workflows</a> •
  <a href="#prompt-guide">Prompt Guide</a> •
  <a href="CHANGELOG.md">Changelog</a>
</p>

---

## What is this?

Your AI agent generates, iterates, and exports UI designs through Google Stitch — directly from chat. No browser tabs, no manual copy-paste. Describe what you want, get a hi-res screenshot back, refine with natural language.

> **"Design a minimal SaaS dashboard with sidebar nav, 4 KPI cards, and an area chart. Dark mode, desktop."**
>
> → Agent shapes the prompt → Stitch generates → hi-res screenshot delivered → "make it warmer" → done.

**New in v1.2.3:** safer design-system registry loading, plus the v1.2.0 workflow upgrades: device inheritance, robust screenshot URL refresh, and delta-based recovery for connection drops.

**Runtime scope:** requires only `STITCH_API_KEY`, talks only to Google Stitch endpoints needed for generation/screenshot delivery, and stores local artifacts in `runs/`, `state/`, and `latest-screen.json`.

---

## Features

- **Text-to-UI** — Generate full screens or isolated components from text descriptions
- **Edit** — Targeted changes to existing screens ("change the header to blue")
- **Variants** — Explore 3–5 design directions with refine/explore/reimagine modes
- **Screen Names** — Alias registry so you can refer to screens by name instead of IDs
- **Event Log** — Append-only history of every operation with parent/child lineage
- **Hi-Res Delivery** — Screenshots delivered at full design resolution (780px+) via Google CDN
- **Visual Review** — Browse project screens, get screenshots in chat, pick one to continue
- **Sketch-to-Design** — Upload a wireframe in Stitch Web UI, refine it via the skill
- **Auto-Export** — Every operation saves HTML + PNG locally
- **Prompt Shaping** — Built-in [prompt guide](references/prompt-guide.md) ensures the agent enriches your brief
- **Recovery** — Handles Stitch API connection drops (1-5 min operations) automatically with delta-based 

_meta.json

{
  "ownerId": "kn70j4qwbd9cngbd8dzxvy5bad83fgsn",
  "slug": "stitch-design",
  "version": "1.2.3",
  "publishedAt": 1774769790699
}

references/prompt-guide.md

# Stitch Prompt Guide

How to write prompts that get great results from Google Stitch.
This guide is loaded by the agent before every generate/edit/variants call.

---

## 1. How Stitch Thinks

**Stitch generates full screens, not components.**
Its strongest tendency is to build a complete application layout — sidebar, header, navigation, content — even when you only ask for a button. Every prompt must actively counteract this when you want isolated components.

**Stitch is an ideation tool, not a production tool.**
Use it to answer "What could this look like?" — not "Build me the final thing." Final polish, brand consistency, and integration into existing interfaces happen in Figma or the component library.

**Stitch interprets sketches well.**
Upload a hand-drawn wireframe or screenshot in the Stitch Web UI, then use `edit` via the skill to refine it. The skill finds the uploaded screen by title via `list_screens`.

---

## 2. The Prompt Framework

Every good Stitch prompt has four layers. If you leave one out, Stitch fills the gap with generic defaults — that's where "AI slop" comes from.

### Layer 1: Context (Who & What)
What kind of app/site? Who is the audience?

> "B2B estate management platform" triggers different design choices than "children's game."

- Industry/domain: SaaS, e-commerce, fintech, healthcare, portfolio site
- Audience: enterprise users, consumers, developers, creative professionals
- App reference shortcuts: "Like Linear's dashboard" or "Airbnb-style search cards"

### Layer 2: Structure (Layout & Components)
The spatial blueprint. Don't let Stitch guess — it will default to single-column stack.

**Page structure:** sidebar navigation, top navigation bar, split layout, bento grid, masonry layout, card grid, hero section with overlay, sticky header, full-bleed header

**Components:** metric card, KPI card with sparkline, data table, form with labels, multi-step form, tab navigation, breadcrumb, search bar, filter chips, progress bar, donut chart, avatar group, badge, status indicator, empty state with illustration

### Layer 3: Aesthetic (Visual Tone & Style)
The most powerful lever. Use precise design vocabulary — vague words produce vague results.

**Style keywords and what they trigger:**

| Keyword | What Stitch generates |
|---|---|
| `minimal` / `clean` | Lots of whitespace, restrained palette, simple geometry |
| `editorial` / `magazine-style` | Large typography, dramatic whitespace, museum-curatorial feel |
| `brutalist` / `neobrutalist` | Thick black borders, clashing colors, hard shadows, monospaced type |
| `glassmorphism` | Frosted translucent cards over colorful backgrounds, blur effects |
| `neumorphism` | Soft extruded surfaces, subtle inner/outer shadows |
| `dark mode` | Dark backgrounds with light text, often paired with accent colors |
| `premium` / `luxury` | Restrained palette, serif typography, generous spacing |
| `playful` / `consumer` | Rounded shapes, bright colors, friendly illustrations |

**V

Sponsored

Ads related to Stitch Design and adjacent AI workflows.