Run the full Stitch SDK generation pipeline. Use when a new tool is added, or the SDK needs to be regenerated end-to-end.
npx skills add https://github.com/google-labs-code/stitch-sdk --skill 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:
> [!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.
STITCH_API_KEY environment variable setbun installedstitch-sdk/)// 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.
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:
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.
// 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.
// turbo
npm run build
TypeScript compilation: packages/sdk/ → packages/sdk/dist/.
// turbo
npm run test
Runs core unit tests (vitest) — mocked callTool, verifying generated method signatures, caching, and error handling.
// turbo
npm run test:scripts
Runs contract tests (IR schema acceptance/rejection) and logic tests (expression builders) using bun:test.
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/.// 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.
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)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):
stitch-sdk-usage — highest churn, references specific methods and constructor signaturesstitch-sdk-readme — must document stitchTools(), toolDefinitions, and AI SDK integration examplesstitch-sdk-development — check cache examples match current domain-map patternsstitch-sdk-domain-design — check code examples in the cache sectionSkills to skip: stitch-sdk-pipeline (self-referential), red-green-yellow (generic methodology).
What to check:
index.tsStitchConfigSchemaStitchErrorCodeWhen to skip: If only infrastructure code changed (packages/sdk/src/client.ts, packages/sdk/src/proxy/) and no public API surface changed.
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).
| Scenario | Start from |
| ---------------------------------------------------- | ---------- |
| New tool added to MCP server | Stage 1 |
| Need to change how a tool maps to a method | Stage 2 |
| Changed ir-schema.ts or generate-sdk.ts | Stage 3 |
| Changed code in packages/sdk/src/ (client, errors) | Stage 4 |
| Just want to verify everything works | Stage 5 |
| Changed AI SDK tools adapter or tool definitions | Stage 5 |
| Public API surface changed | Stage 9 |
| File | Location | Role |
| ------------------------ | ----------------------------- | -------------------------------------------------------------------------- |
| tools-manifest.json | packages/sdk/generated/ | Raw MCP tool schemas (Stage 1 output) |
| domain-map.json | packages/sdk/generated/ | IR: tool → class → method mappings (Stage 2 output) |
| tool-definitions.ts | packages/sdk/generated/src/ | Generated JSON Schema tool definitions for AI SDK |
| tools-adapter.ts | packages/sdk/src/ | stitchTools() — AI SDK v6 adapter (imported via @google/stitch-sdk/ai) |
| ir-schema.ts | scripts/ | Zod schema defining valid IR structure |
| tool-schema.ts | scripts/ | TypeScript types for JSON Schema |
| generate-sdk.ts | scripts/ | ts-morph codegen (Stage 3) |
| stitch-sdk.lock | packages/sdk/generated/ | Integrity hashes for drift detection |
| stitch-html.ts | packages/sdk/test/helpers/ | Stitch HTML parser (Tailwind config + font extraction) |
| component-validator.ts | packages/sdk/test/helpers/ | SWC AST validator for generated React components |
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).
Automatically creates user-facing changelogs from git commits by analyzing commit history, categorizing changes, and transforming technical commits into clear, customer-friendly release notes. Turns hours of manual changelog writing into minutes of automated generation.
Use when implementation is complete, all tests pass, and you need to decide how to integrate the work - guides completion of development work by presenting structured options for merge, PR, or cleanup
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).
React Native and Expo best practices for building performant mobile apps. Use when building React Native components, optimizing list performance, implementing animations, or working with native modules. Triggers on tasks involving React Native, Expo, mobile performance, or native platform APIs.
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.
Next.js best practices - file conventions, RSC boundaries, data patterns, async APIs, metadata, error handling, route handlers, image/font optimization, bundling
Use when starting feature work that needs isolation from current workspace or before executing implementation plans - creates isolated git worktrees with smart directory selection and safety verification
Take google-labs-code/stitch-sdk-pipeline from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.