屏幕截图捕获
using-screenshots
用于捕获屏幕上下文。
- License 许可
- MIT
- 最近更新
- 2026-11-14
- Stars
- ★ 4.9k
- Forks
- 590
01 前言 Front Matter
- name
- using-screenshots
- description
- Use this to capture screen context.
02 资源文件 7
- 资产文件assets/entitlement_template.yaml1.2 KB
- 参考文档CREATION-LOG.md3.7 KB
- 参考文档references/approver.md3.1 KB
- 参考文档references/attribution.md1.9 KB
- 参考文档references/requester.md5.9 KB
- 脚本scripts/list_entitlements_hierarchy.sh2.9 KB
- 脚本scripts/search_eligible_entitlements.sh3.0 KB
03 SKILL.md 正文
Taking and Analyzing Screenshots
Overview
You CAN take screenshots by combining the Bash tool with platform-specific screenshot commands. Screenshots are saved as image files, then loaded into your context using the Read tool for visual analysis.
When to Use
Use this skill when I ask you to:
- "Take a screenshot"
- "Look at my screen"
- "Analyze this UI bug visually"
- "Review what's currently displayed"
- "Capture and examine the interface"
Quick Reference
| Platform | Command | Interactive Selection |
|---|---|---|
| macOS | screencapture |
-i flag (area selection) |
| Linux | gnome-screenshot, scrot, or import |
-a or -s flag |
Standard workflow:
- Detect platform with
uname -s - Check for available screenshot tool
- Capture to
/tmp/screenshot_$(date +%s).png - Use Read tool with the file path
- Analyze the image
- Optionally clean up temp file
Step-by-Step Instructions
1. Detect Platform
uname -s
- Returns
Darwinfor macOS - Returns
Linuxfor Linux
2. Check Available Tools
macOS: screencapture is always available (built-in)
Linux: Check in priority order:
which gnome-screenshot || which scrot || which import || echo "none"
Priority order (best compatibility):
gnome-screenshot- works on both X11 and Waylandscrot- lightweight, X11 onlyimport- part of ImageMagick
3. Capture Screenshot
Use timestamped filename to avoid conflicts:
macOS:
screencapture -i /tmp/screenshot_$(date +%s).png
-ienables interactive area selection- User clicks and drags to select region
Linux with gnome-screenshot:
gnome-screenshot -af /tmp/screenshot_$(date +%s).png
-afor area selection-fspecifies filename
Linux with scrot:
scrot -s /tmp/screenshot_$(date +%s).png
-senables selection mode
Linux with import:
import /tmp/screenshot_$(date +%s).png
- Provides crosshair for click-and-drag selection
4. Load Image into Context
Read tool: file_path="/tmp/screenshot_12345.png"
The Read tool displays images visually. You'll see the screenshot and can analyze it.
5. Analyze the Image
Once loaded, you can:
- Identify UI elements
- Spot visual bugs
- Review design elements
- Read text content
- Examine layout issues
6. Optional Cleanup
rm /tmp/screenshot_12345.png
Only remove if I won't need the file again.
Handling Missing Tools
If no screenshot tool is available on Linux:
-
Inform me which tool is missing
-
Suggest installation:
- Ubuntu/Debian:
sudo apt install gnome-screenshot - Fedora:
sudo dnf install gnome-screenshot - Arch:
sudo pacman -S gnome-screenshot - ImageMagick:
sudo apt install imagemagick(or equivalent)
- Ubuntu/Debian:
-
Alternative: Ask user to manually take screenshot and provide path
Common Mistakes
❌ Saying "I cannot take screenshots"
Reality: You CAN via Bash + screenshot CLI tools
❌ Forgetting to use Read tool after capture
Reality: The screenshot file must be loaded with Read tool to see it
❌ Using relative paths
Reality: Always use absolute paths (/tmp/...) for Read tool
❌ Not checking for available tools on Linux
Reality: Must detect which tool is installed before attempting capture
Example Workflow
User: "Take a screenshot and help me debug this UI bug"
1. Check platform:
uname -s → Linux
2. Check available tools:
which gnome-screenshot → /usr/bin/gnome-screenshot
3. Capture screenshot:
gnome-screenshot -af /tmp/screenshot_1729012345.png
→ User selects area, file saved
4. Load into context:
Read: file_path="/tmp/screenshot_1729012345.png"
→ Image displays visually
5. Analyze:
"I can see the button alignment is off. The 'Submit' button
is 5px lower than the 'Cancel' button..."
6. Optional cleanup:
rm /tmp/screenshot_1729012345.png
04 同仓库更多 Skills
trigger-pipelines-for-copilot-pr
Trigger ADO pipelines for a Copilot-created PR by posting /azp run comments. Use when the user asks to trigger CI pipelines for a specific PR.
review
Review changes relative to a prior state, such as a diff, pull request, branch, commit, or working-tree changes. Use for change-focused code review and regression analysis. Do not use to assess an existing file, API, design, implementation, or other artifact without a comparison; if the request is ambiguous, ask whether the user wants a change review and what prior state to compare against.
review-pr-local
The authority on pulling a pull request — Azure DevOps or GitHub — into an isolated local worktree so a human can review it in their editor, and on posting human-controlled review comments back to the PR (ADO via the ado PR-thread MCP tools or the Azure DevOps REST API, GitHub via the gh CLI). Auto-detects the platform and all identifiers from the PR URL; not tied to any specific repository. The AI assists an interactive human review and only ever posts comments the human explicitly requests. If you find yourself checking out a PR branch over the user's own working tree, or posting AI-authored review prose the human did not ask for, invoke this skill instead.
policy-check
This skill should be used when the user asks to "run policy check", "check policy", "policy-check", or needs to validate package compliance. Provides guidance on running policy checks for specific packages or the entire repository.
pipeline-test-triage
Triage test failures in an Azure DevOps pipeline run for Fluid Framework. Use when the user shares an ADO build/pipeline URL or build ID and wants failures analyzed, when they ask "why did this pipeline fail", "summarize the test failures", "is this test flaky or a real bug", "compare these runs", or wants bugs filed for genuine failures. Covers the Real Service End to End Tests pipeline as the worked example but applies to any FF test pipeline.
fluid-release
Fluid Framework client release group — minor releases, patch releases, and post-release type test updates. Covers release prep, branching, version bumps, changelogs, release notes, and type test baselines. In autonomous mode, auto-detects state from the repo, attempts to execute, and falls back to a GitHub issue on failure. Triggers on "release", "do the release", "release status", version bump, release notes, changelog, release branch, or release engineering.