design-md

视觉设计 / 插画 界面 · 动效 · 设计品味 3 文件 EN 原文

Analyze Stitch projects and synthesize a semanti

Analyze Stitch projects and synthesize a semantic design system into DESIGN.md files

说明语言:英文

来源google-labs-codestitch-skills ↗ 查看原文件 ↗版权归原作者,请遵循原仓库许可
安装
npx skills add https://github.com/google-labs-code/stitch-skills --skill design-md

需要已安装 skills CLI。也可以直接从源仓库 clone。

在星云中查看 ↗
SKILL.md 原文

name: design-md description: Analyze Stitch projects and synthesize a semantic design system into DESIGN.md files allowed-tools:


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

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.
  1. Project lookup (if Project ID is not provided):
  2. Call [prefix]:list_projects with filter: "view=owned" to retrieve all user projects
  3. Identify the target project by title or URL pattern
  4. Extract the Project ID from the name field (e.g., projects/13534454087919359824)
  1. Screen lookup (if Screen ID is not provided):
  2. Call [prefix]:list_screens with the projectId (just the numeric ID, not the full path)
  3. Review screen titles to identify the target screen (e.g., "Home", "Landing Page")
  4. Extract the Screen ID from the screen's name field
  1. Metadata fetch:
  2. Call [prefix]:get_screen with both projectId and screenId (both as numeric IDs only)
  3. This returns the complete screen object including:
  4. screenshot.downloadUrl - Visual reference of the design
  5. htmlCode.downloadUrl - Full HTML/CSS source code
  6. width, height, deviceType - Screen dimensions and target platform
  7. Project metadata including designTheme with color and style information
  1. Asset download:
  2. Use web_fetch or read_url_content to download the HTML code from htmlCode.downloadUrl
  3. Optionally download the screenshot from screenshot.downloadUrl for visual reference
  4. Parse the HTML to extract Tailwind classes, custom CSS, and component patterns
  1. Project metadata extraction:
  2. Call [prefix]:get_project with the project name (full path: projects/{id}) to get:
  3. designTheme object with color mode, fonts, roundness, custom colors
  4. Project-level design guidelines and descriptions
  5. Device type preferences and layout principles

Analysis & Synthesis Instructions

1. Extract Project Identity (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:

4. Translate Geometry & Shape (CSS/Tailwind)

Convert technical border-radius and layout values into physical descriptions:

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

Output Format (DESIGN.md Structure)

# 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
  1. Get the Home page screen details:
   Retrieve the Home page screen's code, image, and screen object information
  1. Reference best practices:
   Review the Stitch Effective Prompting Guide at:
   https://stitch.withgoogle.com/docs/learn/prompting/
  1. Analyze and synthesize:
  2. Extract all relevant design tokens from the screen
  3. Translate technical values into descriptive language
  4. Organize information according to the DESIGN.md structure
  1. Generate the file:
  2. Create DESIGN.md in the project directory
  3. Follow the prescribed format exactly
  4. Ensure all color codes are accurate
  5. Use evocative, designer-friendly language

Best Practices

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

同类技能
accessibilityaccessibility-complianceanimateanimate-expoanimation-performanceanimation-vocabularyanti-ui-slopapple-design
本页内容来自开源项目 google-labs-code, 版权归原作者所有。
本站仅作技能索引与分享,所有 Skill 版权归其原作者所有。