stitch-generate

stitch-generate is a command for Claude Code from joaquimscosta/arkhe-claude-plugins. It costs 16 tokens per session (911 once invoked), scanned A, original, MIT.

A command that runs the full Google Stitch process: it writes or reads a screen prompt, sends it to Stitch, and retrieves the resulting images and code.

In plain words
What is it for?
Use it with a short product brief or an existing prompt file to create Stitch screens from start to finish.
Why use it?
It combines prompt preparation and screen generation in one workflow instead of requiring separate commands. It stops with a clear message if the Stitch connection is not configured.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter.

Good fit Use it with a short product brief or an existing prompt file to create Stitch screens from start to finish.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/joaquimscosta/arkhe-claude-plugins/stitch-generate
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/joaquimscosta/arkhe-claude-plugins

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for stitch-generate

README.md
[![agentmods](https://agentmods.dev/badge/commands/joaquimscosta/arkhe-claude-plugins/stitch-generate/github.svg)](https://agentmods.dev/commands/joaquimscosta/arkhe-claude-plugins/stitch-generate)
Your own site
<a href="https://agentmods.dev/commands/joaquimscosta/arkhe-claude-plugins/stitch-generate"><img src="https://agentmods.dev/badge/commands/joaquimscosta/arkhe-claude-plugins/stitch-generate/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for stitch-generate

Your own site · 80×15
<a href="https://agentmods.dev/commands/joaquimscosta/arkhe-claude-plugins/stitch-generate"><img src="https://agentmods.dev/badge/commands/joaquimscosta/arkhe-claude-plugins/stitch-generate.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 16 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 911 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00016 $0.00911
Opus 5.5 $0.00006 $0.00364
Sonnet 5.5 $0.00003 $0.00182
Haiku 4.5 $0.00002 $0.00091

Measured yesterday against content hash e2daffe9ba06, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

stitch-generate scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/google-stitch/commands/stitch-generate.md · 119 lines

How it starts

The opening of the file, as written. The whole thing — 119 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Stitch Generate Command

End-to-end pipeline: author Stitch prompts, generate screens via MCP, and fetch resulting images and code.

Usage

/stitch-generate "dashboard for fitness app"
/stitch-generate @design-intent/google-stitch/dashboard/prompt-v1.md

Inputs

  • $ARGUMENTS: Either a raw text brief or a path to an existing prompt file.

Execution

Step 1: Check MCP Availability

Verify Stitch MCP tools are available (look for generate_screen_from_text).

  • If not available: Display clear message and stop:
    Stitch MCP is not configured. Run /stitch-setup for guided setup.
    
  • If available: Continue to Step 2.

Step 2: Resolve Input

Determine input type from $ARGUMENTS:

  • If path to existing prompt file (starts with @ or ends with .md):
    • Read the file directly
    • Extract feature name from directory path
  • If raw text brief:
    • Invoke the authoring-stitch-prompts skill to create the prompt file
    • Use the generated file path for subsequent steps

Step 3: Parse Prompt Sections

Read the prompt file and parse sections separated by ---:

  1. Identify <!-- Layout: ... --> and <!-- Component: ... --> markers
  2. Extract each section's text content
  3. Build ordered list of prompts to generate

Step 4: Create or Select Project

  1. Derive project name from feature slug (e.g., "dashboard" -> "Dashboard Design")
  2. Call list_projects to check for existing project with matching name
  3. If found: use existing project
  4. If not found: call create_project with derived name

Step 5: Generate Screens

For each parsed prompt section:

  1. Call generate_screen_from_text with the section's prompt text
  2. Use the section label (from HTML comment) as screen name
  3. Track generated screen IDs for fetching
  4. If generation fails for a section, log the error and continue with remaining sections

Step 6: Fetch Results

For each successfully generated screen:

  1. Call fetch_screen_image to get the rendered image
  2. Save image to design-intent/google-stitch/{feature}/exports/{screen-name}.png
  3. Optionally: call fetch_screen_code to get generated code
  4. Save code to design-intent/google-stitch/{feature}/code/{screen-name}/

Read the full file on GitHub · 119 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 119 lines · 16 tokens per session scan A e2daffe9ba06

Subscribe to this mod's changes

stitch-generate is a command published in the GitHub repository joaquimscosta/arkhe-claude-plugins (21 stars, last pushed yesterday), licensed MIT. It adds 16 tokens to every session and 911 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-16.