본문으로 건너뛰기
Skillpedia
일반 코딩29k · #9362

pr-explainer

하는 일

이 스킬은 풀 리퀘스트를 쉬운 말로 설명하는 로컬 웹 페이지를 만듭니다. 무엇이 바뀌었는지, 왜 중요한지, 어떻게 작동하는지, 어떻게 테스트했는지를 원본 diff를 나열하지 않고 다룹니다.

사용하는 경우

  • ✓리뷰어가 복잡한 풀 리퀘스트를 빠르게 이해하기를 원할 때.
  • ✓큰 코드 변경을 원시 diff 대신 안내된 설명으로 전달해야 할 때.
  • ✓문제, 변경, 증거를 한곳에서 설명하고 싶을 때.

스킬 링크

https://github.com/mastra-ai/mastra/blob/main/.claude/skills/pr-explainer/SKILL.md

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

사용 방법

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

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

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

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

  1. 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 --stat and git diff <base>...HEAD.
    • If one commit carries the main change, inspect it with git show --stat <commit> and git show <commit>.
  2. Find the explanation path

    • Do not explain files in raw diff order.
    • Teach the change in this order when possible:
      1. problem,
      2. system context,
      3. before/after data or control flow,
      4. key code changes,
      5. proof from tests/builds/manual checks,
      6. reviewer takeaway.
    • Classify changed files as core behavior, plumbing/integration, tests, release metadata, or incidental noise.
    • Highlight only files that help explain the PR.
  3. 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.
  4. 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/exclude so generated review pages stay out of commits.

Recommended HTML structure

Use this structure unless the PR clearly needs a different teaching order:

  1. Hero

    • PR number/title, one-sentence summary, branch/link/status.
    • Small metrics: files changed, tests added, packages affected.
  2. Problem

    • Previous behavior.
    • Why it was wrong, confusing, missing, or risky.
  3. 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.
  4. Before/After Flow

    • Visual old path vs. new path when the PR changes flow, state, ownership, permissions, request handling, data transformation, or component relationships.
  5. Code Walkthrough

    • Step-by-step explanation path.
    • Focused diffs for important files only.
    • Explain what each snippet accomplishes and why it is necessary.
  6. Tests / Verification

    • Tests added or updated.
    • Commands run for tests, build, typecheck, lint, or manual verification.
    • Known unrelated warnings or failures, if any.
  7. 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.

이 스킬이 유용한가요?

0

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

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬