Agent skill

Before and After Screenshots

by michaelshimeles in michaelshimeles/skills

Captures before and after screenshots of two URLs or images with the Vercel before-and-after CLI, uploads them and can add a markdown comparison to a pull request.

MITAuto-check passedTesting & QA

Install Before and After Screenshots

skills CLI
$ npx skills add michaelshimeles/skills --skill before-and-after -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install michaelshimeles/skills before-and-after --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/michaelshimeles/skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/before-and-after .claude/skills/before-and-after && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
before-and-after
GitHub stars
1.3k
Used in
1 other repo
Token cost
~1k tokens
SKILL.md length
289 words
Files
7 (incl. scripts)
Skills in repo
4
Repo updated
First seen
Licence
MIT

At a glance

Captures before and after screenshots of two URLs or images with the Vercel before-and-after CLI, uploads them and can add a markdown comparison to a pull request.

  • Works in 5 steps: Pre-flight — which before-and-after ||… → Protection check — if .vercel.app URL:… → Capture — before-and-after "" "" → …
  • Documenting a UI change with before and after screenshots for a PR
  • SKILL.md covers Agent Behavior Rules, Execution Order (MUST follow), Quick Reference and Image Upload, plus 3 more sections
  • Runs Shell scripts from its folder; calls gh, npx and npm

What it does

The skill uses the `@vercel/before-and-after` package, not a similarly named one. The execution order is fixed: check the CLI is installed (installing it globally if not), check whether a `.vercel.app` URL is protected (401 or 403), capture the two pages, upload the images with `scripts/upload-and-copy.sh`, and optionally append the markdown to a PR with `gh pr edit`.

The agent does not switch branches, stash changes or start dev servers, and never guesses what the before state is: the current state is treated as after, and if only one URL is given it asks for the before URL. Flags cover mobile and tablet viewports, a custom size, a CSS selector, an output folder and markdown output; full-page capture is used only on request. Uploads go to 0x0.st by default, with blob and gist adapters bundled, and protected Vercel previews need a bypass token.

When your agent uses it

  • Documenting a UI change with before and after screenshots for a PR
  • Comparing a production page with a preview deployment visually
  • Capturing mobile or tablet views of two versions of a page

Example prompts

  • “Take before and after screenshots of the pricing page, production versus the preview URL, and format them for a PR.”
  • “Compare these two screenshots, old.png and new.png, side by side.”
  • “Capture the header element only on mobile for both versions.”

Requirements

  • Node.js with npm, to install `@vercel/before-and-after`
  • GitHub CLI `gh`, only for editing a PR
  • Vercel CLI, only for protected preview URLs
  • Pre-approved tools (allowed-tools): Bash(npx @vercel/before-and-after *), Bash(before-and-after *), Bash(which before-and-after), Bash(npm install -g @vercel/before-and-after), Bash(*/upload-and-copy.sh *), Bash(curl -s -o /dev/null -w *), Bash(gh pr view *), Bash(gh pr edit *), Bash(vercel inspect *), Bash(vercel whoami), Bash(which vercel), Bash(which gh)

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. Pre-flight — which before-and-after || npm install -g @vercel/before-and-after
  2. Protection check — if .vercel.app URL: curl -s -o /dev/null -w "%{http_code}" "" (401/403 = protected)
  3. Capture — before-and-after "" ""
  4. Upload — ./scripts/upload-and-copy.sh --markdown
  5. PR integration — optionally gh pr edit to append markdown

What it can do on your machine

Read from SKILL.md and the folder at commit 4b72f46. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Bash(npx @vercel/before-and-after *)
    • Bash(before-and-after *)
    • Bash(which before-and-after)
    • Bash(npm install -g @vercel/before-and-after)
    • Bash(*/upload-and-copy.sh *)
    • Bash(curl -s -o /dev/null -w *)
    • Bash(gh pr view *)
    • Bash(gh pr edit *)
    • Bash(vercel inspect *)
    • Bash(vercel whoami)

    …and 2 more on the same allowed-tools line.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 5 files in scripts/ (Shell), which the agent can run.

    Shell commands in SKILL.md call:

    • gh
    • npx
    • npm
    • vercel
    • curl

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use gh, npx, npm, vercel and curl, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Before and After Screenshots loads about 1k tokens when it runs. Until then it costs about 81 tokens; SKILL.md has 289 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~81
When it runs · the whole SKILL.md, loaded when a task matches
~1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from michaelshimeles/skills at commit 4b72f46, republished under its MIT licence (© michaelshimeles). 289 words, ~1,010 tokens.

Download SKILL.mdSave it as .claude/skills/before-and-after/SKILL.md (or your agent's skills folder). This skill also uses 6 other files; get the full folder from GitHub.
name
before-and-after
description
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.
allowed-tools
Bash(npx @vercel/before-and-after *), Bash(before-and-after *), Bash(which before-and-after), Bash(npm install -g @vercel/before-and-after), Bash(*/upload-and-copy.sh *), Bash(curl -s -o /dev/null -w *), Bash(gh pr view *), Bash(gh pr edit *), Bash(vercel inspect *), Bash(vercel whoami), Bash(which vercel), Bash(which gh)

Before-After Screenshot Skill

Package: @vercel/before-and-after Never use before-and-after (wrong package).

Agent Behavior Rules

DO NOT:

  • Switch git branches, stash changes, start dev servers, or assume what "before" is
  • Use --full unless user explicitly asks for full page / full scroll capture

DO:

  • Use --markdown when user wants PR integration or markdown output
  • Use --mobile / --tablet if 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 (MUST follow)

  1. Pre-flight — which before-and-after || npm install -g @vercel/before-and-after
  2. Protection check — if .vercel.app URL: curl -s -o /dev/null -w "%{http_code}" "<url>" (401/403 = protected)
  3. Capture — before-and-after "<before-url>" "<after-url>"
  4. Upload — ./scripts/upload-and-copy.sh <before.png> <after.png> --markdown
  5. PR integration — optionally gh pr edit to append markdown

Never skip steps 1-2.

Quick Reference

bash
# 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
FlagDescription
-m, --mobileMobile viewport (375x812)
-t, --tabletTablet viewport (768x1024)
--size <WxH>Custom viewport
-f, --fullFull scrollable page
-s, --selectorCSS selector to capture
-o, --outputOutput directory (default: ~/Downloads)
--markdownUpload images & output markdown table
--upload-url <url>Custom upload endpoint (default: 0x0.st)

Image Upload

bash
# 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 --markdown

Vercel Deployment Protection

If .vercel.app URL returns 401/403:

  1. Check Vercel CLI: which vercel && vercel whoami
  2. If available: vercel inspect <url> to get bypass token
  3. If not: Tell user to provide bypass token, take manual screenshots, or disable protection

PR Integration

bash
# 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

ErrorFix
command not foundnpm install -g @vercel/before-and-after
could not determine executableUse npx @vercel/before-and-after (full name)
401/403 on .vercel.appSee Vercel protection section
Element not foundVerify selector exists on page

© michaelshimeles, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 6 other files (scripts) in before-and-after of michaelshimeles/skills.

  • SKILL.md
  • LICENSE
  • scripts/adapters/0x0st.sh
  • scripts/adapters/blob.sh
  • scripts/adapters/gist.sh
  • scripts/capture.sh
  • scripts/upload-and-copy.sh

Open the folder on GitHubat commit 4b72f46

Used in 1 other repository

We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in michaelshimeles/skills, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Before and After Screenshots next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Before and After Screenshots compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Before and After Screenshots this skillmichaelshimeles/skills1.3k1 repos~1kAutomated safety check: PassMIT
Terminal Screenshot CaptureQwenLM/qwen-code28k—~2kAutomated safety check: PassApache-2.0
UI Visual DebuggingNangoHQ/nango13k—~1.3kAutomated safety check: PassCustom licence
Bun Runtimespinspire/pocketbase-sveltekit-starter5115 repos~653Automated safety check: NotesMIT
Pre Commitwellwelwel/poku1.2k—~728Automated safety check: PassMIT
Before Afterevloghq/evlog1.9k—~2.7kAutomated safety check: PassMIT

Similar skills

  • Drives a CLI through a TypeScript scenario and saves terminal screenshots at each step, so pull requests that change command output can be checked visually.

    28k GitHub stars~2k tokensUpdated today
    Testing & QAAuto-check passed
  • UI Visual Debugging

    NangoHQ/nango

    A skill your agent uses when modifying or visually debugging Nango frontend UI, including packages/webapp, packages/connect-ui, browser interactions, screenshots, and visual regressions.

    13k GitHub stars~1.3k tokensUpdated today
    Testing & QAAuto-check passed
  • Bun Runtime

    spinspire/pocketbase-sveltekit-starter

    Bun as runtime, package manager, bundler, and test runner. An agent skill from spinspire/pocketbase-sveltekit-starter.

    511 GitHub starsUsed in 5 repos~653 tokens
    Frontend & DesignAuto-check: notes
  • Pre Commit

    wellwelwel/poku

    Run the mandatory pre-commit checks for the poku repository before staging a commit.

    1.2k GitHub stars~728 tokensUpdated 3 mo ago
    Testing & QAAuto-check passed
  • Before After

    evloghq/evlog

    Produce a before/after visual comparison of an evlog surface (landing, docs, telemetry, playgrounds) and share it as public Blob URLs.

    1.9k GitHub stars~2.7k tokensUpdated yesterday
    Testing & QAAuto-check passed
  • Run and verify ClawHub production deploys and stable ClawHub CLI npm releases.

    9.5k GitHub stars~1k tokensUpdated yesterday
    Frontend & DesignAuto-check passed

More from michaelshimeles/skills

  • Evidence-Driven Testing

    michaelshimeles/skills

    Records an annotated screen recording of the agent testing an app hands-on, then posts the video and a results summary to the PR and tracker issue.

    1.3k GitHub starsUsed in 1 repo~3.9k tokens
    Auto-check passed
  • Greploop Apps

    michaelshimeles/skills

    Loops on a large pull request, merge request or Perforce changelist, fixing Greptile findings until it scores 5/5 with no unresolved comments.

    1.3k GitHub starsUsed in 1 repo~3.6k tokens
    Auto-check passed
  • New Feature

    michaelshimeles/skills

    Start a new task in an isolated Git worktree branched from origin/main so multiple agents can work on the same repo in parallel without conflicts.

    1.3k GitHub starsUsed in 1 repo~699 tokens
    Auto-check passed

Works with

Questions about Before and After Screenshots

What does Before and After Screenshots do?

Captures before and after screenshots of two URLs or images with the Vercel before-and-after CLI, uploads them and can add a markdown comparison to a pull request. The skill uses the `@vercel/before-and-after` package, not a similarly named one.sh`, and optionally append the markdown to a PR with `gh pr edit`.

When should I use Before and After Screenshots?

Before and After Screenshots fits situations like: documenting a UI change with before and after screenshots for a PR; comparing a production page with a preview deployment visually; capturing mobile or tablet views of two versions of a page.

How do I install Before and After Screenshots in Claude Code?

Run `npx skills add michaelshimeles/skills --skill before-and-after -a claude-code`. Or copy the skill folder (before-and-after in michaelshimeles/skills) into .claude/skills/before-and-after in your project. Claude Code loads it when a task matches its description.

How do I install Before and After Screenshots in Codex?

Run `npx skills add michaelshimeles/skills --skill before-and-after -a codex`. Or copy the skill folder (before-and-after in michaelshimeles/skills) into .agents/skills/before-and-after in your project. Codex loads it when a task matches its description.

Can I use Before and After Screenshots in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add michaelshimeles/skills --skill before-and-after -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/before-and-after, .gemini/skills/before-and-after, .github/skills/before-and-after and .opencode/skills/before-and-after in your project.

What does Before and After Screenshots need to run?

Going by SKILL.md and its folder, Before and After Screenshots needs a shell for the scripts in its folder and the command-line tools its instructions call (gh, npx, npm, vercel and curl). Our summary lists: Node.js with npm, to install `@vercel/before-and-after`; GitHub CLI `gh`, only for editing a PR; Vercel CLI, only for protected preview URLs. Its frontmatter pre-approves these tools: Bash(npx @vercel/before-and-after *), Bash(before-and-after *), Bash(which before-and-after), Bash(npm install -g @vercel/before-and-after), Bash(*/upload-and-copy.sh *), Bash(curl -s -o /dev/null -w *), Bash(gh pr view *), Bash(gh pr edit *), Bash(vercel inspect *), Bash(vercel whoami), Bash(which vercel), Bash(which gh).

Does Before and After Screenshots access the network?

SKILL.md contains no URLs. Its commands use gh, npx, npm and curl, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Before and After Screenshots safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Before and After Screenshots use?

Before and After Screenshots is published under the MIT licence (from the LICENSE file in the skill folder). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Before and After Screenshots use?

About 1k tokens (SKILL.md is roughly 4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Before and After Screenshots?

Skills that share tags, products or a category with Before and After Screenshots: Terminal Screenshot Capture (QwenLM/qwen-code, 28k stars), UI Visual Debugging (NangoHQ/nango, 13k stars), Bun Runtime (spinspire/pocketbase-sveltekit-starter, 511 stars) and Pre Commit (wellwelwel/poku, 1.2k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Before and After Screenshots?

michaelshimeles (a GitHub user) maintains it in michaelshimeles/skills, which has 1,279 GitHub stars. The repository holds 4 skills in this directory. The repository was last updated on October 4, 2026.

Source: michaelshimeles/skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.