Publish a Cursor preview for pull request review
Cursor can run the pushbag CLI on screenshots in your workspace. Give reviewers a pinned image link so a later edit does not change the evidence in the pull request.
Install the workflow beside the project
Install @pushbag/cli with npm in the environment Cursor uses for shell commands. In the repository, run the two setup commands below. The first writes the capture guide to .agents/skills/pbg-pr-media/SKILL.md. The second prints the key creation page.
pushbag guide pbg-pr-media --install
pushbag auth login
Create an Artifacts key and save it with pushbag auth set YOUR_KEY. Standalone screenshots require an image-capable plan. For a remote development environment, check the executable and the key there, then open the workspace page using the same test data you plan to show in the pull request.
Put the capture instructions in a Cursor rule
Save this project rule as .cursor/rules/pr-captures.mdc. Invoke it when asking Cursor to prepare PR media. The text makes the approval boundary for publishing a screenshot explicit. Cursor project rules
---
description: Prepare matched screenshots for a UI pull request
alwaysApply: false
---
Read .agents/skills/pbg-pr-media/SKILL.md. Use the same browser width,
theme and fixture account on both revisions. Inspect each capture before
uploading. Publish only screenshots the author has cleared for public use.
Share the change you see in Cursor
Capture the old and new screens as before.png and after.png. From Cursor’s terminal, with a plan that supports image uploads, an Artifacts key configured, and both images cleared for public sharing, run:
pushbag upload before.png after.png --public --title "Settings screen" --json
Ask Cursor to insert the two versionUrl values into a Before and After table. For the full capture and PR workflow, run pushbag guide pbg-pr-media in the workspace.
For a settings-form change, take the first capture with the original form open. After the edit, return to the same route with the same values. Open each PNG locally. A blank page, a sign-in prompt, or a screenshot taken before a menu opens can all be valid images that show the wrong thing.
The upload returns one entry per image. Use the first version link for the base screen and the second for the changed screen. In the PR description, name the behavior the reviewer should inspect, such as the error appearing under the affected field. Leave the surrounding description intact when inserting the table.
If a reviewer requests a correction, capture only the state that changed. Replace that image’s link with the new pinned version and re-open the PR. GitHub cannot display an owner-only private artifact inline. When a screenshot contains real account details, use a fixture account for the public capture or keep the private review outside the PR body.
Frequently asked questions
Can I keep a screenshot private?
Yes. Use --private to review it in pushbag. Use public, redacted captures for inline images in a GitHub PR.
Does the PR media guide capture the screen by itself?
It describes capture and upload steps. Cursor still needs a working capture tool and a running page to photograph.
Where can I keep my project’s screenshot instructions?
Store a project rule under .cursor/rules with an .mdc extension. Specify which screens, viewport and data the team uses so before and after images can be compared.
Should I paste the stable image URL into the PR?
Paste versionUrl for each capture. A stable URL can change when someone uploads another version to that artifact.