/update-latest-screenshot — Screenshot Updater
Update project screenshot from the latest local capture, optimize, hash-rename, and update README.
When to Use
- "Update the project screenshot"
- "Refresh the README screenshot"
- "Take latest screenshot and publish it"
When NOT to Use
- Capturing UI flows or before/after comparisons (use
userflow-screenshots) - Creating marketing assets or mockups (use design tools)
- Screenshots for a different project than agent-sync
Workflow
- Find the latest
.pngin~/Screenshots. - Copy to
docs/images/, optimize withoptipng -o3 -strip all(fallback:pngquant). - Compute SHA-256, rename to
docs/images/agent-sync-screenshot-<hash12>.png. - Update
README.mdimage reference (replace old hash/legacy path). - Cleanup old
docs/images/agent-sync-screenshot-*.pngfiles. - Report results.
Command:
/Users/fedosov/.claude/skills/update-latest-screenshot/scripts/update_screenshot.sh <repo_root>
Constraints
- NEVER run without a repo_root argument — script requires it
- NEVER delete non-managed screenshots (only
agent-sync-screenshot-*.png) - ALWAYS verify
~/Screenshotshas.pngfiles before running - ALWAYS check exit code — non-zero means no screenshots found
Output Format
SCREENSHOT UPDATED
source: {~/Screenshots/filename.png}
target: {docs/images/agent-sync-screenshot-<hash>.png}
size: {before_bytes} → {after_bytes} ({delta})
hash: {sha256_12}
readme: {updated | no change}
cleaned: {N} old file(s) removed
Verification
- New PNG exists at target path
- README.md references the new filename
- No old
agent-sync-screenshot-*.pngfiles remain (except current) - File size is reasonable (>10KB for a real screenshot)