Official agent skill

Stitch SDK Pipeline

by google-labs-code in google-labs-code/stitch-sdk

Run the full Stitch SDK generation pipeline. An agent skill from google-labs-code/stitch-sdk.

OfficialApache-2.0Auto-check passedTesting & QA

Install Stitch SDK Pipeline

skills CLI
$ npx skills add google-labs-code/stitch-sdk --skill stitch-sdk-pipeline -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install google-labs-code/stitch-sdk stitch-sdk-pipeline --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/google-labs-code/stitch-sdk.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/stitch-sdk-pipeline .claude/skills/stitch-sdk-pipeline && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
stitch-sdk-pipeline
GitHub stars
1.8k
Token cost
~2k tokens
SKILL.md length
754 words
Files
1
Skills in repo
9
Repo updated
First seen
Licence
Apache-2.0

At a glance

Run the full Stitch SDK generation pipeline. An agent skill from google-labs-code/stitch-sdk.

  • Works in 9 steps: Capture Tool Schemas 🤖 → Domain Design 🧠 (Agent) → Generate TypeScript 🤖 → …
  • A new tool is added
  • SKILL.md covers Prerequisites, Pipeline Stages and Quick Reference
  • Calls npm; needs STITCH_API_KEY and GEMINI_API_KEY

What it does

Stitch SDK Pipeline is an agent skill from google-labs-code/stitch-sdk, published by the product's own GitHub organization. Run the full Stitch SDK generation pipeline. Use when a new tool is added, or the SDK needs to be regenerated end-to-end.

Its SKILL.md is about 2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Testing & QA, covering End-to-end testing. It works with Google Stitch and TypeScript. The repository describes itself as: Generate UI screens from text prompts and extract their HTML and screenshots programmatically. The licence is Apache-2.0.

When your agent uses it

  • A new tool is added
  • The SDK needs to be regenerated end-to-end

Example prompts

  • “/stitch-sdk-pipeline”

Requirements

  • A credential in STITCH_API_KEY
  • A credential in GEMINI_API_KEY

Workflow steps

9 steps, taken from the step headings in SKILL.md.

  1. Capture Tool Schemas 🤖
  2. Domain Design 🧠 (Agent)
  3. Generate TypeScript 🤖
  4. Build 🤖
  5. Unit Tests 🤖
  6. Script Tests 🤖
  7. E2E Tests 🤖
  8. Lock Validation 🤖
  9. Skill Audit 🧠 (Agent)

What it can do on your machine

Read from SKILL.md and the folder at commit e3f8ece. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • npm

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use npm, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • STITCH_API_KEY
    • GEMINI_API_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Stitch SDK Pipeline loads about 2k tokens when it runs. Until then it costs about 35 tokens; SKILL.md has 754 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~35
When it runs · the whole SKILL.md, loaded when a task matches
~2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from google-labs-code/stitch-sdk at commit e3f8ece, republished under its Apache-2.0 licence (© google-labs-code). 754 words, ~1,953 tokens.

Download SKILL.mdSave it as .claude/skills/stitch-sdk-pipeline/SKILL.md (or your agent's skills folder).
name
stitch-sdk-pipeline
description
Run the full Stitch SDK generation pipeline. Use when a new tool is added, or the SDK needs to be regenerated end-to-end.

Stitch SDK Pipeline

This skill orchestrates the full SDK generation pipeline — from capturing MCP tool schemas to publishing a tested, validated package. Use this when:

  • The Stitch MCP server adds or changes tools
  • You need to regenerate the SDK from scratch
  • You want to verify the pipeline is healthy

[!IMPORTANT] Stage 2 is the only step requiring agent intelligence. All other stages are deterministic scripts. For Stage 2, use the stitch-sdk-domain-design skill.


Prerequisites

  • STITCH_API_KEY environment variable set
  • bun installed
  • Working directory: project root (stitch-sdk/)

Pipeline Stages

Stage 1: Capture Tool Schemas 🤖
bash
// turbo
npm run capture

Connects to the Stitch MCP server, calls tools/list, and writes the raw schemas to packages/sdk/generated/tools-manifest.json. Updates the manifest section of stitch-sdk.lock.

Output: packages/sdk/generated/tools-manifest.json (includes inputSchema + outputSchema for every tool)

When to skip: If tools-manifest.json is already up to date and no server-side changes occurred.


Stage 2: Domain Design 🧠 (Agent)

Use the stitch-sdk-domain-design skill for this stage.

Read tools-manifest.json and edit packages/sdk/generated/domain-map.json to map tools → classes → methods.

Key decisions at this stage:

  • Which class owns each tool?
  • What are the arg routing rules (self, param, computed, selfArray)?
  • What is the response projection path?
  • Should the method cache data from the construction response?

Input: tools-manifest.json + scripts/ir-schema.ts (the canonical IR contract) Output: packages/sdk/generated/domain-map.json

When to skip: If domain-map.json already has the correct bindings and you only changed ir-schema.ts or generate-sdk.ts.


Stage 3: Generate TypeScript 🤖
bash
// turbo
npm run generate

Validates the IR (Zod schema) and every projection (against outputSchema), then emits TypeScript files via ts-morph into packages/sdk/generated/src/.

Output: packages/sdk/generated/src/*.ts + updated stitch-sdk.lock

If this fails with a projection error, go back to Stage 2 and fix domain-map.json.


Stage 4: Build 🤖
bash
// turbo
npm run build

TypeScript compilation: packages/sdk/ → packages/sdk/dist/.


Stage 5: Unit Tests 🤖
bash
// turbo
npm run test

Runs core unit tests (vitest) — mocked callTool, verifying generated method signatures, caching, and error handling.


Stage 6: Script Tests 🤖
bash
// turbo
npm run test:scripts

Runs contract tests (IR schema acceptance/rejection) and logic tests (expression builders) using bun:test.


Stage 7: E2E Tests 🤖
bash
npm run test:e2e

Live API tests against the built package. Requires STITCH_API_KEY (and GEMINI_API_KEY for AI SDK tests). Two test suites:

  • live.test.ts — Direct SDK calls: create projects, generate screens, verify responses.
  • ai-sdk-e2e.test.ts — AI SDK integration via stitchTools(): Gemini autonomously calls Stitch tools, generates designs, extracts HTML + Tailwind config, produces modular React components, validates via SWC, and scaffolds a Vite preview app at .stitch/preview/.

Stage 8: Lock Validation 🤖
bash
// turbo
npm run validate:generated

Verifies that stitch-sdk.lock hashes match the actual generated files. Catches drift (someone edited generated files manually or forgot to regenerate).

[!IMPORTANT] Always run after Stage 3 (Generate). If you run Capture (Stage 1) then Validate without re-generating, the hashes will mismatch because the manifest hash changed.


Show full SKILL.md (338 more words)Show less
Stage 9: Skill Audit 🧠 (Agent)

After the pipeline passes, audit agent skills for freshness. Read the current source of truth and update any skills that reference stale methods, args, or examples.

Inputs:

  • packages/sdk/src/index.ts (public surface)
  • Generated class files in packages/sdk/generated/src/
  • packages/sdk/src/spec/errors.ts (error codes)
  • packages/sdk/src/spec/client.ts (config schema)

Skills to audit (in priority order):

  1. stitch-sdk-usage — highest churn, references specific methods and constructor signatures
  2. stitch-sdk-readme — must document stitchTools(), toolDefinitions, and AI SDK integration examples
  3. stitch-sdk-development — check cache examples match current domain-map patterns
  4. stitch-sdk-domain-design — check code examples in the cache section

Skills to skip: stitch-sdk-pipeline (self-referential), red-green-yellow (generic methodology).

What to check:

  • Every method name in a code example exists on its class
  • Every import in an example matches an export in index.ts
  • Constructor signatures match the actual constructors
  • Config fields match StitchConfigSchema
  • Error codes match StitchErrorCode

When to skip: If only infrastructure code changed (packages/sdk/src/client.ts, packages/sdk/src/proxy/) and no public API surface changed.


Quick Reference

Full pipeline (script stages only)
bash
npm run pipeline

Runs Stage 1 → 3 → 4 → 5 in sequence. Does not include Stage 2 (agent), Stage 7 (e2e), or Stage 9 (skill audit).

Starting from a specific stage
ScenarioStart from
New tool added to MCP serverStage 1
Need to change how a tool maps to a methodStage 2
Changed ir-schema.ts or generate-sdk.tsStage 3
Changed code in packages/sdk/src/ (client, errors)Stage 4
Just want to verify everything worksStage 5
Changed AI SDK tools adapter or tool definitionsStage 5
Public API surface changedStage 9
Key files
FileLocationRole
tools-manifest.jsonpackages/sdk/generated/Raw MCP tool schemas (Stage 1 output)
domain-map.jsonpackages/sdk/generated/IR: tool → class → method mappings (Stage 2 output)
tool-definitions.tspackages/sdk/generated/src/Generated JSON Schema tool definitions for AI SDK
tools-adapter.tspackages/sdk/src/stitchTools() — AI SDK v6 adapter (imported via @google/stitch-sdk/ai)
ir-schema.tsscripts/Zod schema defining valid IR structure
tool-schema.tsscripts/TypeScript types for JSON Schema
generate-sdk.tsscripts/ts-morph codegen (Stage 3)
stitch-sdk.lockpackages/sdk/generated/Integrity hashes for drift detection
stitch-html.tspackages/sdk/test/helpers/Stitch HTML parser (Tailwind config + font extraction)
component-validator.tspackages/sdk/test/helpers/SWC AST validator for generated React components

© google-labs-code, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/stitch-sdk-pipeline of google-labs-code/stitch-sdk.

Open the folder on GitHubat commit e3f8ece

Compare with similar skills

Stitch SDK Pipeline next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Stitch SDK Pipeline compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Stitch SDK Pipeline this skillgoogle-labs-code/stitch-sdk1.8k—~2kAutomated safety check: PassApache-2.0
Java SDK E2E Test with Replay Snapshotgithub/copilot-sdk11k—~1.8kAutomated safety check: PassMIT
RStudio Selenium to Playwright Migrationrstudio/rstudio5.1k—~3.6kAutomated safety check: PassCustom licence
Interactive CLI Testing With tui-testslopus/happy24k—~603Automated safety check: PassMIT
Svelte Testingspences10/sveltest113—~579Automated safety check: PassMIT
E2E Testcrowdin/crowdin-api-client-js139—~893Automated safety check: NotesMIT

Similar skills

  • Official

    Creates a Java SDK end-to-end test for the Copilot SDK that runs against a recorded YAML snapshot through a replay proxy, so CI needs no real authentication.

    11k GitHub stars~1.8k tokensUpdated today
    Testing & QAAuto-check passed
  • Converts RStudio Python Selenium electron tests into TypeScript Playwright tests, checking each against a live RStudio before counting it as migrated.

    5.1k GitHub stars~3.6k tokensUpdated today
    Testing & QAAuto-check passed
  • Tests interactive CLI and TUI programs with Microsoft's tui-test, driving prompts, arrow keys and screen output in a real pseudo-terminal.

    24k GitHub stars~603 tokensUpdated yesterday
    Testing & QAAuto-check passed
  • Svelte Testing

    spences10/sveltest

    Fix and create Svelte 5 tests with vitest-browser-svelte and Playwright.

    113 GitHub stars~579 tokensUpdated today
    Testing & QAAuto-check passed
  • E2E Test

    crowdin/crowdin-api-client-js

    Run end-to-end tests against the real Crowdin or Crowdin Enterprise API using credentials from .env.

    139 GitHub stars~893 tokensUpdated yesterday
    Testing & QAAuto-check: notes
  • Playwright Login Flows

    andrewyng/context-hub

    Collects reusable Playwright patterns for logging in during end-to-end tests: password forms, OAuth redirects, saved browser state and TOTP two-factor codes.

    14k GitHub stars~715 tokensUpdated 4 mo ago
    Testing & QAAuto-check passed

More from google-labs-code/stitch-sdk

All 9 skills in this repo
  • Stitch SDK Development

    google-labs-code/stitch-sdk

    Official

    Develop the Stitch SDK. An agent skill from google-labs-code/stitch-sdk.

    1.8k GitHub stars~3.4k tokensUpdated 7 days ago
    Auto-check passed
  • Stitch SDK Domain Design

    google-labs-code/stitch-sdk

    Official

    Design the domain model for the Stitch SDK. An agent skill from google-labs-code/stitch-sdk.

    1.8k GitHub stars~2.4k tokensUpdated 7 days ago
    Auto-check passed
  • Stitch SDK Readme

    google-labs-code/stitch-sdk

    Official

    Generate or update the README for the Stitch SDK. An agent skill from google-labs-code/stitch-sdk.

    1.8k GitHub stars~1.8k tokensUpdated 7 days ago
    Auto-check passed
  • Stitch SDK Usage

    google-labs-code/stitch-sdk

    Official

    Use the Stitch SDK to generate, edit, and iterate on UI screens from text prompts, manage projects, and retrieve screen HTML/images.

    1.8k GitHub stars~2.8k tokensUpdated 7 days ago
    Auto-check passed
  • TDD Red Green Refactor

    google-labs-code/stitch-sdk

    Official

    Enforces a disciplined Red-Green-Refactor (TDD) workflow in TypeScript/Node.js.

    1.8k GitHub stars~755 tokensUpdated 7 days ago
    Auto-check passed
  • Typed Service Contracts

    google-labs-code/stitch-sdk

    Official

    Architecture standard for building robust, type-safe TypeScript services using the "Spec and Handler" pattern.

    1.8k GitHub stars~1.4k tokensUpdated 7 days ago
    Auto-check passed

Categories

Questions about Stitch SDK Pipeline

What does Stitch SDK Pipeline do?

Run the full Stitch SDK generation pipeline. An agent skill from google-labs-code/stitch-sdk. Stitch SDK Pipeline is an agent skill from google-labs-code/stitch-sdk, published by the product's own GitHub organization. Run the full Stitch SDK generation pipeline.

When should I use Stitch SDK Pipeline?

Stitch SDK Pipeline fits situations like: A new tool is added; the SDK needs to be regenerated end-to-end.

How do I install Stitch SDK Pipeline in Claude Code?

Run `npx skills add google-labs-code/stitch-sdk --skill stitch-sdk-pipeline -a claude-code`. Or copy the skill folder (.agents/skills/stitch-sdk-pipeline in google-labs-code/stitch-sdk) into .claude/skills/stitch-sdk-pipeline in your project. Claude Code loads it when a task matches its description.

How do I install Stitch SDK Pipeline in Codex?

Run `npx skills add google-labs-code/stitch-sdk --skill stitch-sdk-pipeline -a codex`. Or copy the skill folder (.agents/skills/stitch-sdk-pipeline in google-labs-code/stitch-sdk) into .agents/skills/stitch-sdk-pipeline in your project. Codex loads it when a task matches its description.

Can I use Stitch SDK Pipeline in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add google-labs-code/stitch-sdk --skill stitch-sdk-pipeline -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/stitch-sdk-pipeline, .gemini/skills/stitch-sdk-pipeline, .github/skills/stitch-sdk-pipeline and .opencode/skills/stitch-sdk-pipeline in your project.

What does Stitch SDK Pipeline need to run?

Going by SKILL.md and its folder, Stitch SDK Pipeline needs the command-line tools its instructions call (npm) and credentials named STITCH_API_KEY and GEMINI_API_KEY. Our summary lists: A credential in STITCH_API_KEY; A credential in GEMINI_API_KEY.

Does Stitch SDK Pipeline access the network?

SKILL.md contains no URLs. Its commands use npm, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Stitch SDK Pipeline safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Stitch SDK Pipeline use?

Stitch SDK Pipeline is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Stitch SDK Pipeline use?

About 2k tokens (SKILL.md is roughly 7.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Stitch SDK Pipeline?

Skills that share tags, products or a category with Stitch SDK Pipeline: Java SDK E2E Test with Replay Snapshot (github/copilot-sdk, 11k stars), RStudio Selenium to Playwright Migration (rstudio/rstudio, 5.1k stars), Interactive CLI Testing With tui-test (slopus/happy, 24k stars) and Svelte Testing (spences10/sveltest, 113 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Stitch SDK Pipeline?

google-labs-code (a GitHub organization, an official publisher) maintains it in google-labs-code/stitch-sdk, which has 1,826 GitHub stars. The repository holds 9 skills in this directory. The repository was last updated on October 1, 2026.

Source: google-labs-code/stitch-sdk on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.