# Vision Sandbox

> Agentic Vision via Gemini's native Code Execution sandbox. Use when: user needs image analysis with spatial reasoning, visual math (geometry, measurements), UI screenshot auditing, or object detection with bounding boxes. Triggers on 'analyze this image', 'what's in this screenshot', 'measure', 'UI audit', 'visual grounding'.

- Skill: `johanesalxd/vision-sandbox` (Agent Skill, multi-file: 8 files)
- Install (CLI): `npx skillmds@latest add johanesalxd/vision-sandbox`
- Raw SKILL.md: https://api.skillmd.com/api/skills/johanesalxd/vision-sandbox/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Security
- Author: johanesalxd (https://skillmd.com/u/johanesalxd)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/johanesalxd/vision-sandbox

---


# Vision Sandbox

Gemini's native code execution for precise image analysis. The model writes and runs Python in a Google-hosted sandbox to verify visual data.

## Auth

`GOOGLE_API_KEY` environment variable required.

## Usage

```bash
uv run vision-sandbox --image "path/to/image.png" --prompt "Identify all buttons and provide [x, y] coordinates."

# Custom model
uv run vision-sandbox --image "path/to/image.png" --prompt "Count the items." --model gemini-3.5-flash
```

## Flags

| Flag | Default | Notes |
|---|---|---|
| `--image` / `-i` | — | Path to input image (required) |
| `--prompt` / `-p` | — | Instruction for the model (required) |
| `--model` / `-m` | `gemini-3.5-flash` | Model ID |

## Prompt patterns

- **Spatial grounding:** "Locate the 'Submit' button. Use code execution to verify its center point and return [x, y] coordinates in [0, 1000] scale."
- **Visual math:** "Count items in the list. Use Python to sum their values if prices are visible."
- **UI audit:** "Check if header text overlaps with icons. Calculate bounding box intersections."
- **Counting:** "Count fingers on this hand. Identify bounding box for each and return total."

## Gotchas

- **Output images** (if generated by sandbox) are saved as `sandbox_output_N_N.png` in the working directory.
- **Latency:** 15-30s depending on prompt complexity. Use `yieldMs: 45000` minimum in parallel blocks.

