/corgi:before-afterfrom corgi
Captures before/after screenshots of the same screen on base and feature branches to prove visual changes in PRs. Use when a UI diff alone isn't enough evidence.
Ships in corgi. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Read ../_shared/conventions.md first (finish what you start, attribution, unattended runs).
Done when: before.png and after.png of the same screen are captured, read by you, and in the PR/MR body.
A UI diff says what the code does; it never says what the screen looked like before. The reviewer either trusts the description or builds the base branch themselves - and nobody builds the base branch. So the change ships on a claim.
This skill produces the evidence: the same screen, same device, same data, captured twice - once on the base branch, once on yours - attached to the PR/MR.
base branch ──▶ build ──▶ launch ──▶ navigate ──▶ capture before.png
│
your branch ──▶ build ──▶ launch ──▶ navigate ──▶ capture after.png
│
upload ──▶ PR/MR body
Neighbours, so you pick the right one:
| Skill | Compares your build against |
|---|---|
| this one | the state it replaced (the base branch) |
design-parity | a design - Figma, a mockup, a prototype |
mobile-screenshots | nothing; it produces store marketing assets |
| the repo's visual harness | a committed baseline, as a CI assertion |
/tmp - the host names it in the
environment. Shared /tmp leaks between sessions and users.Run this when the change is visible and the reviewer cannot see it from the diff: layout, spacing, colour, a component swapped, copy in situ, an empty state, a new control. Skip it for logic, API shape, tests, config, or a copy change whose string is right there in the diff.
Cost is two builds. On a native app that is real time - say so and get a yes before starting, unless the user already asked for the comparison.
Get to the screen once, on the branch you are on, and write down the exact route: launch → the taps → the scroll. That route is replayed verbatim on the base build, so record it as steps, not as a memory.
Reaching it:
mobile skill: Maestro, argent, Playwright) for the tap sequence. Prefer a
flow file over ad-hoc taps: the flow is what makes the second capture identical.Test order #1 (discount) is.A screen behind a feature flag needs the flag on in both builds. Check it rather than assume - a flag that defaults off gives you two identical "before" shots and a very confusing hour.
This is where the time goes, so get it right once.
-scheme App -configuration Staging can
produce a binary with the production bundle id and none of the staging resources, which
then crashes on launch with a nil unwrap in didFinishLaunchingWithOptions. Use the
dedicated scheme (App Staging) and confirm PRODUCT_BUNDLE_IDENTIFIER and
FULL_PRODUCT_NAME with -showBuildSettings before installing.simctl launch is not a
running app. Screenshot it; if you land on the home screen, read the crash report
(~/Library/Logs/DiagnosticReports/) rather than relaunching and hoping.after.png.git checkout <base>), rebuild, reinstall.before.png.git branch --show-current.Frame both shots the same way: the panel that changed should occupy the same part of the screen in each. A before framed on a different scroll offset reads as a bigger change than it is, which is its own kind of lying.
Name them before.png / after.png. If the change spans screens, suffix them -
before-orders.png - and keep the pairs adjacent in the table.
Open both. Confirm the thing you changed is the thing that differs, and that nothing else moved. Two failures this catches:
Upload to the forge, then reference them in the PR/MR body. Never link a local path and
never paste a file:// URL.
GitLab - glab api uploads with --form, not --field:
glab api --method POST "projects/<url-encoded-path>/uploads" --form "file=@<path>/before.png"
-F is --field and sends form fields; it returns 400 Bad Request on a file and
looks like a permissions problem, which sends you hunting for a token you do not need -
the CLI's own auth is fine. The response carries markdown ();
use that string verbatim. Then glab mr update <n> --description "$(cat body.md)".
GitHub - gh has no upload endpoint. corgi assets push before.png after.png --key <key> --dir <repo> commits them to the repo's long-lived pr-assets/<key>
branch and prints the https://github.com/<owner>/<repo>/blob/pr-assets/<key>/<path>?raw=true
markdown to paste - details in ../_shared/forge-commands.md §6a. That is the one link form a private
repo renders: raw.githubusercontent.com shows an empty box there, and an image
committed on the PR branch dies with the branch after the merge. Do not invent a host.
Put them in a table so they sit side by side, with one line saying what to look at:
## Before / after
Captured on the iOS simulator, staging, same record and scroll position.
| Before (`master`) | After (this MR) |
| --- | --- |
|  |  |
Left: plain heading, outlined circles, one sentence per step. Right: bordered panel,
filled header bar, bold title over grey subtext.
Name the capture conditions - device, environment, account class, locale. A reviewer who cannot tell where a shot came from cannot use it, and a shot from an unnamed environment invites the "was that production?" question.
State what was captured and on what, that both were read, and anything the comparison surfaced beyond the intended change. If only one side exists, say which and why - an after-only PR with an honest note beats a fabricated before.
raw.githubusercontent.com or local-path image link in the body → an empty box on a
private repo; use the blob ?raw=true form (§6a) and verify the file sits at that ref.mobile - driving the device: deep links, Maestro, simulator lifecycle.design-parity - when the target is a design rather than the previous build.mobile-screenshots - the store matrix, framed and localized.stories - calls this during verification when the change is visual.review - offers it when a UI diff arrives with no visual evidence.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub andriiklymiuk/corgi --plugin corgi33 skills in this plugin
/agentUse for corgi agent mode: Remote Control from a phone, the session board ("who is waiting on me"), watching trackers and PRs ("tell me when someone comments"), why a watch fired, and handoffs ("leave a handoff for ABC-7"). NOT compose authoring (corgi), starting a stack (run), debugging (debug)./alignUse when the user says "align", "let's agree first", or a request can be read two ways before any code. Reaches a shared understanding cheaply, then codes. NOT a plan gate or a long interview./autopilotUse for a SUPERVISED loop that drains the ticket queue into draft PRs: "autopilot", "keep shipping the queue", "drain the backlog overnight". One spec gate per batch, never merges. NOT a single batch (/corgi-queue).Other plugins' skills for the same job