Imported from vercel-labs/before-and-after (
AGENTS.md). Install upstream withnpx skills add vercel-labs/before-and-after. Copyright stays with the author.
AGENTS.md
before-and-after is an agent skill that attaches screenshots and recordings to GitHub PR descriptions. Browser work belongs to agent-browser; uploads belong to gh --attach. This repo owns skill/SKILL.md, one formatter script, and the verification that proves they work.
skill/SKILL.md the product
skill/scripts/format.mjs the only shipped script (node builtins only)
tests/unit/ formatter invariants
tests/verification/ contract, browser, GitHub, and agent smokes (see VERIFICATION.md)
site/ jm.sv/before-and-after
Rules
- Do not add browser automation, Vercel authentication, capture, recording, video conversion, or media hosting. Delegate to the source tools.
skill/scripts/stays dependency-free and single-file.- Formatter flags version with
SKILL.md. Update both;pnpm verify:skillenforces it. No compatibility shims. - Images may use tables. Local videos stay on their own lines; video tables only take final
user-attachmentsURLs. - Never touch PR prose outside
<!-- before-and-after:start/end -->. - Verify behaviour, not wording. A claim about GitHub or agent-browser belongs in a smoke that would fail if it stopped being true.
- Keep the fixture PR (
verification-fixturebranch) open. Never merge it.
Commands
pnpm verify # unit + contract + local browser smoke
VERIFY_GITHUB_MUTATION=1 pnpm verify:github # live, against the fixture PR
VERIFY_GITHUB_MUTATION=1 VERIFY_AGENT=1 pnpm verify:agent
cd site && pnpm dev
Agentation Watch Mode
When the user says "watch mode", start a loop with agentation_watch_annotations:
- Call
agentation_watch_annotationsand wait for annotations. - For each annotation:
agentation_acknowledge, make the fix, thenagentation_resolvewith a short summary. - Continue watching until the user says stop or a timeout is reached.
