본문으로 건너뛰기
Skillpedia
배포 및 클라우드 (DevOps)40k · #7342

pr-screenshots

하는 일

코드 프로젝트에서 무엇이 시각적으로 바뀌었는지 보여 주도록 돕습니다. 코드 업데이트 설명에 '변경 전'과 '변경 후' 이미지를 추가해, 다른 사람이 변화를 더 쉽게 이해하도록 합니다.

사용하는 경우

  • ✓웹사이트의 모습(색, 버튼 등)을 바꿨을 때.
  • ✓차트를 만들거나 데이터를 시각적으로 보여 줄 때.
  • ✓화면에 나타나는 오류를 고쳤을 때.

스킬 링크

https://github.com/github/awesome-copilot/blob/main/skills/pr-screenshots/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/github/awesome-copilot/blob/main/skills/pr-screenshots/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“이 버튼의 레이아웃 변경을 보여 주도록 변경 전후 이미지를 추가해 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

변경 사항 설명에 이미지를 직접 넣습니다. Azure DevOps 같은 플랫폼에는 코드로 이미지를 업로드하는 특별한 방법이 있습니다. GitHub에서는 이미지를 별도 위치에 추가하고 참조하는 것이 가장 쉬운 방법입니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

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.

**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:

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

$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:

![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

…

자주 묻는 질문

'변경 전후'를 보여 주는 것이 왜 중요한가요?

리뷰어가 직접 모든 것을 테스트하지 않아도 무엇이 바뀌었는지 정확히 볼 수 있어, 리뷰가 더 빠르고 효율적이 됩니다.

이미지가 너무 크면 어떻게 되나요?

너무 큰 이미지는 일부 플랫폼에서 제대로 표시되지 않을 수 있습니다. 화면에 잘 맞도록 크기를 조절하는 것이 좋습니다.

Azure DevOps에서 이미지 파일 이름을 아무거나 써도 되나요?

아니요. 같은 파일 이름을 다시 사용해 이미지를 업로드할 수 없습니다. 매번 새 이름을 써야 합니다.

상세 정보

작성자의 원본 설명

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.

repo: github/awesome-copilot

인기도

GitHub 스타
40k
순위
#7342
라이선스
MIT
업데이트
2026. 10. 15.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬