diff-tours
Create diff tours that narrate code changes to help reviewers understand PRs. Use when preparing a PR for review or when asked to document changes.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Create diff tours that narrate code changes to help reviewers understand PRs. Use when preparing a PR for review or when asked to document changes.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | diff-tours |
| description | Create diff tours that narrate code changes to help reviewers understand PRs. Use when preparing a PR for review or when asked to document changes. |
Create structured documentation that walks reviewers through code changes. A diff tour combines a structured explanation of intent with focused diff hunks and context links.
Accepts:
origin/main..HEAD)Gather changes
git diff --name-status origin/main..HEAD
git diff --stat origin/main..HEAD
git log --reverse --oneline origin/main..HEAD
Choose organization (what serves reviewers best):
Draft the tour following the spec in references/diff-tours.md
For each section, decide:
Add context links (required — enables tooling/viewer):
src/path/file.ts:15-50**Context:** label, one link per lineScale appropriately:
# Diff Tour: <title>
> **Goal:** <one sentence>
> **Range:** `origin/main..HEAD`
## Summary
- **Why:** <motivation>
- **What changed:** <2-5 bullets>
## Walkthrough
### 1) <section title>
**Intent:** <what and why>
**Context:** <permalink or file:line>
```diff
<focused hunk, 10-40 lines>
`` `
### 2) <next section>
...
**Context:** label)See references/diff-tours.md for full specification, examples, and format reference for tooling.
After writing a diff tour, generate a shareable viewer link:
share.sh DIFF_TOUR.md
The share.sh script is bundled with this skill (see share.sh in the skill directory).
This compresses the tour into a URL fragment and outputs a link like:
go/diff-tour-viewer#tour=<compressed>
Paste this link in the PR description for one-click review. The tour loads entirely from the URL — no server, no auth, no CORS.
Requires: node (uses lz-string for compression, auto-installed on first run).