Chuyển đến nội dung
Skillpedia
Khác33k · #8859

screenshot

Skill này làm gì

Skill này chụp ảnh màn hình máy tính của bạn, dù là toàn bộ màn hình, một cửa sổ hay một vùng. Skill dành cho người cần ảnh chụp những gì đang hiển thị trên màn hình.

Khi nào nên dùng

  • ✓Khi bạn yêu cầu rõ ràng chụp ảnh màn hình desktop hoặc một ứng dụng cụ thể.
  • ✓Khi bạn muốn lưu một vùng của màn hình vào đường dẫn bạn chọn.
  • ✓Khi trình duyệt hoặc công cụ thiết kế không thể chụp được nội dung bạn cần và phải dùng chức năng chụp của hệ điều hành.

Liên kết skill

https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/media/screenshot/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/davila7/claude-code-templates/blob/main/cli-tool/components/skills/media/screenshot/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Chụp ảnh toàn bộ màn hình của tôi và lưu vào thư mục tôi chỉ định.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Agent chạy một script chụp trên máy tính của bạn và lưu ảnh vào đường dẫn bạn đưa ra, hoặc vào thư mục ảnh chụp màn hình mặc định của hệ thống. Trên Mac, agent kiểm tra quyền ghi màn hình trước.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

Screenshot Capture

Follow these save-location rules every time:

  1. If the user specifies a path, save there.
  2. If the user asks for a screenshot without a path, save to the OS default screenshot location.
  3. If Codex needs a screenshot for its own inspection, save to the temp directory.

Tool priority

  • Prefer tool-specific screenshot capabilities when available (for example: a Figma MCP/skill for Figma files, or Playwright/agent-browser tools for browsers and Electron apps).
  • Use this skill when explicitly asked, for whole-system desktop captures, or when a tool-specific capture cannot get what you need.
  • Otherwise, treat this skill as the default for desktop apps without a better-integrated capture tool.

macOS permission preflight (reduce repeated prompts)

On macOS, run the preflight helper once before window/app capture. It checks Screen Recording permission, explains why it is needed, and requests it in one place.

The helpers route Swift's module cache to $TMPDIR/codex-swift-module-cache to avoid extra sandbox module-cache prompts.

bash <path-to-skill>/scripts/ensure_macos_permissions.sh

To avoid multiple sandbox approval prompts, combine preflight + capture in one command when possible:

bash <path-to-skill>/scripts/ensure_macos_permissions.sh && \
python3 <path-to-skill>/scripts/take_screenshot.py --app "Codex"

For Codex inspection runs, keep the output in temp:

bash <path-to-skill>/scripts/ensure_macos_permissions.sh && \
python3 <path-to-skill>/scripts/take_screenshot.py --app "<App>" --mode temp

Use the bundled scripts to avoid re-deriving OS-specific commands.

macOS and Linux (Python helper)

Run the helper from the repo root:

python3 <path-to-skill>/scripts/take_screenshot.py

Common patterns:

  • Default location (user asked for "a screenshot"):
python3 <path-to-skill>/scripts/take_screenshot.py
  • Temp location (Codex visual check):
python3 <path-to-skill>/scripts/take_screenshot.py --mode temp
  • Explicit location (user provided a path or filename):
python3 <path-to-skill>/scripts/take_screenshot.py --path output/screen.png
  • App/window capture by app name (macOS only; substring match is OK; captures all matching windows):
python3 <path-to-skill>/scripts/take_screenshot.py --app "Codex"
  • Specific window title within an app (macOS only):
python3 <path-to-skill>/scripts/take_screenshot.py --app "Codex" --window-name "Settings"
  • List matching window ids before capturing (macOS only):
python3 <path-to-skill>/scripts/take_screenshot.py --list-windows --app "Codex"
  • Pixel region (x,y,w,h):
python3 <path-to-skill>/scripts/take_screenshot.py --mode temp --region 100,200,800,600
  • Focused/active window (captures only the frontmost window; use --app to capture all windows):
python3 <path-to-skill>/scripts/take_screenshot.py --mode temp --active-window
  • Specific window id (use --list-windows on macOS to discover ids):
python3 <path-to-skill>/scripts/take_screenshot.py --window-id 12345

The script prints one path per capture. When multiple windows or displays match, it prints multiple paths (one per line) and adds suffixes like -w<windowId> or -d<display>. View each path sequentially with the image viewer tool, and only manipulate images if needed or requested.

Workflow examples

  • "Take a look at <App> and tell me what you see": capture to temp, then view each printed path in order.
bash <path-to-skill>/scripts/ensure_macos_permissions.sh && \
python3 <path-to-skill>/scripts/take_screenshot.py --app "<App>" --mode temp
  • "The design from Figma is not matching what is implemented": use a Figma MCP/skill to capture the design first, then capture the running app with this skill (typically to temp) and compare the raw screenshots before any manipulation.

Multi-display behavior

  • On macOS, full-screen captures save one file per display when multiple monitors are connected.
  • On Linux and Windows, full-screen captures use the virtual desktop (all monitors in one image); use --region to isolate a single display when needed.

Linux prerequisites and selection logic

The helper automatically selects the first available tool:

  1. scrot
  2. gnome-screenshot
  3. ImageMagick import

If none are available, ask the user to install one of them and retry.

Coordinate regions require scrot

Câu hỏi thường gặp

Ảnh chụp được lưu ở đâu?

Vào đường dẫn bạn chỉ định. Nếu không đưa ra đường dẫn, ảnh sẽ được lưu vào thư mục mặc định của hệ thống.

Trên Mac có cần quyền đặc biệt không?

Có. Skill chạy kiểm tra trước về quyền Ghi màn hình trước khi chụp cửa sổ hoặc ứng dụng.

Khi nào tôi không nên dùng skill này?

Khi có công cụ tích hợp tốt hơn để chụp nội dung, như công cụ thiết kế hoặc công cụ trình duyệt, skill sẽ ưu tiên công cụ đó.

Chi tiết

Mô tả gốc của tác giả

Use when the user explicitly asks for a desktop or system screenshot (full screen, specific app or window, or a pixel region), or when tool-specific capture capabilities are unavailable and an OS-level capture is needed.

repo: davila7/claude-code-templates

Độ phổ biến

Sao GitHub
33k
Vị trí xếp hạng
#8859
Giấy phép
MIT
Cập nhật
2/11/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự