Screenshot hygiene

From event4u-app/agent-config · View interactive version

Screenshot hygiene is an AI agent skill from the GitHub repository event4u-app/agent-config. Use when creating and embedding a documentation screenshot — detect and redact sensitive data, human-gate data-bearing shots before ship. Triggers 'screenshot for docs', 'screenshot admin panel'.

How to use this skill

Skill file

screenshot-hygiene

The executable workflow behind CODE0.

A screenshot embedded into shipped docs is an irreversible published egress —

once committed and hosted, any PII, secret, or revealing local path on it is out.

This skill makes agents create doc screenshots that are as neutral as possible,

with a conservative, err-on-the-side-of-redaction posture.

When to use

where a screenshot genuinely helps and you are about to capture + embed one.

Do NOT use for:

media-governance-routing for likeness/rights).

(route to design-fidelity / cross-source-consistency).

workflow). Use a text code block with text redaction instead.

Procedure

1. Decide — screenshot, or a safer alternative?

Classify the risk tier first (symmetric friction):

| Tier | Examples | Path |

|---|---|---|

| Illustrative / no data | architecture diagram, logo, icon, wireframe, placeholder-only UI | Embed with a one-line justification. |

| Data-bearing | dashboard, admin panel, form/list with content, any real-looking data | Full workflow + human gate before embed. |

| Terminal / CLI / IDE | shell output, editor, path bars | Forbidden. Use a text code block; redact the text. |

Prefer a diagram or a placeholder-data screenshot over a real-data one whenever

it conveys the same thing. Terminal output → copy the text into a fenced block

and redact the text (cheaper and safer than a pixel screenshot). Respect

screenshots.forbid_terminal_capture (default true).

2. Capture — via the host, never a bundled engine

Use the host's capability (claude-in-chrome for web UI, Playwright's

page.screenshot inside a test harness). Record which tool captured it. The

package ships no capture engine (no-runtime-floor). Capture into a working file

under the scratchpad or docs/media/ — do not embed yet.

3. Detect — flag candidate sensitive regions (a helper, not a clearance)

OCR the image (host OCR, or the image-analyser skill's text read) and scan the

extracted text against the taxonomy below and screenshots.identity_allowlist.

Produce a flagged-regions report: for each hit, the text, the bounding box,

and the reason. Detection reduces the human's work — it never certifies the

screenshot as safe (it cannot see semantic leaks: aggregate counts that reveal

real users, real-vs-fake data tells, re-identification via name structure).

Anonymization taxonomy — always redact / refuse:

/home/<realname>/…).

Allowed (no redaction): well-known fake data (Max Mustermann, Musterstraße,

@example.com); the maintainer's OWN public handle shown as a username, and a

path rooted at that handle (/Users/<handle>/…). The maintainer's **real name

is never allowed**, even co-located with the handle. The safe set lives in

screenshots.identity_allowlist (default empty → every identity is human-decided).

4. Redact — deterministic opaque cover, never lossy inpaint

Draw an opaque box (or heavy blur/pixelation) over each flagged region.

Deterministic, visible, and non-reversible — never AI inpaint (lossy;

reconstructs, may hallucinate; docs need visual accuracy). Redaction is

tool-agnostic — use whatever image tool is present in the environment:

each region, e.g.

magick in.png -fill black -draw "rectangle X1,Y1 X2,Y2" out.png (repeat

-draw per region), or -region … -blur 0x18 for a blur.

composite an opaque rectangle over each region.

If no image tool is available → missing-tool-handling: STOP, surface the

flagged regions, and hand off to the maintainer to redact manually. **Never ship

an unredacted screenshot because a tool was missing.** Never silently downgrade

the guarantee.

5. Pre-embed audit — the human gate (data-bearing tier)

For a data-bearing screenshot, embedding is a published egress → **this-turn

human confirmation** per CODE0.

Present the redacted candidate + the checklist; wait for the answer.

Pre-embed audit checklist:

Unresolved / uncertain on any line → redact or refuse, never ship-and-hope.

An illustrative / no-data screenshot skips the confirmation but still passes the

checklist and carries a one-line "no sensitive data" justification.

6. Embed — into the docs surface

Place the reviewed, redacted file under docs/media/ (or the docs image folder)

and reference it from a canonical docs/*.md. For the Starlight site,

site/sync-docs.mjs auto-copies docs/media/* into site/public/media/ and

rewrites ](media/…) links — so the embed flows to the site on build. Add

descriptive alt text. Generalize the same discipline to a README or any other

docs surface.

Output

taxonomy item covered by an opaque box/blur (or an explicit

no-sensitive-data justification for the illustrative tier).

what was redacted (or "none — illustrative"), and — for data-bearing shots —

that human confirmation was obtained this turn.

Gotcha

(aggregate counts, real-vs-fake tells, name-structure re-identification) and

misread garbled text. Never treat a clean automated scan as clearance — the

human gate stands for data-bearing shots.

fine; "Matthias Müller" next to it is still redacted.

unredacted.

can leak an absolute path with a real name plus a live token. Use text.

Do NOT

irreversible published egress.

shot is human confirmation.

redaction.

See also

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.