before-and-after
Skill1 starsChanged 15 days agoMITView on GitHub
Captures before/after screenshots of web pages or elements for visual comparison. Use when user says "take before and after", "screenshot comparison", "visual diff", "PR screenshots", "compare old and new", or needs to document UI changes. Accepts two URLs (file://, http://, https://) or two image paths.
- Installs packages
12 other projects use a version of this, 6 of them edited.
Adopted by
Most recently taken up by
- NemesLaszlo/claude-code-harnessword for word, first seen Nov 8, 2026
- michaelshimeles/rstackedited, first seen Nov 1, 2026
- SwiftyJunnos/skillstheir own version, first seen Oct 20, 2026
- michaelshimeles/skillsedited, first seen Oct 15, 2026
- vijpatel7/favorite_skills_and_pluginsedited, first seen Oct 15, 2026
- jaydubya818/MissionControledited, first seen Oct 13, 2026
Used with
Projects with it also use greploop-apps, how and 1 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
jaydubya818Skillgreploop-apps
Run greploop through @greptile-apps when the normal trigger rejects a large PR. Use only with the companion greploop skill.
Also in 5 projects that use this
jaydubya818Skillhow
Use for runtime, ownership, layering, code-walkthrough, and placement questions.
Also in 3 projects that use this
GoogleSkilltdd
Test-driven development. Use when the user wants to build features or fix bugs test-first, mentions "red-green-refactor", or wants integration tests.
Also in 3 projects that use this
Other versions12 projects use a version of this.
Word for word · 1
- NemesLaszlo/claude-code-harness★ 1100% same
Edited · 6
- michaelshimeles/rstack★ 1.4k60% same
- michaelshimeles/skills★ 1.4k60% same
- jaydubya818/MissionControl★ 252% same
- Nagacash/nagacodex-factory-skill★ 193% same
- imornar/skills★ 053% same
- vijpatel7/favorite_skills_and_plugins★ 093% same
Wrote their own version · 5
- sanity-io/sanity★ 6.4ksame name
- vercel-labs/before-and-after★ 351same name
- mdorf/agent-skills★ 1same name
- ruverd/bulma★ 1same name
- SwiftyJunnos/skills★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository16 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- code-structureSkill
- cross-reviewSkill
- evidence-driven-testingSkill
- exploreSkill
- fix-issuesSkill
- greploopSkill
- implementSkill
- investigateSkill
- new-featureSkill
- plan-featureSkill
- reviewSkill
- security-scanSkill
- shipSkill
- unslopSkill
The file
We split this skill into the rules it gives an agent
10 rules. 0 are common, 3 are distinctive, and 7 are very specific to this project.
0
Common
Most of the 11 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 26
Do not switch git branches, stash changes, start dev servers, or guess what "before" is.
- Very specific: line 27
Use --full only when the user asks for a full-page capture
- Very specific: line 28
Use --markdown when user wants PR integration or markdown output
- Very specific: line 29
Use --mobile / --tablet if user mentions phone, mobile, tablet, responsive, etc.
- Distinctive: line 31
If user provides only one URL or says "PR screenshots" without URLs, ask: "What URL should I use for the 'before' state?
- Very specific: line 90
If .vercel.app URL returns 401/403:
- Very specific: line 92
Check Vercel CLI: which vercel && vercel whoami
- Very specific: line 93
If available: vercel inspect <url> to get bypass token
- Distinctive: line 94
If not: Tell user to provide bypass token, take manual screenshots, or disable protection
- Very specific: line 112
If no gh CLI: output markdown and tell user to paste manually.
“Common” is measured: kept by at least 6 in 10 of the 11 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Before-After Screenshot Skill
Package:
@vercel/before-and-afterNever usebefore-and-after(wrong package).
Agent behavior rules
- Do not switch git branches, stash changes, start dev servers, or guess what "before" is; the user's checkout stays as it is
- Use
--fullonly when the user asks for a full-page capture - Use
--markdownwhen user wants PR integration or markdown output - Use
--mobile/--tabletif user mentions phone, mobile, tablet, responsive, etc. - Assume current state is After
- If user provides only one URL or says "PR screenshots" without URLs, ask: "What URL should I use for the 'before' state? (production URL, preview deployment, or another local port)"
Execution order
- Pre-flight —
which before-and-after || npm install -g @vercel/before-and-after - Protection check — if
.vercel.appURL:curl -s -o /dev/null -w "%{http_code}" "<url>"(401/403 = protected) - Capture —
before-and-after "<before-url>" "<after-url>" - Upload —
./scripts/upload-and-copy.sh <before.png> <after.png> --markdown - PR integration — optionally
gh pr editto append markdown
Steps 1 and 2 run every time: step 1 makes sure the CLI exists, step 2 catches protected deployments before a blank capture.
Quick Reference
# Basic usage
before-and-after <before-url> <after-url>
# With selector
before-and-after url1 url2 ".hero-section"
# Different selectors for each
before-and-after url1 url2 ".old-card" ".new-card"
# Viewports
before-and-after url1 url2 --mobile # 375x812
before-and-after url1 url2 --tablet # 768x1024
before-and-after url1 url2 --full # full scroll
# From existing images
before-and-after before.png after.png --markdown
# Via npx (use full package name!)
npx @vercel/before-and-after url1 url2| Flag | Description |
-m, --mobile | Mobile viewport (375x812) |
-t, --tablet | Tablet viewport (768x1024) |
--size <WxH> | Custom viewport |
-f, --full | Full scrollable page |
-s, --selector | CSS selector to capture |
-o, --output | Output directory (default: ~/Downloads) |
--markdown | Upload images & output markdown table |
--upload-url <url> | Custom upload endpoint (default: 0x0.st) |
Image Upload
# Default (0x0.st - no signup needed)
./scripts/upload-and-copy.sh before.png after.png --markdown
# GitHub Gist
IMAGE_ADAPTER=gist ./scripts/upload-and-copy.sh before.png after.png --markdownVercel Deployment Protection
If .vercel.app URL returns 401/403:
- Check Vercel CLI:
which vercel && vercel whoami - If available:
vercel inspect <url>to get bypass token - If not: Tell user to provide bypass token, take manual screenshots, or disable protection
PR Integration
# Check for gh CLI
which gh
# Get current PR
gh pr view --json number,body
# Append screenshots to PR body
gh pr edit <number> --body "<existing-body>
## Before and After
<generated-markdown>"If no gh CLI: output markdown and tell user to paste manually.
Error Reference
| Error | Fix |
command not found | npm install -g @vercel/before-and-after |
could not determine executable | Use npx @vercel/before-and-after (full name) |
| 401/403 on .vercel.app | See Vercel protection section |
| Element not found | Verify selector exists on page |
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

