image-annotations
できること
このツールは、画像に矢印、枠、ラベルを追加するものです。スクリーンショットや図の中の重要な部分を目立たせるのに役立ちます。
使う場面
- ✓スクリーンショットのどこでバグが起きたかを示したいとき。
- ✓2つの画像の間で何が変わったかを示したいとき。
- ✓技術図に説明のラベルを付けたいとき。
スキルのリンク
https://github.com/github/awesome-copilot/blob/main/skills/image-annotations/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“このスクリーンショットのログインボタンに矢印を付けて、「ログインボタン」という文字を入れてください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
画像と、強調したい内容を伝えると、ツールが枠や矢印を描き、指定した文字を追加します。良い点か悪い点かを示すために、色を使い分けることもできます。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Image Annotations
Add visual callouts to any image — screenshots, diagrams, architecture docs, demo frames — using PIL/Pillow. Highlights what changed or what to look at, so reviewers don't have to guess.
When to Use This Skill
Use this skill when you need to:
- Highlight a specific area in a screenshot for a PR description
- Annotate before/after images to show what changed
- Add labels and callouts to diagrams or architecture images
- Create annotated frames for animated GIF demos
Prerequisites
pip install Pillow -q
Color Rules
- Red (
#E63946) — only for "bad" / "removed" things (e.g., circling a bug being fixed) - Yellowish-orange (
#FF9F1C) — for neutral highlights ("look here", "new feature", etc.) - Never use red just because it's eye-catching — red = bad/removed
Font
- Use Ink Free (
C:/Windows/Fonts/Inkfree.ttf) for a handwritten look on Windows - On Linux/macOS, fall back to
ImageFont.load_default() - Size 36 for annotations on ~1400px-wide images
stroke_width=1withstroke_fill=<same color as fill>— gives body without being too thick- Do NOT use white stroke — looks like a bad glow effect
Shapes
- Prefer rounded rectangles over circles/ellipses — less pixelation at edges
draw.rounded_rectangle([x1, y1, x2, y2], radius=14, outline=color, width=5)- Padding 18px around the target content
Reference Snippet
from PIL import Image, ImageDraw, ImageFont
# Setup
font = ImageFont.truetype('C:/Windows/Fonts/Inkfree.ttf', 36) # or load_default()
color = '#FF9F1C' # orange for highlights
stroke = 5
pad = 18
img = Image.open('screenshot.png')
draw = ImageDraw.Draw(img)
# 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)
draw.line([x2 + pad, cy, x2 + pad + 40, cy - 30], fill=color, width=stroke)
# Label — same-color stroke for body, NO white stroke
draw.text(
(x2 + pad + 45, cy - 60), 'label text',
fill=color, font=font, stroke_width=1, stroke_fill=color
)
img.save('annotated.png')
Algorithmic Annotation — annotate.py
For images with multiple elements to annotate, use the annotate.py module below. Save it next to your script and import from it. It handles automatic label placement without overlapping.
Quick start
from annotate import annotate_image
result = annotate_image(
'screenshot.png',
[
{'elem': (560, 275, 635, 390), 'label': 'button', 'draw_box': True},
{'elem': (105, 453, 236, 470), 'label': 'status text'},
],
debug=True,
)
result.save('annotated.png')
elem:(x1, y1, x2, y2)tight bounding box — must be exact pixel coordinateslabel: text label (supports\nfor multi-line)draw_box: ifTrue, draws a rounded rectangle around the element. IfFalse(default), draws a V-arrowhead pointing at the elementdebug: shows targeting rectangles and candidate heatmap for placement validation
Coordinate grid helper
Always use grid_image() before annotating an unfamiliar image. Scaled-down previews display images smaller than actual pixel dimensions — the error compounds as you move away from (0,0).
from annotate import grid_image
grid = grid_image('screenshot.png', step=100)
grid.save('grid.png')
Then verify with small crops:
from PIL import Image
img = Image.open('screenshot.png')
crop = img.crop((x1 - 20, y1 - 20, x2 + 20, y2 + 20))
crop.save('verify.png')
Algorithm overview
- Ring search: candidates between MIN_ARROW (25px) and MAX_ARROW (120px) from element edge
- Contrast scoring: prefers placements where label text is readable —
abs(avg_brightness - 147) - std * 0.3 - dist * 0.02 - Joint resolution: candidates computed independently, placed greedily (best score first)
- Hard blocks: labels cannot overlap any other annotation's element or breathing box
- Proximity penalty: labels within 40px of other placed boxes get a score penalty
- Arrow crossing penalty: -50 for arrows crossing already-placed arrows
Debug mode colors
| Color | Meaning |
|---|---|
| Cyan | Target element box (elem + padding) |
| Gray | Exclusion zone (MIN_ARROW buffer) |
| Red→Green | Candidate heatmap (red=bad, green=good) |
| Magenta | Chosen label position |
| Orange | Final rendered annotation |
Arrow styles
…
よくある質問
どんな色でも使えますか?
赤色は、問題がある箇所や削除された箇所を示すときだけ使ってください。中立的な強調や新機能には、黄色みを帯びたオレンジ色を使うのがおすすめです。
ツールは文字をどこに配置すればよいか、どうやって判断するのですか?
重要な部分を隠さないよう、最適な位置を探します。また、文字同士が重ならないようにアルゴリズムを使って調整します。
何かをインストールする必要がありますか?
はい、Python環境にPillowライブラリをインストールしておく必要があります。
詳細
作者による元の説明
Annotate screenshots, diagrams, and images with callout rectangles, arrows, labels, and color-coded highlights using PIL. Includes rules for animated GIF annotations with timing and pacing.
repo: github/awesome-copilot
人気
- GitHubのスター
- 40k
- ランキング
- #7246
- ライセンス
- MIT
- 更新日
- 2026/10/15
コメント
- …
このリポジトリの他のスキル
acquire-codebase-knowledge
40kエージェントが、既存のコードプロジェクトを理解してドキュメント化できるよう支援します。新しく参加するメンバーのオンボーディングや、アーキテクチャの全体像の把握に役立ちます。
acreadiness-assess
40kエージェントが、プロジェクトのAI対応状況を評価してレポートを生成できるよう支援します。プロジェクトがAIツールをどの程度活用できる状態にあるかを把握するのに役立ちます。
acreadiness-generate-instructions
40kエージェントが、評価結果をもとにAIツール向けの指示文を作成できるよう支援します。AIがコードとどのようにやり取りするかを改善し、特定された不足点を解消するのに役立ちます。
acreadiness-policy
40kエージェントが、AIプロジェクトの評価ポリシーの策定や適用を支援できるようにします。プロジェクトの評価方法を標準化し、コンプライアンスを確保するのに役立ちます。
似ているスキル
canvas
394k接続されたMacのパネルにホスト型のビジュアルウィジェットを表示し、そのパネルを隠したり別のページに移動したりするようエージェントを支援します。
control-ui
394kセッション、ダッシュボード、接続されたGatewayを含め、OpenClaw Control UIを整理し、問題を解決するようエージェントを支援します。
diagram-maker
394kプロセス、システムのアーキテクチャ、ホワイトボードのスケッチのために、SVG、HTML、または編集可能なExcalidrawとして、分かりやすい図を作るようエージェントを支援します。