Capture screenshots and automatically annotate UI elements with descriptions.
Prerequisites
Target application running
Output directory specified
Instructions
Identify the target application:
Get process name from user
Verify application is running and visible
Capture the application window:
Take a screenshot of the full window
Save raw screenshot to output directory
Analyze UI elements in the window:
a. Get the accessibility tree:
Identify all interactive elements
Note element roles (Button, Edit, Link, etc.)
Capture element names and labels
b. Map elements to screen positions:
Get bounding boxes for each element
Calculate center points for annotations
Generate annotations:
a. For each significant element:
Draw a numbered marker on the screenshot
Record element details:
Number
Role/Type
Name/Label
Position (x, y)
Size (width, height)
b. Create annotation overlay:
Use contrasting colors for visibility
Add leader lines if needed
Group related elements
Generate documentation:
a. Create annotated screenshot image:
Original screenshot + numbered markers
b. Create element reference:
## UI Elements
1. **Login Button** (Button)
- Position: (450, 300)
- Size: 120x40
- Action: Triggers login flow
2. **Username Field** (Edit)
- Position: (450, 200)
- Size: 200x30
- Input: Text field for username
Save outputs:
screenshot_raw.png - Original capture
screenshot_annotated.png - With markers
elements.md - Element documentation
elements.json - Structured data
Error Handling
If window not found, list available windows
If elements overlap, use offset markers
If window too large, capture in sections
Notes
Useful for creating UI documentation
Helps with test automation planning
Can be used for accessibility audits
1---2name: screenshot-annotator3description: Screenshot Annotator4---5# Screenshot Annotator67Capture screenshots and automatically annotate UI elements with descriptions.89## Prerequisites1011- Target application running12- Output directory specified1314## Instructions15161. Identify the target application:17 - Get process name from user18 - Verify application is running and visible19202. Capture the application window:21 - Take a screenshot of the full window22 - Save raw screenshot to output directory23243. Analyze UI elements in the window:2526 a. Get the accessibility tree:27 - Identify all interactive elements28 - Note element roles (Button, Edit, Link, etc.)29 - Capture element names and labels3031 b. Map elements to screen positions:32 - Get bounding boxes for each element33 - Calculate center points for annotations34354. Generate annotations:3637 a. For each significant element:38 - Draw a numbered marker on the screenshot39 - Record element details:40 - Number41 - Role/Type42 - Name/Label43 - Position (x, y)44 - Size (width, height)4546 b. Create annotation overlay:47 - Use contrasting colors for visibility48 - Add leader lines if needed49 - Group related elements50515. Generate documentation:5253 a. Create annotated screenshot image:54 - Original screenshot + numbered markers5556 b. Create element reference:57 ```markdown58 ## UI Elements5960 1. **Login Button** (Button)61 - Position: (450, 300)62 - Size: 120x4063 - Action: Triggers login flow6465 2. **Username Field** (Edit)66 - Position: (450, 200)67 - Size: 200x3068 - Input: Text field for username69 ```70716. Save outputs:72 - `screenshot_raw.png` - Original capture73 - `screenshot_annotated.png` - With markers74 - `elements.md` - Element documentation75 - `elements.json` - Structured data7677## Error Handling7879- If window not found, list available windows80- If elements overlap, use offset markers81- If window too large, capture in sections8283## Notes8485- Useful for creating UI documentation86- Helps with test automation planning87- Can be used for accessibility audits
Run npx skillmds@latest add mediar-ai/screenshot-annotator in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
Screenshot Annotator It is listed under Coding & Dev Tools on SkillMD.
This skill has not completed SkillMD's automated safety review yet. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
mediar-ai (@mediar-ai) published this skill. Their other Agent Skills are listed on their SkillMD profile.