pi-sketch-reader
Skill2 starsChanged 5 months agoMITView on GitHub
Read and analyze UI sketch/design images (PNG, JPG, WEBP, SVG) and produce structured text descriptions with 6-dimension analysis. Trigger on: "analyze sketch" "read design" "describe mockup" "analyze UI image" "sketch analysis" "design review" or when user provides a UI/design image and wants structured analysis.
In this repository71 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- academic-searchSkill
- agent-reachSkill
- anysearchSkill
- brainstormingSkill
- brave-searchSkill
- clash-verge-controlSkill
- drawio-skillSkill
- find-skillsSkill
- fireworks-tech-graphSkill
- github-trending-discoverySkill
- html-pptSkill
- humanizer-zhSkill
- ai-news-collectorSkill
- info-andrej-karpathy-rssSkill
- info-daily-hot-topicsSkill
- karpathy-guidelinesSkill
- markdown-to-docxSkill
- mcp-builderSkill
- minimax-docxSkill
- minimax-pdfSkill
- minimax-xlsxSkill
- office-docxSkill
- office-pdfSkill
- office-pptxSkill
- office-pywordSkill
- office-xlsxSkill
- ontologySkill
- openclaw-optimizationSkill
- pd-architectureSkill
- pd-bddSkill
- pd-brainstormingSkill
- pd-diagnoseSkill
- pd-docSkill
- pd-executionSkill
- pd-grill-with-docsSkill
- pd-improve-codebase-architectureSkill
- pd-planSkill
- pd-postgresSkill
- pd-prototypeSkill
- pd-puaSkill
- pd-reviewSkill
- pd-rules-checkSkill
- pd-setupSkill
- pd-simplifySkill
- pd-tddSkill
- pd-to-issuesSkill
- pd-to-prdSkill
- pd-triageSkill
- pd-zoom-outSkill
- pi-drawioSkill
- pi-githubSkill
- pi-llm-serverSkill
- pi-memorySkill
- pi-painterSkill
- pr-academic-searchSkill
- pr-arxiv-watcherSkill
- pr-critic-mentor-reviewSkill
- pr-daily-research-papersSkill
- pr-deep-researchSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
9 rules. About 0 are common, 6 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 13
Read UI sketch/design images and produce structured, detailed text descriptions.
- Distinctive: line 38
All image paths provided
- Distinctive: line 43
If image paths use glob patterns, expand them with the Glob tool.
- Distinctive: line 52
Use the Read tool to load the image (Read supports images and returns them as attachments)
- Very specific: line 53
If a file doesn't exist or isn't a supported format, record it as SKIPPED with the reason
- Very specific: line 74
Use the output template in references/output-template.md.
- Distinctive: line 78
Create the output directory if it doesn't exist.
- Very specific: line 84
Use the Write tool for file creation.
- Distinctive: line 97
If any images were skipped, list them with reasons.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Sketch Reader
Read UI sketch/design images and produce structured, detailed text descriptions. Uses a vision-capable model to analyze layout, components, interactions, colors, and typography. Outputs both human-readable Markdown and machine-readable JSON.
When to Use
- User provides a UI sketch, mockup, or design image and wants analysis
- User says "analyze this design" or "describe this mockup"
- User needs structured design token extraction from an image
- User wants to compare multiple design variants
- User needs to bridge visual design into text-based planning or documentation
Input
The user provides:
- IMAGE_PATHS — one or more image file paths (PNG, JPG, JPEG, WEBP, SVG, BMP, GIF)
- OUTPUT_DIR — where to write output (default:
./sketch-analysis/) - SKETCH_NAME — optional name for this sketch set (default: derived from first image filename)
- CONTEXT_HINT — optional hint about what the sketch represents (e.g., "login screen", "dashboard layout")
Workflow
Step 1: Parse Input
Identify from the user's message:
- All image paths provided
- Output directory (default:
./sketch-analysis/) - Sketch name (default: first image filename without extension)
- Context hint (default: none)
If image paths use glob patterns, expand them with the Glob tool.
Validate:
- At least one image must be provided
- Each path must point to a supported image format:
.png,.jpg,.jpeg,.webp,.svg,.bmp,.gif
Step 2: Read Images
For each image path:
- Use the Read tool to load the image (Read supports images and returns them as attachments)
- If a file doesn't exist or isn't a supported format, record it as
SKIPPEDwith the reason - Track the order — descriptions reference images by index for traceability
Step 3: Analyze Images
For each successfully loaded image, produce analysis across 6 dimensions.
See references/analysis-dimensions.md for the full framework.
The dimensions are:
- Layout Structure — overall pattern, regions, responsive hints, spacing
- Components & UI Elements — type, position, labels, states, grouping
- Interaction & Navigation — clickable elements, navigation patterns, modals, forms
- Color & Typography — colors (hex if identifiable), font hierarchy, styles
- Data & Content — data types, organization, empty states, pagination
- Annotations & Notes — handwritten annotations, crossed-out elements, markers
Step 4: Synthesize Description
Combine all image analyses into a single cohesive document. If multiple images represent the same screen at different states or sizes, group them together.
Use the output template in references/output-template.md.
Step 5: Write Output
Create the output directory if it doesn't exist.
Write two files:
{OUTPUT_DIR}/{SKETCH_NAME}-analysis.md— full structured analysis{OUTPUT_DIR}/{SKETCH_NAME}-summary.json— machine-readable JSON summary
Use the Write tool for file creation. See references/output-template.md for
exact formats.
Step 6: Report
Present a brief summary to the user:
Analyzed: {N} images → {M} screens
Analysis: {OUTPUT_DIR}/{SKETCH_NAME}-analysis.md
Summary: {OUTPUT_DIR}/{SKETCH_NAME}-summary.jsonIf any images were skipped, list them with reasons.
Anti-Patterns
Do NOT:
- Guess at functionality not indicated by the sketch — describe what you SEE, not what you assume
- Skip any of the 6 analysis dimensions even if the sketch is simple — note "N/A" or "none visible"
- Include your own design opinions or suggestions — you are an observer, not a designer
- Output raw image data or base64 — only text descriptions
- Fabricate content for elements that are too small or blurry to read — note them as "illegible"
- Ignore annotations — handwritten notes are often the most important part of a sketch
- Process more than 20 images per invocation (quality degrades with too many)
Integration Tips
The JSON summary can be consumed by:
- Other skills or agents that need design context
- Automated design-to-code pipelines
- Design system documentation generators
- Any workflow that bridges visual design to text-based tooling
Success Criteria
- All 6 analysis dimensions covered per screen
- One
.mdanalysis file written to OUTPUT_DIR - One
.jsonsummary file written to OUTPUT_DIR with valid schema - Skipped images documented with reasons
- Cross-screen patterns described when multiple images provided
- Design tokens extracted when identifiable
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

