
stitch-sdk-readme
Generate or update the README for the Stitch SDK. Use the Bookstore Test structure and source the current API from the codebase. Use when the README needs to be written or updated.
- Installs
- 297
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/google-labs-code/stitch-sdk --skill stitch-sdk-readme- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads stitch-sdk-readme automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
Stitch SDK README Generator
This skill produces the README for @google/stitch-sdk. It combines a structural strategy (the Bookstore Test) with instructions for sourcing the current API from the codebase — so the README stays accurate as the SDK evolves.
How to Source the Current API
Do not hard-code the API surface. Read it from the codebase at invocation time:
| What you need | Where to find it |
|---|---|
| Public exports (full surface) | packages/sdk/src/index.ts |
| Domain class methods + signatures | Source files for each exported class (sdk.ts, project.ts, screen.ts) |
| Generated method bindings | packages/sdk/generated/domain-map.json → bindings[] array |
| Handwritten methods | Methods in class source files that aren't in domain-map bindings (e.g. Screen.edit, Screen.variants) |
| AI SDK tools adapter | packages/sdk/src/ai.ts → subpath entry for stitchTools() |
| Generated tool definitions | packages/sdk/generated/src/tool-definitions.ts → JSON Schema for each tool |
| Tool client methods | packages/sdk/src/client.ts |
| Error codes | packages/sdk/src/spec/errors.ts → StitchErrorCode |
| Config options | packages/sdk/src/spec/client.ts → StitchConfigSchema |
| Proxy config | packages/sdk/src/proxy/core.ts |
After reading these files, you have the complete API surface. Structure it using the Bookstore Test template below.
The Bookstore Test
A reader decides whether to use a library the same way a person decides to buy a book: they glance at the cover, read the inner flap, then commit to reading the book. The README must earn the reader's attention at each stage.
The Cover
A single sentence stating what problem this library solves — not what the library is. The reader should recognize their own situation. No taglines, no badges, no logos.
For this SDK, the cover is about generating UI from text and extracting HTML/screenshots programmatically.
Good: "Generate UI screens from text prompts and extract their HTML and screenshots programmatically." Bad: "The official TypeScript SDK for Google Stitch, a powerful AI-powered UI generation platform."
The Inner Flap
Immediately show the library in use. Code first, not setup.
Primary workflow — the punchline everything in the SDK exists to produce:
project(id) → generate → getHtml
Show this as the first code block, with one line noting the env var requirement. Do not show installation, imports, or config before this. Show callTool("create_project", ...) separately for project creation.
Secondary workflows — reveal depth progressively:
- Listing and iterating over existing projects/screens
- Editing a screen and generating variants
- Tool access via singleton (
stitch.listTools(),stitch.callTool()) — zero setup - Explicit configuration via
StitchToolClient(custom API key, base URL) - AI SDK integration via
stitchTools()— import from@google/stitch-sdk/ai, showgenerateTextwithtools: stitchTools()andstepCountIs
Rules for this section:
- No setup first. One line mentioning
STITCH_API_KEYis enough before the first example. - Dual install paths. Show
npm install @google/stitch-sdkfirst (core SDK, standalone). Then shownpm install @google/stitch-sdk aifor AI SDK users. Theaipackage is only needed when importing from@google/stitch-sdk/ai. - Straightforward language. No "powerful", "seamless", "robust", "enterprise-grade".
- Working examples. Every code block must be valid, runnable code — not fragments with
// ...elisions. - Progressive complexity. Simplest invocation first, then deeper capabilities.
Reading the Book
The reader is committed. Document the full API as a reference.
Structure by class in this order: Stitch → Project → DesignSystem → Screen → StitchToolClient → toolDefinitions / toolMap → stitchTools() (AI SDK) → StitchProxy → stitch singleton.
Each entry should have:
- What it does (one line)
- Usage example (minimal, runnable)
- Parameters (table)
- Return type and error behavior
Setup, authentication, and configuration go here — after the reader has already decided the library is worth using.
Tone
Write like a colleague explaining their work to another engineer. Be direct. Be specific. Don't sell — inform. If a feature has limitations, state them. If setup is complex, say so.
Validation
After generating the README, verify:
- Can a reader understand what the library does in under 10 seconds?
- Is there a runnable code example within the first scroll?
- Does setup/config appear after the first code example?
- Is every code block valid, copy-pasteable code?
- Is the language descriptive rather than promotional?
- Does the reference section cover every public export from
index.ts? - Every method name in examples exists in its class source file
- Every import in examples matches an export in
index.ts - All three modalities are documented: domain classes (scripts),
StitchToolClient(agents),stitchTools()(AI SDK)
Anti-patterns
| Anti-pattern | Why it fails |
|---|---|
| Leading with badges, logos, or status shields | Visual noise before the reader knows what the library does |
| "Getting Started" as the first section | Forces setup before demonstrating value |
| Feature bullet lists without code | Tells instead of shows |
| "Easy to use", "simple", "just works" | Self-congratulatory claims that invite skepticism |
| Long install/config blocks before any usage | Asks for investment before demonstrating return |
| Collapsible sections hiding core API docs | Buries the content committed readers came for |
| Hard-coding the API in docs without sourcing | Goes stale when tools are added |
FAQ
What does the stitch-sdk-readme skill do?
Generate or update the README for the Stitch SDK. Use the Bookstore Test structure and source the current API from the codebase. Use when the README needs to be written or updated.
How do I install stitch-sdk-readme?
Run npx skills add https://github.com/google-labs-code/stitch-sdk --skill stitch-sdk-readme in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/stitch-sdk-readme/ (personal) or .claude/skills/stitch-sdk-readme/ (project).
Which AI agents can use stitch-sdk-readme?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is stitch-sdk-readme safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains stitch-sdk-readme?
It is published by google-labs-code in google-labs-code/stitch-sdk, and it is an official skill from the maker of the technology it covers. It has 297 recorded installs.
More from google-labs-code/stitch-sdk
stitch-sdk-usage
google-labs-code/stitch-sdk
Use the Stitch SDK to generate, edit, and iterate on UI screens from text prompts, manage projects, and retrieve screen HTML/images. Use when the user wants to consume the SDK in their application.
stitch-sdk-development
google-labs-code/stitch-sdk
Develop the Stitch SDK. Covers the generation pipeline, dual modality (agent vs SDK), error handling, and Traffic Light (Red-Green-Yellow) implementation workflow. Use when adding features, fixing bugs, or understanding the architecture.
stitch-sdk-domain-design
google-labs-code/stitch-sdk
Design the domain model for the Stitch SDK. Use when mapping MCP tools to domain classes and bindings in domain-map.json. This is Stage 2 of the generation pipeline.
tdd-red-green-refactor
google-labs-code/stitch-sdk
Open the skill to read its SKILL.md instructions.
stitch-sdk-pipeline
google-labs-code/stitch-sdk
Open the skill to read its SKILL.md instructions.
stitch-sdk-bug-bash
google-labs-code/stitch-sdk
Find bugs in the Stitch SDK using a real API key. Covers standard functional edges and tricky situations.
Popular docs & writing skills
grill-with-docs
mattpocock/skills
A relentless interview to sharpen a plan or design, which also creates docs (ADR's and glossary) as we go.
lark-markdown
open.feishu.cn
飞书 Markdown:查看、创建、上传、编辑和比较飞书中的原生 Markdown 文件。当用户要操作飞书 Markdown 文件,或比较其远端版本及本地草稿时使用。纯本地 Markdown 文件操作不触发本 skill。不负责将 Markdown 导入为飞书在线文档,也不负责文件搜索、权限、评论、移动、删除等云空间管理操作。
writing-beats
mattpocock/skills
Writing, exploit; assemble raw material into a journey of beats, grounding each term before a beat leans on it.
writing-shape
mattpocock/skills
Writing, exploit: shape raw material into an article, paragraph by paragraph.
writing-fragments
mattpocock/skills
Writing, explore: mine raw fragments, no structure yet.
writing-for-agents
mattpocock/skills
Writing documents for agents. Use when creating or editing skills, or modifying AGENTS.md or CLAUDE.md.