一键导入
pr-view
Generate a reviewer-optimized HTML diff page for a GitHub PR, then open it in the browser. Usage: /pr-view <pr-number-or-url>
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Generate a reviewer-optimized HTML diff page for a GitHub PR, then open it in the browser. Usage: /pr-view <pr-number-or-url>
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Run affected tests, typecheck, and lint (with autofix) to catch CI failures locally before pushing. Use when CI is failing or before pushing to avoid CI failures. Offers to fix typecheck/test failures and to amend+push when clean.
Create a GitHub PR for the current branch with auto-generated description. Use when the user asks to create a pull request, open a PR, or put up changes for review.
Create a Linear ticket for the current branch on the One Big Team, auto-assigning the appropriate Linear project and team/product labels based on which part of the codebase changed. Use when the user asks to create a Linear ticket, file a Linear issue, or track work in Linear for changes on the current branch.
Render, read, and add component examples in the examples renderer. Files take two forms — colocated `*.examples.tsx` (e.g. `Checkbox.examples.tsx` next to `Checkbox.tsx`) or grouped `examples/*.tsx` (e.g. `Checkbox/examples/Default.tsx`). Covers exact iframe URLs per example, story-id derivation, multi-worktree-aware server discovery, file conventions, and the onboarding gate. Onboarded products (the authoritative validation list — only invoke this skill when the work touches one of these): `apps/staff/`. Verify at runtime with `nx show projects --with-target examples`. Use to render, screenshot, inspect, or extend an example in an onboarded product. For anything outside the onboarded list, this skill does not apply.
Create a Storybook story for a component. Use when the user asks to add a story, write a story, or create a Storybook story for a component.
Go through a PR's review comments one by one, propose solutions, and commit fixes. Use when the user wants to address PR feedback, review comments, or resolve PR review requests.
| name | pr-view |
| description | Generate a reviewer-optimized HTML diff page for a GitHub PR, then open it in the browser. Usage: /pr-view <pr-number-or-url> |
Generate a reviewer-optimized HTML diff page for a GitHub PR, then open it in the browser.
Run the gather script (no shell shim needed — Python handles repo detection):
python3 .claude/skills/pr-view/gather.py $ARGUMENTS > /tmp/pr-$PR_NUMBER-context.json
Where $PR_NUMBER is the numeric part of $ARGUMENTS. The script will:
/tmp/pr-$PR_NUMBER-worktreeRead the context JSON to get changedFiles and worktreePath.
For each file in changedFiles, read it from the worktree (worktreePath + "/" + filePath), not from the current branch. This ensures new files added in the PR are available.
For each file understand:
Also look at sibling files in the same directories that were not changed — note any that would help a reviewer understand context (e.g. a parallel implementation, a base class, a type this code depends on).
For each changed source file (non-test, non-fixture), check whether a corresponding test file exists and whether it was changed in this PR. Flag files where:
The goal is comprehension order — sequence the files so that each one makes sense given what the reviewer has already seen. This is a judgment call, not a mechanical dependency traversal.
Heuristics:
If there are independent clusters that don't relate to each other conceptually, give them distinct labels.
Every file in changedFiles must appear in exactly one cluster. Do not omit any files.
Ordering is the primary output. The narrative, cluster descriptions, and file descriptions should all be focused on explaining why files are ordered as they are — what each file unlocks for the reviewer, and why it must come before or after its neighbors. Do not describe what the files do; describe the reading order logic.
Write your analysis to /tmp/pr-$PR_NUMBER-analysis.json in this exact format:
{
"narrative": "A 3-6 sentence prose paragraph explaining the ordering logic for the review: why certain files come first, what each cluster unlocks for the next, and how the sequence was chosen. Focus on reading-order rationale, not on what the files do.",
"clusters": [
{
"label": "Short cluster name (e.g. Tab Type Definition)",
"description": "One sentence explaining why this cluster appears at this position in the reading order — what it establishes that later clusters depend on, or why it must follow the clusters before it.",
"files": ["relative/path/from/repo/root.ts"],
"fileDescriptions": {
"relative/path/from/repo/root.ts": "One sentence explaining why this file is positioned here within the cluster — what it establishes for the files that follow it, or why it depends on the files before it."
},
"testGaps": [
{
"sourceFile": "relative/path/to/source.ts",
"testFile": "relative/path/to/existing-but-unchanged-test.ts",
"note": "Human-readable explanation of what's not covered."
}
],
"relevantUnchanged": [
{
"path": "relative/path/to/unchanged/file.ts",
"note": "Why this file helps understand the PR (e.g. 'base class showing what super.tabTitle() returns')"
}
]
}
]
}
python3 .claude/skills/pr-view/generate.py \
--context /tmp/pr-$PR_NUMBER-context.json \
--analysis /tmp/pr-$PR_NUMBER-analysis.json \
--output /tmp/pr-$PR_NUMBER.html
open /tmp/pr-$PR_NUMBER.html
Then remove the worktree (the path is in the context JSON under worktreePath):
git worktree remove --force /tmp/pr-$PR_NUMBER-worktree