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
create a new stitch-design skill, deprecate design-md and enhance-prompt
jilinxia01daeeb0c548
diff --git a/README.md b/README.mdindex ecac627..97c7c73 100644--- a/README.md+++ b/README.md@@ -16,18 +16,11 @@ npx skills add google-labs-code/stitch-skills --skill react:components --global## Available Skills-### design-md-Analyzes Stitch projects and generates comprehensive `DESIGN.md` files documenting design systems in natural, semantic language optimized for Stitch screen generation.+### stitch-design+Unified entry point for Stitch design work. Handles prompt enhancement (UI/UX keywords, atmosphere), design system synthesis (.stitch/DESIGN.md), and high-fidelity screen generation/editing via Stitch MCP.```bash-npx skills add google-labs-code/stitch-skills --skill design-md --global-```--### react-components-Converts Stitch screens to React component systems with automated validation and design token consistency.--```bash-npx skills add google-labs-code/stitch-skills --skill react:components --global+npx skills add google-labs-code/stitch-skills --skill stitch-design --global```### stitch-loop@@ -37,11 +30,11 @@ Generates a complete multi-page website from a single prompt using Stitch, withnpx skills add google-labs-code/stitch-skills --skill stitch-loop --global```-### enhance-prompt-Transforms vague UI ideas into polished, Stitch-optimized prompts. Enhances specificity, adds UI/UX keywords, injects design system context, and structures output for better generation results.+### react-components+Converts Stitch screens to React component systems with automated validation and design token consistency.```bash-npx skills add google-labs-code/stitch-skills --skill enhance-prompt --global+npx skills add google-labs-code/stitch-skills --skill react:components --global```### remotiondiff --git a/skills/design-md/README.md b/skills/design-md/README.mddeleted file mode 100644index 8f52207..0000000--- a/skills/design-md/README.md+++ /dev/null@@ -1,34 +0,0 @@-# Stitch Design System Documentation Skill--## Install--```bash-npx skills add google-labs-code/stitch-skills --skill design-md --global-```--## Example Prompt--```text-Analyze my Furniture Collection project's Home screen and generate a comprehensive DESIGN.md file documenting the design system.-```--## Skill Structure--This repository follows the **Agent Skills** open standard. Each skill is self-contained with its own logic, workflow, and reference materials.--```text-design-md/-├── SKILL.md — Core instructions & workflow-├── examples/ — Sample DESIGN.md outputs-└── README.md — This file-```--## How it Works--When activated, the agent follows a structured design analysis pipeline:--1. **Retrieval**: Uses the Stitch MCP Server to fetch project screens, HTML code, and design metadata.-2. **Extraction**: Identifies design tokens including colors, typography, spacing, and component patterns.-3. **Translation**: Converts technical CSS/Tailwind values into descriptive, natural design language.-4. **Synthesis**: Generates a comprehensive DESIGN.md following the semantic design system format.-5. **Alignment**: Ensures output follows Stitch Effective Prompting Guide principles for optimal screen generation.diff --git a/skills/design-md/SKILL.md b/skills/design-md/SKILL.mddeleted file mode 100644index c29a0fe..0000000--- a/skills/design-md/SKILL.md+++ /dev/null@@ -1,172 +0,0 @@-----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--You are an expert Design Systems Lead. Your goal is to analyze the provided technical assets and synthesize a "Semantic Design System" into a file named `DESIGN.md`.--## Overview--This skill helps you create `DESIGN.md` files that serve as the "source of truth" for prompting Stitch to generate new screens that align perfectly with existing design language. Stitch interprets design through "Visual Descriptions" supported by specific color values.--## Prerequisites--- Access to the Stitch MCP Server-- A Stitch project with at least one designed screen-- Access to the Stitch Effective Prompting Guide: https://stitch.withgoogle.com/docs/learn/prompting/--## The Goal--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)-- Locate the Project Title-- Locate the specific Project ID (e.g., from the `name` field in the JSON)--### 2. Define the Atmosphere (Image/HTML)-Evaluate the screenshot and HTML structure to capture the overall "vibe." Use evocative adjectives to describe the mood (e.g., "Airy," "Dense," "Minimalist," "Utilitarian").--### 3. Map the Color Palette (Tailwind Config/JSON)-Identify the key colors in the system. For each color, provide:-- A descriptive, natural language name that conveys its character (e.g., "Deep Muted Teal-Navy")-- The specific hex code in parentheses for precision (e.g., "#294056")-- Its specific functional role (e.g., "Used for primary actions")--### 4. Translate Geometry & Shape (CSS/Tailwind)-Convert technical `border-radius` and layout values into physical descriptions:-- Describe `rounded-full` as "Pill-shaped"-- Describe `rounded-lg` as "Subtly rounded corners"-- Describe `rounded-none` as "Sharp, squared-off edges"--### 5. Describe Depth & Elevation-Explain how the UI handles layers. Describe the presence and quality of shadows (e.g., "Flat," "Whisper-soft diffused shadows," or "Heavy, high-contrast drop shadows").--## Output Guidelines--- **Language:** Use descriptive design terminology and natural language exclusively-- **Format:** Generate a clean Markdown file following the structure below-- **Precision:** Include exact hex codes for colors while using descriptive names-- **Context:** Explain the "why" behind design decisions, not just the "what"--## Output Format (DESIGN.md Structure)--```markdown-# Design System: [Project Title]-**Project ID:** [Insert Project ID Here]--## 1. Visual Theme & Atmosphere-(Description of the mood, density, and aesthetic philosophy.)--## 2. Color Palette & Roles-(List colors by Descriptive Name + Hex Code + Functional Role.)--## 3. Typography Rules-(Description of font family, weight usage for headers vs. body, and letter-spacing character.)--## 4. Component Stylings-* **Buttons:** (Shape description, color assignment, behavior).-* **Cards/Containers:** (Corner roundness description, background color, shadow depth).-* **Inputs/Forms:** (Stroke style, background).--## 5. Layout Principles-(Description of whitespace strategy, margins, and grid alignment.)-```--## Usage Example--To use this skill for the Furniture Collection project:--1. **Retrieve project information:**- ```- Use the Stitch MCP Server to get the Furniture Collection project- ```--2. **Get the Home page screen details:**- ```- Retrieve the Home page screen's code, image, and screen object information- ```--3. **Reference best practices:**- ```- Review the Stitch Effective Prompting Guide at:- https://stitch.withgoogle.com/docs/learn/prompting/- ```--4. **Analyze and synthesize:**- - Extract all relevant design tokens from the screen- - Translate technical values into descriptive language- - Organize information according to the DESIGN.md structure--5. **Generate the file:**- - Create `DESIGN.md` in the project directory- - Follow the prescribed format exactly- - Ensure all color codes are accurate- - Use evocative, designer-friendly language--## Best Practices--- **Be Descriptive:** Avoid generic terms like "blue" or "rounded." Use "Ocean-deep Cerulean (#0077B6)" or "Gently curved edges"-- **Be Functional:** Always explain what each design element is used for-- **Be Consistent:** Use the same terminology throughout the document-- **Be Visual:** Help readers visualize the design through your descriptions-- **Be Precise:** Include exact values (hex codes, pixel values) in parentheses after natural language descriptions--## Tips for Success--1. **Start with the big picture:** Understand the overall aesthetic before diving into details-2. **Look for patterns:** Identify consistent spacing, sizing, and styling patterns-3. **Think semantically:** Name colors by their purpose, not just their appearance-4. **Consider hierarchy:** Document how visual weight and importance are communicated-5. **Reference the guide:** Use language and patterns from the Stitch Effective Prompting Guide--## Common Pitfalls to Avoid--- ❌ Using technical jargon without translation (e.g., "rounded-xl" instead of "generously rounded corners")-- ❌ Omitting color codes or using only descriptive names-- ❌ Forgetting to explain functional roles of design elements-- ❌ Being too vague in atmosphere descriptions-- ❌ Ignoring subtle design details like shadows or spacing patternsdiff --git a/skills/design-md/examples/DESIGN.md b/skills/design-md/examples/DESIGN.mddeleted file mode 100644index be0855f..0000000--- a/skills/design-md/examples/DESIGN.md+++ /dev/null@@ -1,154 +0,0 @@-# Design System: Furniture Collections List-**Project ID:** 13534454087919359824--## 1. Visual Theme & Atmosphere--The Furniture Collections List embodies a **sophisticated, minimalist sanctuary** that marries the pristine simplicity of Scandinavian design with the refined visual language of luxury editorial presentation. The interface feels **spacious and tranquil**, prioritizing breathing room and visual clarity above all else. The design philosophy is gallery-like and photography-first, allowing each furniture piece to command attention as an individual art object.--The overall mood is **airy yet grounded**, creating an aspirational aesthetic that remains approachable and welcoming. The interface feels **utilitarian in its restraint** but elegant in its execution, with every element serving a clear purpose while maintaining visual sophistication. The atmosphere evokes the serene ambiance of a high-end furniture showroom where customers can browse thoughtfully without visual overwhelm.--**Key Characteristics:**-- Expansive whitespace creating generous breathing room between elements-- Clean, architectural grid system with structured content blocks-- Photography-first presentation with minimal UI interference-- Whisper-soft visual hierarchy that guides without shouting-- Refined, understated interactive elements-- Professional yet inviting editorial tone--## 2. Color Palette & Roles--### Primary Foundation-- **Warm Barely-There Cream** (#FCFAFA) – Primary background color. Creates an almost imperceptible warmth that feels more inviting than pure white, serving as the serene canvas for the entire experience.-- **Crisp Very Light Gray** (#F5F5F5) – Secondary surface color used for card backgrounds and content areas. Provides subtle visual separation while maintaining the airy, ethereal quality.--### Accent & Interactive-- **Deep Muted Teal-Navy** (#294056) – The sole vibrant accent in the palette. Used exclusively for primary call-to-action buttons (e.g., "Shop Now", "View all products"), active navigation links, selected filter states, and subtle interaction highlights. This sophisticated anchor color creates visual focus points without disrupting the serene neutral foundation.--### Typography & Text Hierarchy-- **Charcoal Near-Black** (#2C2C2C) – Primary text color for headlines and product names. Provides strong readable contrast while being softer and more refined than pure black.-- **Soft Warm Gray** (#6B6B6B) – Secondary text used for body copy, product descriptions, and supporting metadata. Creates clear typographic hierarchy without harsh contrast.-- **Ultra-Soft Silver Gray** (#E0E0E0) – Tertiary color for borders, dividers, and subtle structural elements. Creates separation so gentle it's almost imperceptible.--### Functional States (Reserved for system feedback)-- **Success Moss** (#10B981) – Stock availability, confirmation states, positive indicators-- **Alert Terracotta** (#EF4444) – Low stock warnings, error states, critical alerts-- **Informational Slate** (#64748B) – Neutral system messages, informational callouts--## 3. Typography Rules--**Primary Font Family:** Manrope-**Character:** Modern, geometric sans-serif with gentle humanist warmth. Slightly rounded letterforms that feel contemporary yet approachable.--### Hierarchy & Weights-- **Display Headlines (H1):** Semi-bold weight (600), generous letter-spacing (0.02em for elegance), 2.75-3.5rem size. Used sparingly for hero sections and major page titles.-- **Section Headers (H2):** Semi-bold weight (600), subtle letter-spacing (0.01em), 2-2.5rem size. Establishes clear content zones and featured collections.-- **Subsection Headers (H3):** Medium weight (500), normal letter-spacing, 1.5-1.75rem size. Product names and category labels.-- **Body Text:** Regular weight (400), relaxed line-height (1.7), 1rem size. Descriptions and supporting content prioritize comfortable readability.-- **Small Text/Meta:** Regular weight (400), slightly tighter line-height (1.5), 0.875rem size. Prices, availability, and metadata remain legible but visually recessive.-- **CTA Buttons:** Medium weight (500), subtle letter-spacing (0.01em), 1rem size. Balanced presence without visual aggression.--### Spacing Principles-- Headers use slightly expanded letter-spacing for refined elegance-- Body text maintains generous line-height (1.7) for effortless reading-- Consistent vertical rhythm with 2-3rem between related text blocks-- Large margins (4-6rem) between major sections to reinforce spaciousness--## 4. Component Stylings--### Buttons-- **Shape:** Subtly rounded corners (8px/0.5rem radius) – approachable and modern without appearing playful or childish-- **Primary CTA:** Deep Muted Teal-Navy (#294056) background with pure white text, comfortable padding (0.875rem vertical, 2rem horizontal)-- **Hover State:** Subtle darkening to deeper navy, smooth 250ms ease-in-out transition-- **Focus State:** Soft outer glow in the primary color for keyboard navigation accessibility-- **Secondary CTA (if needed):** Outlined style with Deep Muted Teal-Navy border, transparent background, hover fills with whisper-soft teal tint--### Cards & Product Containers-- **Corner Style:** Gently rounded corners (12px/0.75rem radius) creating soft, refined edges-- **Background:** Alternates between Warm Barely-There Cream and Crisp Very Light Gray based on layering needs-- **Shadow Strategy:** Flat by default. On hover, whisper-soft diffused shadow appears (`0 2px 8px rgba(0,0,0,0.06)`) creating subtle depth-- **Border:** Optional hairline border (1px) in Ultra-Soft Silver Gray for delicate definition when shadows aren't present-- **Internal Padding:** Generous 2-2.5rem creating comfortable breathing room for content-- **Image Treatment:** Full-bleed at the top of cards, square or 4:3 ratio, seamless edge-to-edge presentation--### Navigation-- **Style:** Clean horizontal layout with generous spacing (2-3rem) between menu items-- **Typography:** Medium weight (500), subtle uppercase, expanded letter-spacing (0.06em) for refined sophistication-- **Default State:** Charcoal Near-Black text-- **Active/Hover State:** Smooth 200ms color transition to Deep Muted Teal-Navy-- **Active Indicator:** Thin underline (2px) in Deep Muted Teal-Navy appearing below current section-- **Mobile:** Converts to elegant hamburger menu with sliding drawer--### Inputs & Forms-- **Stroke Style:** Refined 1px border in Soft Warm Gray-- **Background:** Warm Barely-There Cream with transition to Crisp Very Light Gray on focus-- **Corner Style:** Matching button roundness (8px/0.5rem) for visual consistency-- **Focus State:** Border color shifts to Deep Muted Teal-Navy with subtle outer glow-- **Padding:** Comfortable 0.875rem vertical, 1.25rem horizontal for touch-friendly targets-- **Placeholder Text:** Ultra-Soft Silver Gray, elegant and unobtrusive--### Product Cards (Specific Pattern)-- **Image Area:** Square (1:1) or landscape (4:3) ratio filling card width completely-- **Content Stack:** Product name (H3), brief descriptor, material/finish, price-- **Price Display:** Emphasized with semi-bold weight (600) in Charcoal Near-Black-- **Hover Behavior:** Gentle lift effect (translateY -4px) combined with enhanced shadow-- **Spacing:** Consistent 1.5rem internal padding below image--## 5. Layout Principles--### Grid & Structure-- **Max Content Width:** 1440px for optimal readability and visual balance on large displays-- **Grid System:** Responsive 12-column grid with fluid gutters (24px mobile, 32px desktop)-- **Product Grid:** 4 columns on large desktop, 3 on desktop, 2 on tablet, 1 on mobile-- **Breakpoints:**- - Mobile: <768px- - Tablet: 768-1024px- - Desktop: 1024-1440px- - Large Desktop: >1440px--### Whitespace Strategy (Critical to the Design)-- **Base Unit:** 8px for micro-spacing, 16px for component spacing-- **Vertical Rhythm:** Consistent 2rem (32px) base unit between related elements-- **Section Margins:** Generous 5-8rem (80-128px) between major sections creating dramatic breathing room-- **Edge Padding:** 1.5rem (24px) mobile, 3rem (48px) tablet/desktop for comfortable framing-- **Hero Sections:** Extra-generous top/bottom padding (8-12rem) for impactful presentation--### Alignment & Visual Balance-- **Text Alignment:** Left-aligned for body and navigation (optimal readability), centered for hero headlines and featured content-- **Image to Text Ratio:** Heavily weighted toward imagery (70-30 split) reinforcing photography-first philosophy-- **Asymmetric Balance:** Large hero images offset by compact, refined text blocks-- **Visual Weight Distribution:** Strategic use of whitespace to draw eyes to hero products and primary CTAs-- **Reading Flow:** Clear top-to-bottom, left-to-right pattern with intentional focal points--### Responsive Behavior & Touch-- **Mobile-First Foundation:** Core experience designed and perfected for smallest screens first-- **Progressive Enhancement:** Additional columns, imagery, and details added gracefully at larger breakpoints-- **Touch Targets:** Minimum 44x44px for all interactive elements (WCAG AAA compliant)-- **Image Optimization:** Responsive images with appropriate resolutions for each breakpoint, lazy-loading for performance-- **Collapsing Strategy:** Navigation collapses to hamburger, grid reduces columns, padding scales proportionally--## 6. Design System Notes for Stitch Generation--When creating new screens for this project using Stitch, reference these specific instructions:--### Language to Use-- **Atmosphere:** "Sophisticated minimalist sanctuary with gallery-like spaciousness"-- **Button Shapes:** "Subtly rounded corners" (not "rounded-md" or "8px")-- **Shadows:** "Whisper-soft diffused shadows on hover" (not "shadow-sm")-- **Spacing:** "Generous breathing room" and "expansive whitespace"--### Color References-Always use the descriptive names with hex codes:-- Primary CTA: "Deep Muted Teal-Navy (#294056)"-- Backgrounds: "Warm Barely-There Cream (#FCFAFA)" or "Crisp Very Light Gray (#F5F5F5)"-- Text: "Charcoal Near-Black (#2C2C2C)" or "Soft Warm Gray (#6B6B6B)"--### Component Prompts-- "Create a product card with gently rounded corners, full-bleed square product image, and whisper-soft shadow on hover"-- "Design a primary call-to-action button in Deep Muted Teal-Navy (#294056) with subtle rounded corners and comfortable padding"-- "Add a navigation bar with generous spacing between items, using medium-weight Manrope with subtle uppercase and expanded letter-spacing"--### Incremental Iteration-When refining existing screens:-1. Focus on ONE component at a time (e.g., "Update the product grid cards")-2. Be specific about what to change (e.g., "Increase the internal padding of product cards from 1.5rem to 2rem")-3. Reference this design system language consistentlydiff --git a/skills/enhance-prompt/README.md b/skills/enhance-prompt/README.mddeleted file mode 100644index 54d06cb..0000000--- a/skills/enhance-prompt/README.md+++ /dev/null@@ -1,34 +0,0 @@-# Stitch Enhance Prompt Skill--## Install--```bash-npx skills add google-labs-code/stitch-skills --skill enhance-prompt --global-```--## Example Prompt--```text-Enhance my prompt "make me a login page" for better Stitch generation results.-```--## Skill Structure--This repository follows the **Agent Skills** open standard. Each skill is self-contained with its own logic, workflow, and reference materials.--```text-enhance-prompt/-├── SKILL.md — Core instructions & workflow-├── references/ — UI/UX vocabulary and adjective palettes-└── README.md — This file-```--## How it Works--When activated, the agent follows a prompt enhancement pipeline:--1. **Assessment**: Evaluates the input for missing elements (platform, structure, visual style, colors).-2. **DESIGN.md Check**: Looks for an existing design system to inject; recommends creating one if missing.-3. **Enhancement**: Applies UI/UX keywords, vibe adjectives, and structured page sections.-4. **Formatting**: Outputs a Stitch-optimized prompt with design system block and numbered structure.-5. **Delivery**: Returns enhanced text for user review, with optional file output.diff --git a/skills/enhance-prompt/SKILL.md b/skills/enhance-prompt/SKILL.mddeleted file mode 100644index 04aec68..0000000--- a/skills/enhance-prompt/SKILL.md+++ /dev/null@@ -1,204 +0,0 @@-----name: enhance-prompt-description: Transforms vague UI ideas into polished, Stitch-optimized prompts. Enhances specificity, adds UI/UX keywords, injects design system context, and structures output for better generation results.-allowed-tools:- - "Read"- - "Write"------# Enhance Prompt for Stitch--You are a **Stitch Prompt Engineer**. Your job is to transform rough or vague UI generation ideas into polished, optimized prompts that produce better results from Stitch.--## Prerequisites--Before enhancing prompts, consult the official Stitch documentation for the latest best practices:--- **Stitch Effective Prompting Guide**: https://stitch.withgoogle.com/docs/learn/prompting/--This guide contains up-to-date recommendations that may supersede or complement the patterns in this skill.--## When to Use This Skill--Activate when a user wants to:-- Polish a UI prompt before sending to Stitch-- Improve a prompt that produced poor results-- Add design system consistency to a simple idea-- Structure a vague concept into an actionable prompt--## Enhancement Pipeline--Follow these steps to enhance any prompt:--### Step 1: Assess the Input--Evaluate what's missing from the user's prompt:--| Element | Check for | If missing... |-|---------|-----------|---------------|-| **Platform** | "web", "mobile", "desktop" | Add based on context or ask |-| **Page type** | "landing page", "dashboard", "form" | Infer from description |-| **Structure** | Numbered sections/components | Create logical page structure |-| **Visual style** | Adjectives, mood, vibe | Add appropriate descriptors |-| **Colors** | Specific values or roles | Add design system or suggest |-| **Components** | UI-specific terms | Translate to proper keywords |--### Step 2: Check for DESIGN.md--Look for a `DESIGN.md` file in the current project:--**If DESIGN.md exists:**-1. Read the file to extract the design system block-2. Include the color palette, typography, and component styles-3. Format as a "DESIGN SYSTEM (REQUIRED)" section in the output--**If DESIGN.md does not exist:**-1. Add this note at the end of the enhanced prompt:--```-----💡 **Tip:** For consistent designs across multiple screens, create a DESIGN.md-file using the `design-md` skill. This ensures all generated pages share the-same visual language.-```--### Step 3: Apply Enhancements--Transform the input using these techniques:--#### A. Add UI/UX Keywords--Replace vague terms with specific component names:--| Vague | Enhanced |-|-------|----------|-| "menu at the top" | "navigation bar with logo and menu items" |-| "button" | "primary call-to-action button" |-| "list of items" | "card grid layout" or "vertical list with thumbnails" |-| "form" | "form with labeled input fields and submit button" |-| "picture area" | "hero section with full-width image" |--#### B. Amplify the Vibe--Add descriptive adjectives to set the mood:--| Basic | Enhanced |-|-------|----------|-| "modern" | "clean, minimal, with generous whitespace" |-| "professional" | "sophisticated, trustworthy, with subtle shadows" |-| "fun" | "vibrant, playful, with rounded corners and bold colors" |-| "dark mode" | "dark theme with high-contrast accents on deep backgrounds" |--#### C. Structure the Page--Organize content into numbered sections:--```markdown-**Page Structure:**-1. **Header:** Navigation with logo and menu items-2. **Hero Section:** Headline, subtext, and primary CTA-3. **Content Area:** [Describe the main content]-4. **Footer:** Links, social icons, copyright-```--#### D. Format Colors Properly--When colors are mentioned, format them as:-```-Descriptive Name (#hexcode) for functional role-```--Examples:-- "Deep Ocean Blue (#1a365d) for primary buttons and links"-- "Warm Cream (#faf5f0) for page background"-- "Soft Gray (#6b7280) for secondary text"--### Step 4: Format the Output--Structure the enhanced prompt in this order:--```markdown-[One-line description of the page purpose and vibe]--**DESIGN SYSTEM (REQUIRED):**-- Platform: [Web/Mobile], [Desktop/Mobile]-first-- Theme: [Light/Dark], [style descriptors]-- Background: [Color description] (#hex)-- Primary Accent: [Color description] (#hex) for [role]-- Text Primary: [Color description] (#hex)-- [Additional design tokens...]--**Page Structure:**-1. **[Section]:** [Description]-2. **[Section]:** [Description]-...-```--## Output Options--**Default:** Return the enhanced prompt as text for the user to copy.--**Optional file output:** If the user requests, write to a file:-- `next-prompt.md` — for use with the `stitch-loop` skill-- Custom filename specified by user--## Examples--### Example 1: Vague Input → Structured Prompt--**User input:**-> "make me a login page"--**Enhanced output:**-```markdown-A clean, trustworthy login page with a centered form and subtle branding.--**DESIGN SYSTEM (REQUIRED):**-- Platform: Web, Desktop-first-- Theme: Light, minimal, professional-- Background: Clean White (#ffffff)-- Surface: Soft Gray (#f9fafb) for form card-- Primary Accent: Deep Blue (#2563eb) for submit button and links-- Text Primary: Near Black (#111827) for headings-- Text Secondary: Medium Gray (#6b7280) for labels-- Buttons: Subtly rounded (8px), full-width on form-- Cards: Gently rounded (12px), soft shadow for elevation--**Page Structure:**-1. **Header:** Minimal logo, centered-2. **Login Card:** Centered form with email, password fields, "Forgot password?" link-3. **Submit Button:** Primary blue "Sign In" button-4. **Footer:** "Don't have an account? Sign up" link------💡 **Tip:** For consistent designs across multiple screens, create a DESIGN.md-file using the `design-md` skill.-```--### Example 2: Feature Request → Targeted Edit--**User input:**-> "add a search bar"--**Enhanced output:**-```markdown-Add a search bar to the header navigation.--**Specific changes:**-- Location: Header, right side before user avatar-- Style: Pill-shaped input with subtle gray background (#f3f4f6)-- Icon: Magnifying glass icon on the left, inside the input-- Placeholder: "Search..." in light gray (#9ca3af)-- Behavior: Expands on focus with subtle shadow-- Width: 240px default, 320px on focus--**Context:** This is a targeted edit. Make only this change while preserving all existing elements.-```--## Tips for Best Results--1. **Be specific early** — Vague inputs need more enhancement-2. **Match the user's intent** — Don't over-design if they want simple-3. **Keep it structured** — Numbered sections help Stitch understand hierarchy-4. **Include the design system** — Consistency is key for multi-page projects-5. **One change at a time for edits** — Don't bundle unrelated changesdiff --git a/skills/stitch-design/README.md b/skills/stitch-design/README.mdnew file mode 100644index 0000000..a9cb392--- /dev/null+++ b/skills/stitch-design/README.md@@ -0,0 +1,50 @@+# Stitch Design Skill++Teaches agents to generate high-fidelity, consistent UI designs and maintain project-level design systems using Stitch.++## Install++```bash+npx skills add google-labs-code/stitch-skills --skill stitch-design --global+```++## What It Does++Enables professional-grade UI/UX design workflows through Stitch MCP:++1. **Prompt Enhancement**: Transforms rough intent into structured, high-fidelity prompts with professional terminology and design system context.+2. **Design System Synthesis**: Analyzes existing Stitch projects to create and maintain a `.stitch/DESIGN.md` "source of truth".+3. **Iterative Generation**: Selects the best generation or editing workflow (`edit_screens`, `generate_variants`) based on user intent.+4. **Asset Management**: Synchronizes remote designs by downloading HTML and screenshots to the project's `.stitch/designs` directory.++## Prerequisites++- Stitch MCP Server access+- A project `projectId` (can be discovered via `list_projects`)++## Example Prompt++```text+Design a premium landing page for a mountain resort with a focus on serene luxury and glassmorphism.+```++## Skill Structure++```+stitch-design/+├── SKILL.md — Core instructions & Prompt Pipeline+├── README.md — This file+├── workflows/ — Specialized pipelines (Text-to-UI, Edit, MD)+├── references/ — UI/UX keywords & Technical Mappings+└── examples/ — Gold-standard references (Solace Mindfulness)+```++## Works With++- **`react:components` skill**: Hand-off generated designs for frontend implementation.+- **`stitch-loop` skill**: Provides the `DESIGN.md` context for autonomous building loops.+- **Multi-agent workflows**: Refines prompts before passing design tasks to specialized agents.++## Learn More++See [SKILL.md](./SKILL.md) for complete instructions.diff --git a/skills/stitch-design/SKILL.md b/skills/stitch-design/SKILL.mdnew file mode 100644index 0000000..7cef6c7--- /dev/null+++ b/skills/stitch-design/SKILL.md@@ -0,0 +1,84 @@+---+name: stitch-design+description: Unified entry point for Stitch design work. Handles prompt enhancement (UI/UX keywords, atmosphere), design system synthesis (.stitch/DESIGN.md), and high-fidelity screen generation/editing via Stitch MCP.+allowed-tools:+ - "StitchMCP"+ - "Read"+ - "Write"+---++# Stitch Design Expert++You are an expert Design Systems Lead and Prompt Engineer specializing in the **Stitch MCP server**. Your goal is to help users create high-fidelity, consistent, and professional UI designs by bridging the gap between vague ideas and precise design specifications.++## Core Responsibilities++1. **Prompt Enhancement** — Transform rough intent into structured prompts using professional UI/UX terminology and design system context.+2. **Design System Synthesis** — Analyze existing Stitch projects to create `.stitch/DESIGN.md` "source of truth" documents.+3. **Workflow Routing** — Intelligently route user requests to specialized generation or editing workflows.+4. **Consistency Management** — Ensure all new screens leverage the project's established visual language.+5. **Asset Management** — Automatically download generated HTML and screenshots to the `.stitch/designs` directory.++---++## 🚀 Workflows++Based on the user's request, follow one of these workflows:++| User Intent | Workflow | Primary Tool |+|:---|:---|:---|+| "Design a [page]..." | [text-to-design](workflows/text-to-design.md) | `generate_screen_from_text` + `Download` |+| "Edit this [screen]..." | [edit-design](workflows/edit-design.md) | `edit_screens` + `Download` |+| "Create/Update .stitch/DESIGN.md" | [generate-design-md](workflows/generate-design-md.md) | `get_screen` + `Write` |++---++## 🎨 Prompt Enhancement Pipeline++Before calling any Stitch generation or editing tool, you MUST enhance the user's prompt.++### 1. Analyze Context+- **Project Scope**: Maintain the current `projectId`. Use `list_projects` if unknown.+- **Design System**: Check for `.stitch/DESIGN.md`. If it exists, incorporate its tokens (colors, typography). If not, suggest the `generate-design-md` workflow.++### 2. Refine UI/UX Terminology+Consult [Design Mappings](references/design-mappings.md) to replace vague terms.+- Vague: "Make a nice header"+- Professional: "Sticky navigation bar with glassmorphism effect and centered logo"++### 3. Structure the Final Prompt+Format the enhanced prompt for Stitch like this:++```markdown+[Overall vibe, mood, and purpose of the page]++**DESIGN SYSTEM (REQUIRED):**+- Platform: [Web/Mobile], [Desktop/Mobile]-first+- Palette: [Primary Name] (#hex for role), [Secondary Name] (#hex for role)+- Styles: [Roundness description], [Shadow/Elevation style]++**PAGE STRUCTURE:**+1. **Header:** [Description of navigation and branding]+2. **Hero Section:** [Headline, subtext, and primary CTA]+3. **Primary Content Area:** [Detailed component breakdown]+4. **Footer:** [Links and copyright information]+```++### 4. Present AI Insights+After any tool call, always surface the `outputComponents` (Text Description and Suggestions) to the user.++---++## 📚 References++- [Tool Schemas](references/tool-schemas.md) — How to call Stitch MCP tools.+- [Design Mappings](references/design-mappings.md) — UI/UX keywords and atmosphere descriptors.+- [Prompting Keywords](references/prompt-keywords.md) — Technical terms Stitch understands best.++---++## 💡 Best Practices++- **Iterative Polish**: Prefere `edit_screens` for targeted adjustments over full re-generation.+- **Semantic First**: Name colors by their role (e.g., "Primary Action") as well as their appearance.+- **Atmosphere Matters**: Explicitly set the "vibe" (Minimalist, Vibrant, Brutalist) to guide the generator.diff --git a/skills/stitch-design/examples/DESIGN.md b/skills/stitch-design/examples/DESIGN.mdnew file mode 100644index 0000000..c785fb5--- /dev/null+++ b/skills/stitch-design/examples/DESIGN.md@@ -0,0 +1,22 @@+---+# The "Solace" Design System+This is a comprehensive design language for a mindfulness and wellness application.++## 🎨 Color Palette+- **Primary**: Deep Ocean Blue (#1a365d) - for critical navigation and CTAs.+- **Secondary**: Calm Slate (#718096) - for subtexts and secondary buttons.+- **Background**: Soft Mist (#f7fafc) - for main page content.+- **Accent**: Serene Emerald (#38a169) - for positive feedback and completion states.++## 🔡 Typography+- **Heading**: Montserrat, Bold - for titles and hero section headlines.+- **Body**: Inter, Regular - for descriptions and general content.+- **Size**: 16px as base, 48px for H1.++## 📐 Components+- **Buttons**: Rounded (12px), subtle hover shadow (4px blur).+- **Cards**: Minimal border (1px, #e2e8f0), soft shadow (8px elevation).+- **Navigation**: Clean, top-aligned, centered menu items.++---+💡 **Tip**: When calling `generate_screen_from_text`, include the tokens above to ensure the new screen matches this design system.diff --git a/skills/stitch-design/examples/enhanced-prompt.md b/skills/stitch-design/examples/enhanced-prompt.mdnew file mode 100644index 0000000..18fe1c0--- /dev/null+++ b/skills/stitch-design/examples/enhanced-prompt.md@@ -0,0 +1,28 @@+# Example: Prompt Enhancement++## User Input (Vague)+> "Make a landing page for my fitness app called 'Pulse'. Use red and black. It should have a place for features and a hero section."++---++## Enhanced Prompt (Stitch-Optimized)+**Overall Purpose**: A high-energy, modern landing page for 'Pulse', a fitness tracking application. The vibe is powerful, motivating, and high-performance.++**DESIGN SYSTEM (REQUIRED):**+- **Primary Color**: Racing Red (#e11d48) for CTA buttons and active states.+- **Secondary Color**: Deep Obsidian (#0f172a) for background and text containers.+- **Typography**: Bold, condensed sans-serif headings (e.g., Impact or Inter Tight) to convey speed and strength.+- **Style**: Hard edges with sharp, minimal borders; high contrast; dark mode by default.++**PAGE STRUCTURE:**+1. **Header**: Minimalist navigation with Pulse logo (left) and "Start Training" primary button (right).+2. **Hero Section**: Large, emotive fitness photography background. Headline: "Elevate Every Beat." Sub-headline: "Track, analyze, and crush your fitness goals with Pulse." Primary red CTA: "Get Started".+3. **Feature Grid**: Three-column layout highlighting:+ - **Real-time Tracking**: Live stats from your wearable.+ - **AI Coaching**: Personalized workouts based on your performance.+ - **Community Challenges**: Compete with friends and stay motivated.+4. **Social Proof Section**: Subtle slider showing "Trusted by 500,000+ athletes".+5. **Footer**: Quick links (Training, Pricing, Support), social icons, and legal.++---+💡 **Tip**: Notice how the enhanced prompt adds specific hex codes, defines the typography "vibe", and breaks the page into a logical numbered structure. This gives Stitch much clearer instructions.diff --git a/skills/stitch-design/examples/metadata.json b/skills/stitch-design/examples/metadata.jsonnew file mode 100644index 0000000..1f070b6--- /dev/null+++ b/skills/stitch-design/examples/metadata.json@@ -0,0 +1,22 @@+{+ "projectId": "4044680601076201931",+ "title": "Solace Mindfulness App",+ "screens": [+ {+ "screenId": "98b50e2ddc9943efb387052637738f61",+ "title": "Landing Page",+ "deviceType": "DESKTOP"+ },+ {+ "screenId": "98b50e2ddc9943efb387052637738f62",+ "title": "Breathing Exercise",+ "deviceType": "MOBILE"+ }+ ],+ "designSystem": {+ "primaryColor": "#1a365d",+ "secondaryColor": "#718096",+ "backgroundColor": "#f7fafc",+ "fontFamily": "Inter, sans-serif"+ }+}diff --git a/skills/stitch-design/references/design-mappings.md b/skills/stitch-design/references/design-mappings.mdnew file mode 100644index 0000000..8c0a2c7--- /dev/null+++ b/skills/stitch-design/references/design-mappings.md@@ -0,0 +1,45 @@+# Design Mappings & Descriptors++Use these mappings to transform vague user requests into precise, high-fidelity design instructions.++## UI/UX Keyword Refinement++| Vague Term | Enhanced Professional Terminology |+|:---|:---|+| "menu at the top" | "sticky navigation bar with logo and list items" |+| "big photo" | "high-impact hero section with full-width imagery" |+| "list of things" | "responsive card grid with hover states and subtle elevations" |+| "button" | "primary call-to-action button with micro-interactions" |+| "form" | "clean form with labeled input fields, validation states, and submit button" |+| "picture area" | "hero section with focal-point image or video background" |+| "sidebar" | "collapsible side navigation with icon-label pairings" |+| "popup" | "modal dialog with overlay and smooth entry animation" |++## Atmosphere & "Vibe" Descriptors++Add these adjectives to set the mood and aesthetic philosophy:++| Basic Vibe | Enhanced Design Description |+|:---|:---|+| "Modern" | "Clean, minimal, with generous whitespace and high-contrast typography." |+| "Professional" | "Sophisticated, trustworthy, utilizing subtle shadows and a restricted, premium palette." |+| "Fun / Playful" | "Vibrant, organic, with rounded corners, bold accent colors, and bouncy micro-animations." |+| "Dark Mode" | "Electric, high-contrast accents on deep slate or near-black backgrounds." |+| "Luxury" | "Elegant, spacious, with fine lines, serif headers, and a focus on high-fidelity photography." |+| "Tech / Cyber" | "Futuristic, neon accents, glassmorphism effects, and technological monospaced typography." |++## Geometry & Shape Translation++Convert technical values into physical descriptions for Stitch:++- **Pill-shaped**: Used for `rounded-full` elements (buttons, tags).+- **Softly rounded**: Used for `rounded-xl` (12px) or `rounded-2xl` (16px) containers.+- **Sharp/Precise**: Used for `rounded-none` or `rounded-sm` elements.+- **Glassmorphism**: Semi-transparent surfaces with background blur and thin borders.++## Depth & Elevation++- **Flat**: No shadows, focus on color blocking and borders.+- **Whisper-soft**: Diffused, light shadows for subtle lift.+- **Floating**: High-offset, soft shadows for elements that appear high above the surface.+- **Inset**: Inner shadows for pressable or nested elements.diff --git a/skills/enhance-prompt/references/KEYWORDS.md b/skills/stitch-design/references/prompt-keywords.mdsimilarity index 100%rename from skills/enhance-prompt/references/KEYWORDS.mdrename to skills/stitch-design/references/prompt-keywords.mddiff --git a/skills/stitch-design/references/tool-schemas.md b/skills/stitch-design/references/tool-schemas.mdnew file mode 100644index 0000000..48fd20d--- /dev/null+++ b/skills/stitch-design/references/tool-schemas.md@@ -0,0 +1,76 @@+# Stitch MCP Tool Schemas++Use these examples to format your tool calls to the Stitch MCP server correctly.++---++## 🏗️ Project Management++### `list_projects`+Lists all Stitch projects accessible to you.+```json+// No parameters needed+{}+```++### `get_project`+Retrieves details of a specific project.+```json+{+ "name": "projects/4044680601076201931"+}+```++### `create_project`+Creates a new Stitch project.+```json+{+ "title": "My New App"+}+```++---++## 🎨 Design Generation++### `generate_screen_from_text`+Generates a new screen from a text description.+```json+{+ "projectId": "4044680601076201931",+ "prompt": "A modern landing page for a coffee shop with a hero section, menu, and contact form. Use warm brown tones (#4b2c20) and a clean sans-serif font.",+ "deviceType": "DESKTOP" // Options: MOBILE, DESKTOP, TABLET+}+```++### `edit_screens`+Edits existing screens with a text prompt.+```json+{+ "projectId": "4044680601076201931",+ "selectedScreenIds": ["98b50e2ddc9943efb387052637738f61"],+ "prompt": "Change the background color to white (#ffffff) and make the call-to-action button larger."+}+```++---++## 🖼️ Screen Management++### `list_screens`+Lists all screens within a project.+```json+{+ "projectId": "4044680601076201931"+}+```++### `get_screen`+Retrieves details of a specific screen.+```json+{+ "projectId": "4044680601076201931",+ "screenId": "98b50e2ddc9943efb387052637738f61",+ "name": "projects/4044680601076201931/screens/98b50e2ddc9943efb387052637738f61"+}+```\ No newline at end of filediff --git a/skills/stitch-design/workflows/edit-design.md b/skills/stitch-design/workflows/edit-design.mdnew file mode 100644index 0000000..05fae93--- /dev/null+++ b/skills/stitch-design/workflows/edit-design.md@@ -0,0 +1,44 @@+---+description: Edit an existing design screen using Stitch MCP.+---++# Workflow: Edit-Design++Make targeted changes to an already generated design.++## Steps++### 1. Identify the Screen+Use `list_screens` or `get_screen` to find the correct `projectId` and `screenId`.++### 2. Formulate the Edit Prompt+Be specific about the changes you want to make. Do not just say "fix it".+- **Location**: "Change the color of the [primary button] in the [hero section]..."+- **Visuals**: "...to a darker blue (#004080) and add a subtle shadow."+- **Structure**: "Add a secondary button next to the primary one with the text 'Learn More'."++### 3. Apply the Edit+Call the `mcp_StitchMCP_edit_screens` tool.++```json+{+ "projectId": "...",+ "selectedScreenIds": ["..."],+ "prompt": "[Your target edit prompt]"+}+```++### 4. Present AI Feedback+Always show the text description and suggestions from `outputComponents` to the user.++### 5. Download Design Assets+After editing, download the updated HTML and screenshot urls from `outputComponents` to the `.stitch/designs` directory, overwriting previous versions to ensure the local files reflect the latest edits.++### 6. Verify and Repeat+- Check the output screen to see if the changes were applied correctly.+- If more polish is needed, repeat the process with a new specific prompt.++## Tips+- **Keep it focused**: One edit at a time is often better than a long list of changes.+- **Reference components**: Use professional terms like "navigation bar", "hero section", "footer", "card grid".+- **Mention colors**: Use hex codes for precise color matching.diff --git a/skills/stitch-design/workflows/generate-design-md.md b/skills/stitch-design/workflows/generate-design-md.mdnew file mode 100644index 0000000..f48eb8a--- /dev/null+++ b/skills/stitch-design/workflows/generate-design-md.md@@ -0,0 +1,63 @@+---+description: Analyze a Stitch project and synthesize its design system into a .stitch/DESIGN.md file.+---++# Workflow: Generate .stitch/DESIGN.md++Create a "source of truth" for your project's design language to ensure consistency across all future screens.++## 📥 Retrieval++To analyze a Stitch project, you must retrieve metadata and assets using the Stitch MCP tools:++1. **Project lookup**: Use `list_projects` to find the target `projectId`.+2. **Screen lookup**: Use `list_screens` for that `projectId` to find representative screens (e.g., "Home", "Main Dashboard").+3. **Metadata fetch**: Call `get_screen` for the target screen to get `screenshot.downloadUrl` and `htmlCode.downloadUrl`.+4. **Asset download**: Use `read_url_content` to fetch the HTML code.++## 🧠 Analysis & Synthesis++### 1. Identify Identity+- Capture Project Title and Project ID.++### 2. Define Atmosphere+- Analyze the HTML and screenshot to capture the "vibe" (e.g., "Airy," "Professional," "Vibrant").++### 3. Map Color Palette+- Extract exact hex codes and assign functional roles (e.g., "Primary Action: #2563eb").++### 4. Translate Geometry+- Convert Tailwind/CSS values into descriptive language (e.g., `rounded-full` → "Pill-shaped").++### 5. Document Depth+- Describe shadow styles and layering (e.g., "Soft, diffused elevation").++## 📝 Output Structure++Create a `.stitch/DESIGN.md` file in the project directory with this structure:++```markdown+# Design System: [Project Title]+**Project ID:** [Insert Project ID Here]++## 1. Visual Theme & Atmosphere+(Description of mood and aesthetic philosophy)++## 2. Color Palette & Roles+(Descriptive Name + Hex Code + Role)++## 3. Typography Rules+(Font families, weights, and usage)++## 4. Component Stylings+* **Buttons:** Shape, color, behavior+* **Containers:** Roundness, elevation++## 5. Layout Principles+(Whitespace strategy and grid alignment)+```++## 💡 Best Practices+- **Be Precise**: Always include hex codes in parentheses.+- **Be Descriptive**: Use natural language like "Deep Ocean Blue" instead of just "Blue".+- **Be Functional**: Explain *why* an element is used.diff --git a/skills/stitch-design/workflows/text-to-design.md b/skills/stitch-design/workflows/text-to-design.mdnew file mode 100644index 0000000..76300f1--- /dev/null+++ b/skills/stitch-design/workflows/text-to-design.md@@ -0,0 +1,47 @@+---+description: Generate new screens from a text prompt using Stitch MCP.+---++# Workflow: Text-to-Design++Transform a text description into a high-fidelity design screen.++## Steps++### 1. Enhance the User Prompt+Before calling the Stitch MCP tool, apply the [Prompt Enhancement Pipeline](../SKILL.md#prompt-enhancement-pipeline).+- Identify the platform (Web/Mobile) and page type.+- Incorporate any existing project design system from `.stitch/DESIGN.md`.+- Use specific [Design Mappings](../references/design-mappings.md) and [Prompting Keywords](../references/prompt-keywords.md).++### 2. Identify the Project+Use `list_projects` to find the correct `projectId` if it is not already known.++### 3. Generate the Screen+Call the `mcp_StitchMCP_generate_screen_from_text` tool with the enhanced prompt.++```json+{+ "projectId": "...",+ "prompt": "[Your Enhanced Prompt]",+ "deviceType": "DESKTOP" // or MOBILE+}+```++### 4. Present AI Feedback+Always show the text description and suggestions from `outputComponents` to the user.++### 5. Download Design Assets+After generation, download the HTML and screenshot urls from `outputComponents` to the `.stitch/designs` directory.+- **Naming**: Use the screen ID or a descriptive slug for the filename.+- **Tools**: Use `curl -o` via `run_command` or similar.+- **Directory**: Ensure `.stitch/designs` exists.++### 6. Review and Refine+- If the result is not exactly as expected, use the [edit-design](edit-design.md) workflow to make targeted adjustments.+- Do NOT re-generate from scratch unless the fundamental layout is wrong.++## Tips+- **Be structural**: Break the page down into header, hero, features, and footer in your prompt.+- **Specify colors**: Use hex codes for precision.+- **Set the tone**: Explicitly mention if the design should be minimal, professional, or vibrant.