plugins/agentv-self/skills/image-compress-and-docs/SKILL.md
Capture, optimize, and publish screenshots to Astro docs. Use when asked to take screenshots for docs, update doc images, compress PNG assets, or add visual documentation to the agentv.dev docs site. Triggers on "add screenshots to docs", "update docs images", "compress screenshots", "optimize PNG", "document with screenshots".
npx skillsauth add entityprocess/agentv image-compress-and-docsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Capture browser screenshots, optimize them for the web, and publish to the Astro docs site at apps/web/src/content/docs/.
Install optimization tools if not present:
# Ubuntu/Debian (usually pre-installed)
sudo apt-get install -y pngquant optipng
# macOS
brew install pngquant optipng
Verify:
which pngquant optipng
Use agent-browser with a named session and 1440×860 viewport for docs-quality screenshots. Always use --session to isolate, never --headed.
# Start the target server first (e.g., Dashboard)
bun apps/cli/src/cli.ts dashboard --port 14800 &
sleep 3
# Open, set viewport, navigate, screenshot
agent-browser --session docs-shots open http://localhost:14800
agent-browser --session docs-shots wait --load networkidle
agent-browser --session docs-shots set viewport 1440 860
agent-browser --session docs-shots snapshot -i # discover refs
agent-browser --session docs-shots click <ref> # navigate if needed
agent-browser --session docs-shots wait --load networkidle
agent-browser --session docs-shots screenshot # saved to /run/user/1000/agent-browser/tmp/screenshots/
# Clean up
agent-browser --session docs-shots close
kill $(lsof -ti:14800) 2>/dev/null
Screenshots with realistic data: Dashboard screenshots must have populated data — multiple runs with varying pass rates and real targets. If results are sparse, create synthetic JSONL files in .agentv/results/runs/<experiment>/<timestamp>/index.jsonl with realistic fields before launching Dashboard.
Synthetic JSONL record format:
{"test_id": "my-test", "score": 0.95, "target": "claude-sonnet", "experiment": "default", "timestamp": "2026-04-08T09:15:44.003Z", "execution_status": "success", "suite": "my-suite", "category": "default", "duration_ms": 3500, "token_usage": {"input_tokens": 1200, "output_tokens": 400}, "scores": [{"type": "llm-grader", "score": 0.95, "passed": true}], "error": null}
Always apply both passes: pngquant (lossy, 50–70% savings) then optipng (lossless polish).
SHOT="/run/user/1000/agent-browser/tmp/screenshots/screenshot-<id>.png"
OUT="/home/christso/projects/agentv/apps/web/src/assets/screenshots/my-feature.png"
# Pass 1: lossy quantization (creates <name>-fs8.png or use --output)
pngquant --quality 80-95 --force --output /tmp/opt.png "$SHOT"
# Pass 2: lossless polish
optipng -o5 -quiet /tmp/opt.png
# Copy to docs assets
cp /tmp/opt.png "$OUT"
# Check savings
ls -lh "$SHOT" "$OUT"
Typical results: 116 KB raw → 44 KB optimized (62% reduction).
For multiple files:
SHOTS_DIR="/run/user/1000/agent-browser/tmp/screenshots"
ASSETS_DIR="/home/christso/projects/agentv/apps/web/src/assets/screenshots"
for f in shot1.png shot2.png shot3.png; do
pngquant --quality 80-95 --force --output "$SHOTS_DIR/opt-$f" "$SHOTS_DIR/$f"
optipng -o5 -quiet "$SHOTS_DIR/opt-$f"
cp "$SHOTS_DIR/opt-$f" "$ASSETS_DIR/$f"
done
ls -lh "$ASSETS_DIR"
Docs live at: apps/web/src/content/docs/docs/
Assets live at: apps/web/src/assets/screenshots/
Import pattern (Astro <Image> for automatic optimization):
import { Image } from 'astro:assets';
import myFeature from '../../../../assets/screenshots/my-feature.png';
import myDetail from '../../../../assets/screenshots/my-detail.png';
<Image src={myFeature} alt="Descriptive alt text for accessibility" />
Alt text rules:
Placement:
# Feature branch: UI changes
cd /path/to/worktree
git add apps/dashboard/...
git commit -m "fix(studio): ..."
# Main repo: docs changes
cd /home/christso/projects/agentv
git add apps/web/src/assets/screenshots/ apps/web/src/content/docs/
git commit -m "docs(<feature>): add screenshots and update documentation"
git push
<Image> component used (not raw <img>)tools
Analyze AgentV evaluation traces and result JSONL files using `agentv inspect` and `agentv compare` CLI commands. Use when asked to inspect AgentV eval results, find regressions between AgentV evaluation runs, identify failure patterns in AgentV trace data, analyze tool trajectories, or compute cost/latency/score statistics from AgentV result files. Do NOT use for benchmarking skill trigger accuracy, analyzing skill-creator eval performance, or measuring skill description quality — those tasks belong to the skill-creator skill.
development
Author, edit, and lint `governance:` blocks in `*.eval.yaml` files. Use when creating or updating evaluation suites that carry AI-governance metadata (OWASP LLM Top 10, OWASP Agentic Top 10, MITRE ATLAS, EU AI Act, ISO 42001). Also use non-interactively (e.g., from a GitHub Action) to lint changed eval files and report violations against the rules in `references/lint-rules.md`. Do NOT use for running evals or benchmarking — that belongs to agentv-bench.
development
Write, edit, review, and validate AgentV EVAL.yaml / .eval.yaml evaluation files. Use when asked to create new eval files, update or fix existing ones, add or remove test cases, configure graders (`llm-grader`, `code-grader`, `rubrics`), review whether an eval is correct or complete, convert between EVAL.yaml and evals.json using `agentv convert`, or generate eval test cases from chat transcripts (markdown conversation or JSON messages). Do NOT use for creating SKILL.md files, writing skill definitions, or running evals — running and benchmarking belongs to agentv-bench.
development
Use when reviewing eval YAML files for quality issues, linting eval files before committing, checking eval schema compliance, or when asked to "review these evals", "check eval quality", "lint eval files", or "validate eval structure". Do NOT use for writing evals (use agentv-eval-writer) or running evals (use agentv-bench).