pr-explainer
하는 일
이 스킬은 풀 리퀘스트를 쉬운 말로 설명하는 로컬 웹 페이지를 만듭니다. 무엇이 바뀌었는지, 왜 중요한지, 어떻게 작동하는지, 어떻게 테스트했는지를 원본 diff를 나열하지 않고 다룹니다.
사용하는 경우
- ✓리뷰어가 복잡한 풀 리퀘스트를 빠르게 이해하기를 원할 때.
- ✓큰 코드 변경을 원시 diff 대신 안내된 설명으로 전달해야 할 때.
- ✓문제, 변경, 증거를 한곳에서 설명하고 싶을 때.
스킬 링크
https://github.com/mastra-ai/mastra/blob/main/.claude/skills/pr-explainer/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“이 풀 리퀘스트에 대한 HTML 리뷰 가이드를 만들어 주세요. 리뷰어가 10분 안에 변경을 이해할 수 있어야 합니다.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
에이전트는 브랜치, 커밋, 변경된 파일을 읽은 뒤 문제에서 시스템 맥락, 핵심 변경, 테스트 결과 순으로 설명을 배열합니다. 짧은 섹션, 예시, 다이어그램이 있는 단일 HTML 페이지를 작성합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
PR Explainer
Create a local, self-contained HTML page that teaches a reviewer the PR story: what changed, why it matters, how it works, how it fits into the system, and how it was verified.
Required workflow
Understand the PR before writing HTML
- Collect PR title/number, branch, link if available, base branch, commit range, changed files, and verification already performed.
- Inspect the current state with
git status --short. - Inspect recent commits with
git log --oneline -n 10. - Inspect scope with
git diff <base>...HEAD --statandgit diff <base>...HEAD. - If one commit carries the main change, inspect it with
git show --stat <commit>andgit show <commit>.
Find the explanation path
- Do not explain files in raw diff order.
- Teach the change in this order when possible:
- problem,
- system context,
- before/after data or control flow,
- key code changes,
- proof from tests/builds/manual checks,
- reviewer takeaway.
- Classify changed files as core behavior, plumbing/integration, tests, release metadata, or incidental noise.
- Highlight only files that help explain the PR.
Write for approachability
- Use plain language, short sections, concrete before/after examples, small focused snippets, diagrams, tables, and callouts.
- Explain the problem before implementation details.
- Define acronyms or package-specific terms before using them.
- Avoid dumping the full diff or assuming the reviewer already knows internal context.
Create a local self-contained HTML file
- Put generated files in
.pr-review/. - Use one HTML file containing all CSS and content.
- Do not commit
.pr-review/by default. - Prefer repo ignore rules or
.git/info/excludeso generated review pages stay out of commits.
- Put generated files in
Recommended HTML structure
Use this structure unless the PR clearly needs a different teaching order:
Hero
- PR number/title, one-sentence summary, branch/link/status.
- Small metrics: files changed, tests added, packages affected.
Problem
- Previous behavior.
- Why it was wrong, confusing, missing, or risky.
System Context
- Where the change sits in the product or architecture.
- Upstream callers, downstream behavior, and why this is the right layer.
- Behavior intentionally not changed.
Before/After Flow
- Visual old path vs. new path when the PR changes flow, state, ownership, permissions, request handling, data transformation, or component relationships.
Code Walkthrough
- Step-by-step explanation path.
- Focused diffs for important files only.
- Explain what each snippet accomplishes and why it is necessary.
Tests / Verification
- Tests added or updated.
- Commands run for tests, build, typecheck, lint, or manual verification.
- Known unrelated warnings or failures, if any.
Reviewer Takeaway
- The shortest useful mental model of the PR.
- What the reviewer should focus on while reviewing the actual diff.
Diagrams
Add diagrams when they reduce cognitive load. Prefer simple HTML/CSS diagrams over external dependencies.
Good diagram types:
- Request flow: Client → Server → Handler → Service → Result
- Before/after path: broken path vs. fixed path
- Ownership map: package/module responsibility boundaries
- Data transformation: input → normalized form → output
- State machine: pending → running → complete/error
Each diagram must answer: “What does this help the reviewer understand faster?”
Focused diff snippets
Show snippets along the explanation path, not giant patches. Each important snippet should include:
- file path,
- relevant added/removed lines only,
- visual styling for additions/removals,
- a short explanation,
- connection back to the PR story.
Use this pattern:
<div class="diff">
<div class="diff-title">packages/example/src/file.ts</div>
<pre>
<span class="del">- old behavior</span>
<span class="add">+ new behavior</span>
</pre>
</div>
A reviewer should understand the PR without opening GitHub, but the page should not replace the final full diff review.
Verification requirements
End with proof. Include exact commands when available, for example:
pnpm --filter @scope/package test path/to/test.ts -- --run
pnpm turbo build --filter ./packages/package
If verification was not run, say so clearly and list the recommended commands
자주 묻는 질문
변경된 모든 파일을 보여 주나요?
아닙니다. 변경을 설명하는 데 도움이 되는 파일만 강조하고, 부차적인 것은 건너뜁니다.
페이지는 어디에 저장되나요?
프로젝트 안의 리뷰 폴더에 로컬 페이지로 저장됩니다.
먼저 무엇이 필요한가요?
변경 사항을 볼 수 있도록 풀 리퀘스트의 브랜치와 커밋 기록이 필요합니다.
상세 정보
작성자의 원본 설명
Use when creating an approachable, self-contained HTML review aid for a pull request; explaining what changed, why it matters, how it works, and how it fits into the broader system; turning PR diffs, commits, tests, and architecture context into a local `.pr-review/` HTML page for reviewers; or helping reviewers understand complex code changes without dumping the full diff.
repo: mastra-ai/mastra
인기도
- GitHub 스타
- 29k
- 순위
- #9362
- 라이선스
- —
- 업데이트
- 2026. 11. 2.
댓글
- …
이 저장소의 다른 스킬
debugging-difficult-bugs
29k에이전트가 추측이 아니라 실제 프로그램이 실행될 때의 로그를 남겨 어려운 버그를 디버그하도록 돕습니다.
mastra-frontend
29k에이전트가 처음부터 스타일을 만들지 않고, Mastra 플레이그라운드 디자인 시스템의 기성 컴포넌트로 앱 화면을 만들도록 돕습니다.
pr-splitter
29k에이전트가 크고 복잡한 풀 리퀘스트를 원본 작업을 안전하게 지키면서 더 작고 리뷰하기 쉬운 풀 리퀘스트로 나누도록 돕습니다.
ralph-plan
29k에이전트가 짧은 대화를 통해 집중된 구조화 작업 명령을 계획하도록 돕습니다. 작업에 명확한 단계와 점검이 있도록 합니다.