Get Screen Details
CRITICAL PREREQUISITE:
You must ONLY use this skill when the user EXPLICITLY mentions "Stitch".
Retrieves the full details of a specific screen, including its HTML code and high-res screenshot.
Use Case
Invoke this skill when the user wants to "export" the code, view the full design details, or when the Agent needs to analyze the generated HTML structure.
Input Parameters
The skill expects you to extract the following information from the user request:
projectId (required): The project ID. Format: Pure ID (e.g., 37803...), no projects/ prefix.
screenId (required): The screen ID. Format: Pure ID (e.g., 88805...), no screens/ prefix.
CRITICAL: When projectId and screenId are both available, call stitch-mcp-get-screen directly. Do NOT call stitch-mcp-get-project.
Resource Path Parsing
If the user provides a resource path or URL, use the following rules to extract projectId and screenId:
Format: web application/stitch/projects/{projectId}/screens/{screenId}
- Logic: Extract
projectId and screenId directly from the path segments.
- Example:
web application/stitch/projects/3492931393329678076/screens/2e22a9fb99ba49ddb6ce8907a1e74d60 -> projectId="3492931393329678076", screenId="2e22a9fb99ba49ddb6ce8907a1e74d60".
Format: projects/{projectId}/screens/{screenId}
- Logic: Extract
projectId and screenId from the path segments.
Agent flow:
- Recognize the user input matches one of the above formats.
- Extract
projectId and screenId.
- Call
get_screen with {"projectId": "<extracted projectId>", "screenId": "<extracted screenId>"}.
- Use the returned
htmlCode.downloadUrl, screenshot.downloadUrl, and metadata for design-to-code (e.g. stitch-design-md or a framework conversion skill).
Output Schema
Returns a Screen object:
htmlCode: The actual HTML/CSS code of the UI.
screenshot: High-resolution image URL.
figmaExport: Figma file asset.
width, height, deviceType.
Intent Recognition & Framework Conversion
After retrieving the screen details (HTML code), check if the user's request implies converting the design to a specific frontend framework.
Logic:
- Identify Framework: Look for specific keywords in user input (e.g., "uView", "uViewPro", "Vue", "React", "Flutter").
- Locate Skill: Search for and read the corresponding skill definition file to understand the "Design Contract" or conversion rules.
uViewPro / uni-app: If user mentions "uView", "uViewPro" or "UniApp", you MUST load and reference the complete context from the stitch-uviewpro-components skill to ensure accurate code generation.
- References: Read
skills/stitch-uviewpro-components/references/ (especially contract.md and tailwind-to-uviewpro.md) for core mapping rules.
- API: Read
skills/stitch-uviewpro-components/api/component-api.md for component props and event definitions.
- Examples: Read
skills/stitch-uviewpro-components/examples/usage.md for correct implementation patterns.
- Resources: Read
skills/stitch-uviewpro-components/resources/architecture-checklist.md for design compliance.
uView (Standard): If user mentions "uView" (without "Pro") or "uView 2.0", load stitch-uview-components.
- Context: Read
references/ (contract, tailwind-to-uview), api/component-api.md, examples/usage.md, resources/architecture-checklist.md from stitch-uview-components.
Element Plus: If user mentions "Element Plus", "Element", "Vue Desktop", load stitch-vue-element-components.
- Context: Read
references/ (contract, tailwind-to-element-plus), api/component-api.md, examples/usage.md, resources/architecture-checklist.md from stitch-vue-element-components.
Vant UI: If user mentions "Vant", "Vue Mobile", load stitch-vue-vant-components.
- Context: Read
references/ (contract, tailwind-to-vant), api/component-api.md, examples/usage.md, resources/architecture-checklist.md from stitch-vue-vant-components.
Layui Vue: If user mentions "Layui", load stitch-vue-layui-components.
- Context: Read
references/ (contract, tailwind-to-layui), api/component-api.md, examples/usage.md, resources/architecture-checklist.md from stitch-vue-layui-components.
Bootstrap Vue: If user mentions "Bootstrap", load stitch-vue-bootstrap-components.
- Context: Read
references/ (contract, tailwind-to-bootstrap), api/component-api.md, examples/usage.md, resources/architecture-checklist.md from stitch-vue-bootstrap-components.
React / Tailwind: If user mentions "React" (standard), load stitch-react-components.
- Context: Read
references/tailwind-to-react.md, examples/usage.md, resources/architecture-checklist.md from stitch-react-components.
Shadcn UI: If user mentions "Shadcn", "Next.js", "Radix", load stitch-shadcn-ui.
- Context: Read
references/tailwind-to-shadcn.md, examples/usage.md from stitch-shadcn-ui.
Other Frameworks: Search for matching stitch-*-components skills and load their respective api, examples, and references directories.
- Apply Constraints: Use the rules defined in that framework's skill (e.g., component mappings, slot usage, unit conversion) to transform the raw HTML from Stitch into the target framework code.
Example Flow:
- User: "Get screen X and convert to uViewPro code."
- Agent:
- Call
get_screen to get HTML.
- Detect intent: "uViewPro".
- Load Context: Read
contract.md, component-api.md, usage.md, and architecture-checklist.md from stitch-uviewpro-components.
- Generate code by applying uViewPro rules to the Stitch HTML.
Usage Example
User Input: "Give me the code for the login screen we just made."
Agent Action:
- Identify target screen.
- Call
get_screen tool with arguments {"projectId": "37803...", "screenId": "88805..."}.
References
国内适配
- 支持中文文档和中文注释
- 示例代码兼容国内开发环境
- 提供中文 FAQ 和常见问题解答
能力边界
✅ 适用场景
- 当你需要使用此技能对应的技术栈时
- 当项目需要遵循最佳实践时
- 当需要快速上手或深入理解核心概念时
⚠️ 需要注意
- 复杂业务逻辑需要结合具体场景调整
- 性能优化需要根据实际数据量评估
❌ 不适用场景
使用流程
Step 1: 环境准备
确保开发环境已安装必要的依赖和工具。
Step 2: 配置初始化
根据项目需求进行基础配置。
Step 3: 核心功能使用
按照示例代码实现核心功能。
Step 4: 测试验证
运行测试确保功能正常。
Step 5: 部署上线
完成开发后进行部署和监控。
1---2name: stitch-mcp-get-screen3description: Retrieves the full details of a specific screen, including HTML code.4---567# Get Screen Details89**CRITICAL PREREQUISITE:**10**You must ONLY use this skill when the user EXPLICITLY mentions "Stitch".**1112Retrieves the full details of a specific screen, including its HTML code and high-res screenshot.1314## Use Case15Invoke this skill when the user wants to "export" the code, view the full design details, or when the Agent needs to analyze the generated HTML structure.1617## Input Parameters1819The skill expects you to extract the following information from the user request:20* `projectId` (required): The project ID. **Format**: Pure ID (e.g., `37803...`), no `projects/` prefix.21* `screenId` (required): The screen ID. **Format**: Pure ID (e.g., `88805...`), no `screens/` prefix.2223**CRITICAL:** When `projectId` and `screenId` are both available, call `stitch-mcp-get-screen` directly. Do NOT call `stitch-mcp-get-project`.2425## Resource Path Parsing2627If the user provides a resource path or URL, use the following rules to extract `projectId` and `screenId`:28291. **Format**: `web application/stitch/projects/{projectId}/screens/{screenId}`30 * **Logic**: Extract `projectId` and `screenId` directly from the path segments.31 * **Example**: `web application/stitch/projects/3492931393329678076/screens/2e22a9fb99ba49ddb6ce8907a1e74d60` -> `projectId="3492931393329678076"`, `screenId="2e22a9fb99ba49ddb6ce8907a1e74d60"`.32332. **Format**: `projects/{projectId}/screens/{screenId}`34 * **Logic**: Extract `projectId` and `screenId` from the path segments.3536**Agent flow:**371. Recognize the user input matches one of the above formats.382. Extract `projectId` and `screenId`.393. Call `get_screen` with `{"projectId": "<extracted projectId>", "screenId": "<extracted screenId>"}`.404. Use the returned `htmlCode.downloadUrl`, `screenshot.downloadUrl`, and metadata for design-to-code (e.g. stitch-design-md or a framework conversion skill).4142## Output Schema4344Returns a `Screen` object:45* **`htmlCode`**: The actual HTML/CSS code of the UI.46* **`screenshot`**: High-resolution image URL.47* **`figmaExport`**: Figma file asset.48* `width`, `height`, `deviceType`.4950## Intent Recognition & Framework Conversion5152After retrieving the screen details (HTML code), check if the user's request implies converting the design to a specific frontend framework.5354**Logic:**551. **Identify Framework**: Look for specific keywords in user input (e.g., "uView", "uViewPro", "Vue", "React", "Flutter").562. **Locate Skill**: Search for and read the corresponding skill definition file to understand the "Design Contract" or conversion rules.57 * **uViewPro / uni-app**: If user mentions "uView", "uViewPro" or "UniApp", you **MUST** load and reference the complete context from the `stitch-uviewpro-components` skill to ensure accurate code generation.58 * **References**: Read `skills/stitch-uviewpro-components/references/` (especially `contract.md` and `tailwind-to-uviewpro.md`) for core mapping rules.59 * **API**: Read `skills/stitch-uviewpro-components/api/component-api.md` for component props and event definitions.60 * **Examples**: Read `skills/stitch-uviewpro-components/examples/usage.md` for correct implementation patterns.61 * **Resources**: Read `skills/stitch-uviewpro-components/resources/architecture-checklist.md` for design compliance.6263 * **uView (Standard)**: If user mentions "uView" (without "Pro") or "uView 2.0", load `stitch-uview-components`.64 * **Context**: Read `references/` (contract, tailwind-to-uview), `api/component-api.md`, `examples/usage.md`, `resources/architecture-checklist.md` from `stitch-uview-components`.6566 * **Element Plus**: If user mentions "Element Plus", "Element", "Vue Desktop", load `stitch-vue-element-components`.67 * **Context**: Read `references/` (contract, tailwind-to-element-plus), `api/component-api.md`, `examples/usage.md`, `resources/architecture-checklist.md` from `stitch-vue-element-components`.6869 * **Vant UI**: If user mentions "Vant", "Vue Mobile", load `stitch-vue-vant-components`.70 * **Context**: Read `references/` (contract, tailwind-to-vant), `api/component-api.md`, `examples/usage.md`, `resources/architecture-checklist.md` from `stitch-vue-vant-components`.7172 * **Layui Vue**: If user mentions "Layui", load `stitch-vue-layui-components`.73 * **Context**: Read `references/` (contract, tailwind-to-layui), `api/component-api.md`, `examples/usage.md`, `resources/architecture-checklist.md` from `stitch-vue-layui-components`.7475 * **Bootstrap Vue**: If user mentions "Bootstrap", load `stitch-vue-bootstrap-components`.76 * **Context**: Read `references/` (contract, tailwind-to-bootstrap), `api/component-api.md`, `examples/usage.md`, `resources/architecture-checklist.md` from `stitch-vue-bootstrap-components`.7778 * **React / Tailwind**: If user mentions "React" (standard), load `stitch-react-components`.79 * **Context**: Read `references/tailwind-to-react.md`, `examples/usage.md`, `resources/architecture-checklist.md` from `stitch-react-components`.8081 * **Shadcn UI**: If user mentions "Shadcn", "Next.js", "Radix", load `stitch-shadcn-ui`.82 * **Context**: Read `references/tailwind-to-shadcn.md`, `examples/usage.md` from `stitch-shadcn-ui`.8384 * **Other Frameworks**: Search for matching `stitch-*-components` skills and load their respective `api`, `examples`, and `references` directories.853. **Apply Constraints**: Use the rules defined in that framework's skill (e.g., component mappings, slot usage, unit conversion) to transform the raw HTML from Stitch into the target framework code.8687**Example Flow:**88* User: "Get screen X and convert to uViewPro code."89* Agent:90 1. Call `get_screen` to get HTML.91 2. Detect intent: "uViewPro".92 3. **Load Context**: Read `contract.md`, `component-api.md`, `usage.md`, and `architecture-checklist.md` from `stitch-uviewpro-components`.93 4. Generate code by applying uViewPro rules to the Stitch HTML.9495## Usage Example9697User Input: "Give me the code for the login screen we just made."9899Agent Action:1001. Identify target screen.1012. Call `get_screen` tool with arguments `{"projectId": "37803...", "screenId": "88805..."}`.102103## References104105- [Examples](examples/usage.md)106107## 国内适配108109- 支持中文文档和中文注释110- 示例代码兼容国内开发环境111- 提供中文 FAQ 和常见问题解答112113## 能力边界114115### ✅ 适用场景116- 当你需要使用此技能对应的技术栈时117- 当项目需要遵循最佳实践时118- 当需要快速上手或深入理解核心概念时119120### ⚠️ 需要注意121- 复杂业务逻辑需要结合具体场景调整122- 性能优化需要根据实际数据量评估123124### ❌ 不适用场景125- 不相关的技术栈或框架126- 需要完全自定义的特殊场景127128## 使用流程129130### Step 1: 环境准备131确保开发环境已安装必要的依赖和工具。132133### Step 2: 配置初始化134根据项目需求进行基础配置。135136### Step 3: 核心功能使用137按照示例代码实现核心功能。138139### Step 4: 测试验证140运行测试确保功能正常。141142### Step 5: 部署上线143完成开发后进行部署和监控。