page-canvas-vision

Maps UI screenshot regions to design system components as structured JSON.

Updated Aug 13, 2026
One-click install
npx skills add https://github.com/Mjlike123/ui-prototype-workbench --skill page-canvas-vision-mjlike123
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: page-canvas-vision
Source: https://github.com/Mjlike123/ui-prototype-workbench/tree/main/.agents/skills/page-canvas-vision
Command: npx skills add https://github.com/Mjlike123/ui-prototype-workbench --skill page-canvas-vision-mjlike123

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Turning a UI screenshot into a structured, design-system-compliant page plan normally requires manual pixel measurement and component guessing. This Skill reads the actual image pixels and produces a PageCanvasPlan plus Yueban layers manifest that the TopTop UI prototype portal can apply directly. ## Core Features & Use Cases - Vision-based component mapping: Inspects the uploaded screenshot and maps visible regions to whitelisted components from the portal's CANVAS_COMPONENT_CATALOG. - Coordinate-accurate output: Measures source_bbox in the original image coordinate system and computes scaled_bbox using scale = 750 / sourceImage.width. - Contract-safe fallback: Lists unmappable UI regions in plan.warnings instead of inventing components outside the catalog. - Use Case: A designer pastes the portal's "Cursor 视觉分析" instruction with a screenshot; the Skill returns a JSON object that the user pastes back into the Portal /canvas page via "应用 Agent 分析结果" to reconstruct the page. ## Quick Start Paste the Portal's Cursor vision analysis instruction together with your UI screenshot and ask the agent to output the PageCanvasPlan JSON for the canvas.

Frequently Asked Questions about page-canvas-vision

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I convert a UI screenshot into design system components?

Upload the screenshot with the portal's Cursor vision analysis instruction. The Skill inspects the actual image pixels and outputs a PageCanvasPlan JSON whose blocks only use componentIds from the CANVAS_COMPONENT_CATALOG whitelist.

What output format does the screenshot analysis produce?

It produces a single JSON object matching the PageCanvasAgentVisionResult schema, containing sourceImage dimensions, plan.blocks, a Yueban-compatible yuebanLayers array with source_bbox and scaled_bbox, mapping rationale, and warnings.

How are bounding box coordinates calculated for the layers manifest?

Each visible region's source_bbox is measured in the original image coordinate system. The scaled_bbox is derived with scale = 750 divided by sourceImage.width, keeping both coordinate sets consistent.

What happens when a UI region has no matching catalog component?

Unmappable regions are listed in plan.warnings instead of being forced into a component. The Skill never invents components outside the catalog contract, so the portal only receives valid componentIds.

Can the analysis run without viewing the actual screenshot?

No. The Skill explicitly forbids heuristic band estimation, proportional guessing, or output without inspecting the image. Viewing the uploaded screenshot is mandatory for accurate pixel measurement.