Skip to content

A library of Agent Skills designed to work with the Stitch MCP server. Each skill follows the Agent Skills open standard, for compatibility with coding agents such as Antigravity, Gemini CLI, Claude Code, Cursor.

TypeScript

feat: add allowed_tools to DESIGN.md skill (#5)

David Easta697ca5b5603
diff --git a/skills/design-md/SKILL.md b/skills/design-md/SKILL.md
index 29d5dc2..c29a0fe 100644
--- a/skills/design-md/SKILL.md
+++ b/skills/design-md/SKILL.md
@@ -1,6 +1,11 @@
---
name: design-md
description: Analyze Stitch projects and synthesize a semantic design system into DESIGN.md files
+allowed-tools:
+ - "stitch*:*"
+ - "Read"
+ - "Write"
+ - "web_fetch"
---
# Stitch DESIGN.md Skill
@@ -21,6 +26,41 @@ This skill helps you create `DESIGN.md` files that serve as the "source of truth
The `DESIGN.md` file will serve as the "source of truth" for prompting Stitch to generate new screens that align perfectly with the existing design language. Stitch interprets design through "Visual Descriptions" supported by specific color values.
+## Retrieval and Networking
+
+To analyze a Stitch project, you must retrieve screen metadata and design assets using the Stitch MCP Server tools:
+
+1. **Namespace discovery**: Run `list_tools` to find the Stitch MCP prefix. Use this prefix (e.g., `mcp_stitch:`) for all subsequent calls.
+
+2. **Project lookup** (if Project ID is not provided):
+ - Call `[prefix]:list_projects` with `filter: "view=owned"` to retrieve all user projects
+ - Identify the target project by title or URL pattern
+ - Extract the Project ID from the `name` field (e.g., `projects/13534454087919359824`)
+
+3. **Screen lookup** (if Screen ID is not provided):
+ - Call `[prefix]:list_screens` with the `projectId` (just the numeric ID, not the full path)
+ - Review screen titles to identify the target screen (e.g., "Home", "Landing Page")
+ - Extract the Screen ID from the screen's `name` field
+
+4. **Metadata fetch**:
+ - Call `[prefix]:get_screen` with both `projectId` and `screenId` (both as numeric IDs only)
+ - This returns the complete screen object including:
+ - `screenshot.downloadUrl` - Visual reference of the design
+ - `htmlCode.downloadUrl` - Full HTML/CSS source code
+ - `width`, `height`, `deviceType` - Screen dimensions and target platform
+ - Project metadata including `designTheme` with color and style information
+
+5. **Asset download**:
+ - Use `web_fetch` or `read_url_content` to download the HTML code from `htmlCode.downloadUrl`
+ - Optionally download the screenshot from `screenshot.downloadUrl` for visual reference
+ - Parse the HTML to extract Tailwind classes, custom CSS, and component patterns
+
+6. **Project metadata extraction**:
+ - Call `[prefix]:get_project` with the project `name` (full path: `projects/{id}`) to get:
+ - `designTheme` object with color mode, fonts, roundness, custom colors
+ - Project-level design guidelines and descriptions
+ - Device type preferences and layout principles
+
## Analysis & Synthesis Instructions
### 1. Extract Project Identity (JSON)