Skip to content

Instantly share code, notes, and snippets.

@dhamidi
Created February 5, 2026 11:13
Show Gist options
  • Select an option

  • Save dhamidi/64c2c8058c42d1e7d8accee806e05194 to your computer and use it in GitHub Desktop.

Select an option

Save dhamidi/64c2c8058c42d1e7d8accee806e05194 to your computer and use it in GitHub Desktop.
Amp skill: view-screen - Capture and analyze screenshots
name description
view-screen
Use this skill when you need to inspect what is on the user's screen. This skill will provide you with an image file for further analysis that you can then analyze using the built-in look_at tool.

Usage

  1. Ensure the screenshot directory exists:

    mkdir -p ~/.cache/amp/screenshots
  2. Capture the entire main monitor using screencapture:

    screencapture -x -m ~/.cache/amp/screenshots/<filename>.png
    • -x suppresses the capture sound
    • -m captures only the main monitor
  3. Alternative: Capture a specific window by ID (preferred for single windows):

    First, list available windows using the tb__list_windows tool.

    Output example:

    0 Google Chrome: parchment feed svg icon - Google Search - Google Chrome - Dario (Work)
    1 Google Chrome: parchment feed svg icon - Google Search - Google Chrome - Dario (Work)
    2 ghostty: tmux a
    3 ghostty: ~/.local/src/tmux/build-static/out/aarch64-macos/tmux -V
    4 java: Java Component Hot Reload
    

    Then capture by window ID:

    screencapture -x -l <windowid> ~/.cache/amp/screenshots/<filename>.png
    • -l <windowid> captures the window with the specified ID
  4. Alternative: Interactive window selection (use sparingly):

    screencapture -x -w ~/.cache/amp/screenshots/<filename>.png
    • -w enables window selection mode—user must click a window
    • Warning: This is blocking and slow; the user must manually select the window
    • Use only when you need a clean capture of a specific window without other screen content
  5. Filename format: YYYY-MM-DD-<project>-<purpose>.png

    • Example: 2025-12-17-amp-review-landing-page.png
    • <project>: short project identifier (e.g., amp, webapp, docs)
    • <purpose>: brief description of what's being captured (e.g., review-landing-page, debug-modal, check-layout)
  6. Analyze the screenshot using the look_at tool:

    look_at(path="~/.cache/amp/screenshots/<filename>.png", objective="...", context="...")
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment