Skip to main content
skill GitHub Copilot official · GitHub

pr-screenshots — GitHub Copilot skill: what it does, how to install

Guides the agent on embedding before/after screenshots directly into pull request descriptions. Reviewers spot UI, styling, and chart changes immediately without checking out the branch.

Install into GitHub Copilot · Skills CLI (Vercel) All methods and platforms ↓
npx skills add github/awesome-copilot --skill pr-screenshots
Open on GitHub

What pr-screenshots does

The skill guides GitHub Copilot on documenting visual changes inside pull request descriptions. It covers UI styling and chart widgets. The core rule is pairing before and after screenshots directly in the description body without ` tags. Captures must share identical viewport widths and crops at 1x native resolution. If an image is too wide, HTML width` attributes handle the display size instead of PIL resizing.

It details upload paths for Azure DevOps and GitHub. For Azure DevOps, it includes a PowerShell snippet using Azure CLI and HttpClient to POST binary attachments via the 7.1-preview.1 API directly to visualstudio.com. GitHub lacks a public API for PR description images. The skill therefore recommends an orphan pr-assets branch to host raw image URLs.

Install it if reviewers frequently inspect frontend changes. For pure backend work, skip it.

What it helps with

  • Embed before and after comparison images directly into pull request bodies
  • Upload PR attachments to Azure DevOps via REST API without binary corruption
  • Format image display sizes in Markdown using HTML width attributes
  • Host PR screenshots on GitHub using an orphan pr-assets branch

Example prompts for the agent

  • Format this pull request description with before and after screenshot blocks
  • Write a PowerShell script to upload a screenshot attachment to my Azure DevOps PR
  • How do I reference PR screenshots on GitHub using a pr-assets branch?

How to install pr-screenshots

1Skills CLI (Vercel)

npx skills add github/awesome-copilot --skill pr-screenshots

2GitHub CLI

gh skill install github/awesome-copilot pr-screenshots

3Manually: put the files in place

.github/skills/pr-screenshots/SKILL.md

From the same set554

The whole set →
git-commit official github This skill reviews Git changes, stages related files, and creates Conventional Commits. Use it when you want an agent to make one commit or split work into separate commits. GitHub Copilot 47,165installs excalidraw-diagram-generator official github Turn a plain-language description into an Excalidraw diagram. Useful for mapping processes, system structure, and relationships between entities. GitHub Copilot 31,639installs multi-stage-dockerfile official github This skill guides GitHub Copilot in writing multi-stage Dockerfiles for different languages and frameworks. Use it when the final runtime image should contain fewer build dependencies. GitHub Copilot 29,688installs documentation-writer official github Skill that turns the agent into a technical writer following the Diátaxis framework: tutorials, how-to guides, reference, and explanation. Proposes structure before writing. GitHub Copilot 27,757installs prd official github Turns a feature idea into a structured PRD with user stories, technical requirements, and risks. Use it when planning a software feature or an AI-powered one. GitHub Copilot 24,035installs refactor official github This skill reshapes existing code without changing its external behavior. Use it for gradual cleanup of large functions, duplication, weak types, and code smells. GitHub Copilot 22,321installs java-springboot official github Gives GitHub Copilot Spring Boot development practices, from project layout to tests and security. Use it when writing or reviewing Java application code. GitHub Copilot 21,272installs create-readme official github This skill reviews a project and creates a structured README.md. Use it when the repository needs clear documentation based on its actual files and code. GitHub Copilot 19,081installs

Similar

roadmap-communicator Alireza Rezvani This skill prepares roadmaps, release notes, changelogs, and stakeholder updates for executives, engineers, and customers. Use it when one change needs several versions. Claude Code 586installs git-worktree-manager Alireza Rezvani Runs parallel feature branches with Git worktrees, non-conflicting port maps, and synced environment files. Useful when several agents work simultaneously in one repo. Claude Code 581installs triage Matt Pocock This skill moves issues and external PRs through triage states, verification, and agent briefs. It fits maintainers managing an issue queue. Claude Code 990,453installs code-review Matt Pocock Reviews changes from a chosen reference point against repository standards and the originating spec. Use it for a branch, PR, or work in progress. Claude Code 789,521installs implement Matt Pocock Implements work from a specification or tickets, following a test-driven flow and ending with review and a commit. Use it when a coding task needs a defined delivery routine. Claude Code 774,700installs git-guardrails-claude-code Matt Pocock This skill adds a Claude Code hook that stops risky Git commands before they run. Use it when an agent must not push or discard working-tree changes. Claude Code 499,069installs setup-pre-commit Matt Pocock This skill configures pre-commit checks for a JavaScript repository, running Prettier, type checking, and tests before each commit. Claude Code 489,289installs scaffold-exercises Matt Pocock This skill builds course exercise directories with sections, problems, solutions, and explainers. Use it when starting a new course section or creating exercise stubs. Claude Code 480,196installs

Questions about pr-screenshots

How do I install pr-screenshots in GitHub Copilot?

Run gh skill install github/awesome-copilot pr-screenshots or npx skills add github/awesome-copilot --skill pr-screenshots. The skill configuration saves to .github/skills/pr-screenshots/SKILL.md.

What does the pr-screenshots skill do?

It provides Markdown patterns and API upload instructions for before/after screenshots so reviewers evaluate visual changes without running the branch locally.

Why does the skill prefer visualstudio.com over dev.azure.com for Azure DevOps?

The Markdown renderer in Azure DevOps processes {org}.visualstudio.com endpoints faster. Images on dev.azure.com URLs load noticeably slower.

Source text

SKILL.md · MIT
---
name: pr-screenshots
description: 'Embed before/after screenshots and annotated images in pull request descriptions. Covers PR description patterns, image upload for Azure DevOps and GitHub, and sizing best practices.'
---

# PR Screenshots

Embed before/after screenshots in pull request descriptions so reviewers can see the visual change without checking out the branch.

## When to Use This Skill

Use this skill when a PR changes something visible:

- Layout, styling, CSS
- Charts, dashboards, data visualizations
- UI components, forms, modals
- Error messages, CLI output, log formatting

## PR Description Pattern

Place screenshots directly in the PR description body. Avoid wrapping them in `<details>` collapse — reviewers are more likely to look at images they can see without clicking.

```markdown
**Before** — brief description of the problem:

![before](url-to-before-image)

**After** — brief description of the fix:

![after](url-to-after-image)
```

Keep the text brief. A sentence or two per image describing what the reader should notice. Let the image carry most of the communication.

### Multiple changes

For PRs with several visual changes, use separate before/after pairs with headings:

```markdown
## Filter bar alignment

**Before** — 1px border clash between adjacent buttons:

![before-filters](url)

**After** — borders overlap cleanly, hover tint added:

![after-filters](url)

## Chart tooltip

**Before** — tooltip clipped at container edge:

![before-tooltip](url)

**After** — tooltip repositions to stay visible:

![after-tooltip](url)
```

## Image Sizing

- **Take screenshots at native 1x resolution** — don't resize with PIL (creates artifacts)
- **Control display size in HTML** when images are too large:
  ```html
  <img src="url" width="600" alt="description">
  ```
- **Before/after pairs must use the same viewport width and crop** — otherwise the comparison is meaningless

## Uploading Images

### Azure DevOps

Upload images as PR attachments via the REST API:

```powershell
$token = az account get-access-token `
    --resource "499b84ac-1321-427f-aa17-267ca6975798" `
    --query accessToken -o tsv

$base = "https://{org}.visualstudio.com/{projectId}/_apis/git/repositories/{repoId}"
$url = "$base/pullRequests/{prId}/attachments/screenshot.png?api-version=7.1-preview.1"

# Use HttpClient — Invoke-RestMethod can corrupt binary data
$client = New-Object System.Net.Http.HttpClient
$client.DefaultRequestHeaders.Authorization = `
    New-Object System.Net.Http.Headers.AuthenticationHeaderValue("Bearer", $token)
$content = New-Object System.Net.Http.ByteArrayContent(
    , [System.IO.File]::ReadAllBytes("screenshot.png")
)
$content.Headers.ContentType = `
    [System.Net.Http.Headers.MediaTypeHeaderValue]::new("application/octet-stream")
$resp = $client.PostAsync($url, $content).Result
```

Reference in the PR description:

```markdown
![description](https://{org}.visualstudio.com/{projectId}/_apis/git/repositories/{repoId}/pullRequests/{prId}/attachments/screenshot.png)
```

**Azure DevOps gotchas:**

- **Use `{org}.visualstudio.com` NOT `dev.azure.com/{org}`** — AzDO's markdown renderer uses `.visualstudio.com`. The `dev.azure.com` format loads noticeably slower
- Use `POST` not `PUT` (PUT returns 405)
- API version must be `7.1-preview.1`
- Can't re-upload with the same filename — use a new name (e.g. `screenshot-v2.png`)
- Use `HttpClient` not `Invoke-RestMethod` — IRM can corrupt binary data
- Repo-relative paths don't work in PR descriptions — must use full URLs
- Don't commit images to the branch just for PR screenshots

### GitHub

> **⚠️ Work in progress.** GitHub's drag-and-drop image upload uses internal endpoints that require browser cookies. There's no clean public API for uploading images to PR descriptions yet.

**Current workaround:** Commit images to a `pr-assets` orphan branch and reference via blob URLs (`github.com/{owner}/{repo}/blob/pr-assets/{file}?raw=true`). It works but is clunky — contributions for a better approach are welcome.

## Guidelines

1. **Capture before state BEFORE making changes** — it's easy to forget, and reconstructing the original state later is slow and error-prone
2. **Keep descriptions brief** — a sentence or two per image pointing out what changed is enough
3. **Prefer visible images over collapsed sections** — screenshots behind `<details>` tags are easy to skip
4. **Annotate when the change is subtle** — use the `image-annotations` skill to add callouts when the difference isn't immediately obvious
5. **Match viewport and crop** between before/after pairs so the comparison is meaningful

## Limitations

- GitHub image upload requires workarounds (no public API for PR description images)
- Azure DevOps attachment filenames can't be reused — plan naming ahead
- Very large images (>10MB) may not render inline on some platforms

© github · MIT · github/awesome-copilot

See also

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor