# Screen Capture

> Take screenshots on Wayland/Hyprland with grim + slurp — full screen, a chosen monitor, an interactive region, or the active window — and save to a file or pipe to the clipboard. Use whenever an agent needs to see the screen, capture UI state, grab a region for analysis, or produce an image to reason over. The "eyes" for visual computer use.

- **Type:** Skill
- **Install:** `agentstack add skill-hdprajwal-agent-skills-screen-capture`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [hdprajwal](https://agentstack.voostack.com/s/hdprajwal)
- **Installs:** 0
- **Category:** [Content & Media](https://agentstack.voostack.com/c/content-and-media)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [hdprajwal](https://github.com/hdprajwal)
- **Source:** https://github.com/hdprajwal/agent-skills/tree/main/skills/screen-capture

## Install

```sh
agentstack add skill-hdprajwal-agent-skills-screen-capture
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Screen Capture (Wayland / Hyprland)

`grim` captures; `slurp` selects a region interactively; `hyprctl` + `jq` give
geometry for non-interactive captures. Output goes to a file or to `wl-copy`.

Requires `grim` and `slurp` (both present on this machine). Wayland only — `scrot`
/`maim` won't work here.

## Full screen

```bash
grim ~/screenshot.png                 # focused output (or all, depending on setup)
grim -o "$(hyprctl monitors -j | jq -r '.[] | select(.focused).name')" ~/focused-monitor.png
```

## Interactive region (you draw the box)

```bash
grim -g "$(slurp)" ~/region.png
```

## Active window — no interaction

```bash
geom=$(hyprctl activewindow -j | jq -r '"\(.at[0]),\(.at[1]) \(.size[0])x\(.size[1])"')
grim -g "$geom" ~/active-window.png
```

## Pick a specific window by class — no interaction

```bash
geom=$(hyprctl clients -j | jq -r '.[] | select(.class=="firefox") | "\(.at[0]),\(.at[1]) \(.size[0])x\(.size[1])"' | head -1)
grim -g "$geom" ~/firefox.png
```

## To the clipboard (no file)

```bash
grim - | wl-copy --type image/png                    # full screen → clipboard
grim -g "$(slurp)" - | wl-copy --type image/png      # region → clipboard
```

## Smaller / compressed (good for feeding to a model)

```bash
grim -t jpeg -q 75 ~/shot.jpg        # JPEG at quality 75
grim -t png -l 6 ~/shot.png          # PNG compression level
```

## Reading it back

After saving, Read the image file to analyze it — that's how the agent "sees"
the result. Keep captures in `/tmp` or a scratch dir and clean up after.

## Gotchas

- **Scaling:** `grim` saves at the output's **physical** pixel resolution. If a
  monitor has `scale ≠ 1` (`hyprctl monitors -j | jq '.[].scale'`), image pixels
  = logical × scale. To turn a pixel you see in the screenshot into a cursor
  coordinate, divide by `scale`. This is the #1 mistake when clicking from a
  screenshot — see visual-computer-use-loop.
- **Multi-monitor:** without `-o`/`-g`, `grim` may stitch all outputs; pass `-o`
  for one monitor or `-g` for an exact box.
- **Timing:** capture *after* the UI has settled; add a brief wait after launching
  or focusing a window before grabbing it.

## Pairs with

- **hyprland-control** — geometry of windows/monitors to capture.
- **visual-computer-use-loop** — capture → reason → act → re-capture.
- **screen-recording** — for motion instead of a still (separate skill).

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [hdprajwal](https://github.com/hdprajwal)
- **Source:** [hdprajwal/agent-skills](https://github.com/hdprajwal/agent-skills)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-hdprajwal-agent-skills-screen-capture
- Seller: https://agentstack.voostack.com/s/hdprajwal
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
