# Screenshot Rot

> Stop documentation screenshots and diagrams going stale. Inventory every image in the docs and decide per image whether text, a code block or a table would serve instead; replace the hand-taken screenshots that remain with scripted captures (browser automation, seeded demo data, fixed viewport, clock, locale and fonts) regenerated in CI, where a changed image opens a pull request for review; keep diagrams as text sources beside the page; and write alt text that states the image's point. Use whenever someone says "our screenshots are out of date", "the docs still show the old UI", "who re-shoots the images after a redesign" or "can we generate docs screenshots automatically". Not for a screen's hierarchy and spacing (visual-design), a WCAG audit (accessibility-audit), a build spec for engineers (design-handoff), or visual regression of the product itself (visual-review).

- Skill: `greenblacked/screenshot-rot` (Agent Skill, multi-file: 4 files)
- Install (CLI): `npx get-skill add greenblacked/screenshot-rot`
- Raw SKILL.md: https://api.skillmd.com/api/skills/greenblacked/screenshot-rot/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Web & Frontend
- Author: greenblacked (https://skillmd.com/u/greenblacked)
- Updated: 2026-11-19
- Page: https://skillmd.com/skills/greenblacked/screenshot-rot

---


# Screenshot Rot

This is done when every image in the docs is one of three things: replaced by text, generated by a committed capture script that CI re-runs, or a hand-made image with a named owner and a last-verified date. Diagrams are text sources rendered at build time, every informative image has alt text stating its point, and a change to the product's UI produces a reviewable pull request of updated images within one scheduled run.

The usual failure is that a stale image fails no check. A writer takes screenshots by hand, on their own account, at their own zoom level and theme, and they are accurate for exactly one release. After a redesign the text gets fixed because someone searches for the old label, but nobody can search an image, so the old navigation bar stays in forty pages until a customer posts it in a support thread. The occasional "re-shoot everything" project costs a week, leaves the images inconsistent with each other, and starts rotting the day it ends.

## Scope

Use for screenshots, annotated captures and diagrams inside product or developer documentation. Judging whether a screen's design works belongs to `visual-design`; auditing the product for WCAG conformance belongs to `accessibility-audit`; the spec a designer hands to engineers belongs to `design-handoff`. Visual regression testing of the product itself, with baselines that gate a release, belongs to `visual-review`, and flaky screenshot diffs in an end-to-end suite to `e2e-testing`; the capture technique overlaps, but the purpose here is the docs. Drawing a good diagram is `architecture-diagrams`'s job; this skill only gets diagrams out of image files and keeps them current.

## Workflow

### 1. Inventory the images

List every image the docs reference: Markdown image syntax, HTML `img` elements, and any image components the docs framework adds. For each, record the page or pages, the file, when the file last changed (`git log -1 --format=%cs -- <file>`), what it shows, and its alt text. List image files that no page references too; they are deleted, not triaged. `references/image-triage.md` has the search patterns and the inventory columns.

### 2. Decide, per image, whether it needs to be an image

Most screenshots in reference and how-to pages exist because pasting a picture was quicker than writing a sentence. Take the first row that fits:

| The image shows | Replace with | Why |
| --- | --- | --- |
| Terminal output or a command | A code block with the command and its output | Copyable, searchable, and testable by `code-sample-testing` |
| Code or a config file | A code block | Same, and a diff shows when it changes |
| Where one setting lives | Text naming the path, labels in bold exactly as the UI shows them | The label is searchable and a terminology lint can check it |
| A table of values | A table | Readable by screen readers and translatable |
| A diagram | A text source (Mermaid, PlantUML) beside the page | Reviewable in a diff and editable by anyone |
| A busy screen where the position of a control is the point, or a visual result | Keep, as a scripted capture | Only an image conveys layout |
| A photo, illustration or marketing visual | Keep, by hand, with an owner and date | Nothing to script |

Expect a large share of the inventory to go. Every image removed is one that cannot rot and one that is now searchable, translatable and readable by assistive technology.

### 3. Script the captures that remain

Write one capture script per image, or per page, in the repository beside the docs, using browser automation. Determinism is the whole point: a capture that differs on every run produces a pull request nobody reads. Pin all of these:

- the browser and its fonts, through a pinned container image, because font rendering differs between machines;
- viewport size, device scale factor, colour scheme, locale and timezone;
- the clock, so dates and "3 minutes ago" do not change between runs;
- the data, from a demo tenant reset from fixtures before each run;
- animations disabled, the text caret hidden, and volatile regions such as avatars masked.

Wait for a specific element to be visible, not for the network to go quiet. Crop to the element that matters rather than the full page, so an unrelated change elsewhere does not regenerate the image. Draw highlights and callouts in the script, for example a CSS outline injected on the target element, never in an image editor afterwards: an edited export cannot be regenerated, so the first UI change turns it back into a hand-made image. `references/capture-recipe.md` has a worked capture script and the full determinism checklist.

### 4. Seed demo data that is safe to publish

Captures show data. Use a dedicated demo account populated from fixtures with invented, plausible names and values, never a copy of a real customer's workspace and never the writer's own account. A screenshot is a publication; a real email address or invoice total in one is a disclosure that lives in every cached copy of the page.

### 5. Regenerate in CI and review changes as a pull request

Run the captures on a schedule and on each release branch, against a build of that release. Capture into a scratch directory, compare each image with the committed one using a pixel diff with a small tolerance for anti-aliasing, and copy over only the images that changed beyond it. When any did, open or update one pull request carrying the new images, the diff images, and the pages that use each.

A person reviews that pull request because a changed image usually means the text around it is now wrong too: the step that says "click Save" when the button now reads "Save changes". Committing images straight to the default branch would update the picture and leave the instructions false. On GitHub, a pull request opened with the workflow's own `GITHUB_TOKEN` does not trigger other workflows, so the docs build will not run on it until someone pushes to it or the job uses a different credential; plan for that rather than discovering it.

### 6. Turn diagrams into text

Replace each diagram image with its source in Mermaid or PlantUML, committed beside the page. Where the docs platform renders Mermaid natively, the fenced block is the diagram; elsewhere, render in the docs build and do not commit the output. Delete the old exported image once the source exists, so nobody edits the picture instead of the source. For choosing the tool and drawing a diagram that reads well, use `architecture-diagrams`.

### 7. Write alt text that states the point

Alt text says what the reader should take from the image in the context of that step: "The Invoices switch, under Billing, turned on". "Screenshot of the settings page" tells a screen reader user that something exists and nothing about it. Keep the alt text next to the capture script's entry for that image, so a reviewer of an image change sees the description and can tell when it no longer matches. If the surrounding text already says everything the image shows, the image is redundant; remove it or mark it decorative with empty alt text.

### 8. Own what stays hand-made

Each remaining hand-made image gets an owner and a last-verified date in the inventory, and the owner reviews them at each major UI release. Report the share of images that are text or scripted, and the oldest hand-made image, each time the inventory is refreshed.

Once captures are scripted, each translated docs locale is another run of the same script with a different locale and fixture set, which is the cheapest localisation win in the docs.

## What to hand back

- The inventory, with the decision for each image and the orphan files deleted.
- The images replaced by text, code blocks or tables, as a list of pages changed.
- The capture scripts, fixtures, pinned image and the CI job, with one run's output.
- The diagram sources committed and the exported images removed.
- The hand-made images remaining, each with owner and date.
- The share of images scripted or text, before and after.

## Anti-patterns

**Re-shooting everything by hand.** It costs a week and starts going stale the same day. Script it once.

**Screenshots of terminals and code.** They cannot be copied, searched or tested, and they are the commonest rotting image in developer docs.

**Captures that differ on every run.** Unpinned fonts, a live clock or shared demo data make every scheduled run a pull request, and the real change hides among the noise.

**Annotations drawn in an editor.** The arrow survives one release; the next regeneration discards it or someone stops regenerating.

**Auto-committing new images.** The picture updates and the instructions beside it stay wrong. A changed image is a prompt to re-read the page.

**Real data in a screenshot.** A customer name in a docs image is published to everyone and cached for years.

**Alt text that names the file type.** "Screenshot of dashboard" gives a screen reader user nothing to act on.

## Reference files

- `references/capture-recipe.md` — read when writing the capture scripts and the CI job: a worked browser-automation capture, the determinism checklist, the image manifest, and the compare-and-propose step.
- `references/image-triage.md` — read when building the inventory and deciding each image: search patterns for image references, the inventory columns, the triage questions in full, and alt text examples by image type.

