
instant screen shot into claude
Download screenpunk.exe to your Windows system
Run the executable to set up C:\screenpunk\ with the skill and batch file
Say "look at the latest screenpunk" in Claude Code
screenpunk.exe automatically installs the skill into your Windows Claude installation.
The files below are provided in case you would like to install the skill on another Windows system or remote server.
# screenpunk
Fetch recent screenshots from your local workstation and/or remote cloud storage.
## Requirements
- `~/.screenpunk` config file (created when you sync via screenpunk.matraex.com)
- Screenshots in `~/screenpunk/screenshots/` (Mac/Linux) or `C:\screenpunk\screenshots\` (Windows)
## When to use
User says things like: "check screenpunk", "show my latest screenshot", "what's in screenpunk?", "look at my latest screenpunks"
## Run
Mac/Linux:
!screenpunk_skill.sh
Windows:
!screenpunk_skill.bat
## Output format
JSON with two keys:
- `local` — array of file paths on the local machine
- `remote` — array of CDN URLs from cloud storage
```json
{"local":["/home/user/screenpunk/screenshots/screen-20260222-143022.png"],"remote":["https://cdn.screenpunk.matraex.com/screenshots/screen-20260222-143022.png"]}
```
## How to use the output
1. Run the skill script to get the JSON output
2. Read the most recent local file path or remote CDN URL
3. Use the Read tool to view the image and show it to the user
4. If both local and remote are empty, tell the user no screenshots were found
## Config file setup
The `~/.screenpunk` config is created automatically when you run `?remotelocationsync=CODE` from the screenpunk website. If it is missing, visit https://screenpunk.matraex.com/ to connect.
Config format (`~/.screenpunk`):
```json
{
"code": "CODEFROMSERVER",
"connecteddatetime": "2026-02-22 12:00:00",
"accountname": "Your Name",
"accountemail": "you@example.com"
}
```
## Notes
- Local screenshots are listed newest first
- Remote CDN URLs require a `code` in the config and a configured Lambda endpoint
- Run history is appended to `~/.screenpunk.skill.run` after each run
@echo off
REM screenpunk_skill.bat — screenpunk Claude Code skill runner
REM Runs under Claude Code skill only. Outputs JSON to stdout.
REM Usage: screenpunk_skill.bat
setlocal enabledelayedexpansion
set "CONFIG=%USERPROFILE%\.screenpunk"
set "HISTORY=%USERPROFILE%\.screenpunk.skill.run"
set "SCREENSHOT_DIR=C:\screenpunk\screenshots"
set "LAMBDA_URL=https://REPLACE_WITH_LAMBDA_URL"
REM ---- Check config ----
if not exist "%CONFIG%" (
echo {"error":"screenpunk not configured — visit screenpunk.matraex.com to connect"}
exit /b 0
)
REM ---- Run PowerShell to do the heavy lifting ----
powershell -NoProfile -Command ^
"$config_path = '%CONFIG%'; " ^
"$history_path = '%HISTORY%'; " ^
"$screenshot_dir = '%SCREENSHOT_DIR%'; " ^
"$lambda_url = '%LAMBDA_URL%'; " ^
"try { $cfg = Get-Content $config_path -Raw | ConvertFrom-Json } catch { Write-Output '{\"error\":\"could not read ~/.screenpunk config\"}'; exit 0 }; " ^
"$code = $cfg.code; " ^
"$local_files = @(); " ^
"if(Test-Path $screenshot_dir) { $local_files = Get-ChildItem $screenshot_dir | Sort-Object LastWriteTime -Descending | Select-Object -First 20 | ForEach-Object { $_.FullName } }; " ^
"$local_count = $local_files.Count; " ^
"$remote_files = @(); " ^
"$remote_count = 0; " ^
"if($code -and $lambda_url -notlike '*REPLACE*') { " ^
"try { " ^
"$body = '{\"remotelocationcode\":\"' + $code + '\",\"limit\":20}'; " ^
"$resp = Invoke-RestMethod -Uri $lambda_url -Method Post -Body $body -ContentType 'application/json' -TimeoutSec 10; " ^
"if($resp.available) { $remote_files = $resp.available; $remote_count = $remote_files.Count } " ^
"} catch { } " ^
"}; " ^
"$ts = (Get-Date).ToUniversalTime().ToString('yyyy-MM-ddTHH:mm:ss'); " ^
"Add-Content -Path $history_path -Value ('{\"ts\":\"' + $ts + '\",\"local_count\":' + $local_count + ',\"remote_count\":' + $remote_count + ',\"status\":\"ok\"}'); " ^
"$local_json = '[' + (($local_files | ForEach-Object { '\"' + $_.Replace('\','\\') + '\"' }) -join ',') + ']'; " ^
"$remote_json = '[' + (($remote_files | ForEach-Object { '\"' + $_ + '\"' }) -join ',') + ']'; " ^
"Write-Output ('{\"local\":' + $local_json + ',\"remote\":' + $remote_json + '}')"
endlocal
#!/bin/bash
# screenpunk_skill.sh — screenpunk Claude Code skill runner
# Runs under Claude Code skill only. Outputs JSON to stdout.
# Usage: ./screenpunk_skill.sh
CONFIG="$HOME/.screenpunk"
HISTORY="$HOME/.screenpunk.skill.run"
SCREENSHOT_DIR="$HOME/screenpunk/screenshots"
# Lambda endpoint for remote locations (set once Lambda is deployed)
LAMBDA_URL="https://REPLACE_WITH_LAMBDA_URL"
# ---- Check config ----
if [ ! -f "$CONFIG" ]; then
echo '{"error":"screenpunk not configured — visit screenpunk.matraex.com to connect"}'
exit 0
fi
# Read config fields using grep/sed (no jq dependency)
CODE=$(grep -o '"code"\s*:\s*"[^"]*"' "$CONFIG" | sed 's/.*"\([^"]*\)"$/\1/')
# ---- List local screenshots ----
local_files="[]"
if [ -d "$SCREENSHOT_DIR" ]; then
# Build JSON array of paths, newest first
local_list=$(ls -t "$SCREENSHOT_DIR" 2>/dev/null | head -20 | while read f; do
echo "\"$SCREENSHOT_DIR/$f\""
done | paste -sd, -)
if [ -n "$local_list" ]; then
local_files="[$local_list]"
fi
fi
local_count=$(ls "$SCREENSHOT_DIR" 2>/dev/null | wc -l | tr -d ' ')
# ---- Fetch remote screenshots ----
remote_files="[]"
remote_count=0
if [ -n "$CODE" ] && [ "$LAMBDA_URL" != "https://REPLACE_WITH_LAMBDA_URL" ]; then
response=$(curl -s -X POST "$LAMBDA_URL" \
-H "Content-Type: application/json" \
-d "{\"remotelocationcode\":\"$CODE\",\"limit\":20}" 2>/dev/null)
if [ -n "$response" ]; then
# Extract available array from response
avail=$(echo "$response" | grep -o '"available"\s*:\s*\[[^]]*\]' | sed 's/"available"\s*:\s*//')
if [ -n "$avail" ]; then
remote_files="$avail"
remote_count=$(echo "$avail" | grep -o '"http' | wc -l | tr -d ' ')
fi
fi
fi
# ---- Append to history ----
ts=$(date -u +"%Y-%m-%dT%H:%M:%S")
echo "{\"ts\":\"$ts\",\"local_count\":$local_count,\"remote_count\":$remote_count,\"status\":\"ok\"}" >> "$HISTORY"
# ---- Output JSON ----
echo "{\"local\":$local_files,\"remote\":$remote_files}"