/visual-pr:image-annotationsfrom visual-pr
Annotate screenshots, diagrams, and images with PIL/Pillow callout rectangles, arrows, labels, highlights, and GIF overlays. Useful for PR screenshots, before/after comparisons, diagram callouts, and demo frames.
Ships in visual-pr. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Add precise visual callouts to screenshots, diagrams, and demo frames by drawing rounded rectangles, leader lines, and short labels with consistent colors, padding, and typography.
Install Pillow only if the project environment does not already provide it:
pip install Pillow -q
Check Image.open(path).size before placing annotations. HiDPI screenshots are larger than they appear; 150% display scaling means coordinates may be 1.5 times CSS pixel dimensions.
| Element | Rule | Concrete value |
|---|---|---|
| Bad or removed item | Use red only for defects, removals, or negative examples. | #E63946 |
| Neutral highlight | Use yellowish-orange for "look here", additions, and feature callouts. | #FF9F1C |
| Shape | Prefer rounded rectangles over circles or ellipses. | draw.rounded_rectangle(..., radius=14, outline=color, width=5) |
| Padding | Pad the target content so the outline does not touch it. | 18px |
| Leader line | Keep close to the target; same thickness as the rectangle. | 25-35px preferred, width=5 |
| Label length | Use short labels. | 1-3 words when possible |
| Text stroke | Use same-color stroke for body. | stroke_width=1, stroke_fill=color |
| White stroke | Do not use it. | It creates a bad glow effect. |
| Platform | Font rule |
|---|---|
| Windows | Prefer Ink Free at C:/Windows/Fonts/Inkfree.ttf for a handwritten look. |
| Linux/macOS | Fall back to ImageFont.load_default() unless the project provides a better font. |
| Around 1400px-wide images | Use size 36 for annotation labels. |
| Markdown display | Take screenshots at native 1x and control display size with HTML such as <img width="300">. |
Never resize screenshots with PIL just to fit Markdown; resizing creates artifacts and makes annotation coordinates harder to verify.
from PIL import Image, ImageDraw, ImageFont
font = ImageFont.truetype('C:/Windows/Fonts/Inkfree.ttf', 36) # or ImageFont.load_default()
color = '#FF9F1C'
stroke = 5
pad = 18
img = Image.open('screenshot.png')
draw = ImageDraw.Draw(img)
# Inspect before placing callouts: img.size
# Rounded rect with padding
draw.rounded_rectangle(
[x1 - pad, y1 - pad, x2 + pad, y2 + pad],
radius=14, outline=color, width=stroke
)
# Leader line, same thickness as rect
cy = (y1 + y2) // 2
draw.line([x2 + pad, cy, x2 + pad + 40, cy - 30], fill=color, width=stroke)
# Label: same-color stroke, no white glow
_draw_label_at = (x2 + pad + 45, cy - 60)
draw.text(
_draw_label_at, 'label text',
fill=color, font=font, stroke_width=1, stroke_fill=color
)
img.save('annotated.png')
5px is a good default.debug=True or an equivalent preview mode for the first annotation on a new image.ImageFont.load_default() or a provided font.references/annotation-script-and-media.md: read before implementing scripted annotations, image diffs, GIF overlays, or reusable media workflows.This skill uses PIL/Pillow. workflows for color-coded callouts. Treat red as bad/removed, avoid circles/ellipses, avoid eye-catching red, keep stroke_fill=<same color as fill>, and preserve line width consistency. Read the code-heavy bundled reference for scripted media workflows.
## Image annotation result
**Status:** complete | blocked | failed
**Input:** `<path/to/source-image>`
**Output:** `<path/to/annotated-image>`
**Image size:** `<width>x<height>`
| Callout | Color | Coordinates | Label | Purpose |
| --- | --- | --- | --- | --- |
| 1 | `#FF9F1C` | `[x1, y1, x2, y2]` | `<label>` | <what reviewers should notice> |
### Validation
- Source image size checked: pass | fail
- Annotated output opened or previewed locally: pass | fail
- Markdown display sizing recommended: pass | fail
Image.open(path).size was checked before coordinate placement.#E63946 is used only for bad or removed things.#FF9F1C or a justified project color.18px padding and consistent 5px visual weight unless image scale requires adjustment.references/annotation-script-and-media.md before frame-by-frame implementation.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
4 skills in this plugin
/pr-screenshotsEmbed before/after screenshots and annotated images in pull request descriptions so reviewers can inspect visible changes quickly. Use this skill when a PR changes layout, styling, CSS, charts, dashboards, data visualizations, UI components, forms, modals, error messages, CLI output, or log formatting./screen-recordingCreate annotated GIF demos and screen recordings for pull requests, bug reports, release notes, and documentation. Use this skill when the user asks to record a UI workflow, capture a before/after demo, make an animated GIF, annotate interactions, or show a bug reproduction./ui-screenshotsCapture screenshots of web apps during development using Playwright and PIL. Use this skill when you need to; capture the current state of a running web app; document a UI before and after a code change.npx claudepluginhub gbb-acelerators/awesome-harness-primitives --plugin visual-prOther plugins' skills for the same job