pr-content
PR Content
Generate ready-to-paste Pull Request content (Title + Description) based on branch changes.
Title and Description are output as separate copy-ready blocks because GitHub has two different input fields.
Context Reuse (Step 0)
See _shared/context-reuse.md for the context reuse protocol.
If DIFF_CONTEXT or RAW_DIFF is already provided, use it directly to save time and tokens.
Gather Change Context (Step 1)
See _shared/branch-diff-gathering.md for branch diff collection details.
Use branch-level diff as primary source (compare current branch against base branch). This gives you the full picture of what's changing in the PR.
Determine PR Type (Step 2)
Select one primary type based on change intent:
feat: new featurefix: bug fixperf/refactor: optimization or refactordocs/chore: docs or maintenance
The type drives the PR description structure (different types need different sections).
Generate Title (Step 3)
Format: <type>: <brief description>
Keep title concise and specific. Focus on what changed, not how you analyzed it.
Generate Description by Type (Step 4)
See _shared/pr-heading-map.md for the complete heading map.
Why fixed headings matter:
- Consistent headings help teams quickly scan PRs and find relevant sections
- Automated tools and scripts often parse PR descriptions by heading text
- Team members know exactly where to look for specific information (e.g., "where's the testing info?")
Use the exact heading text from the map (no synonyms) and keep the exact order. This consistency is what makes the headings useful.
Quick reference:
Type: feat
- 中文:
### 概述→### 改动说明→### 使用方式 - English:
### Summary→### Changes→### Usage
Type: fix
- 中文:
### 问题描述→### 复现步骤(optional) →### 修复方式→### 测试说明 - English:
### Problem→### Steps to Reproduce(optional) →### Solution→### Testing
Type: perf/refactor
- 中文:
### 概述→### 改动说明→### 效果(optional) - English:
### Summary→### Changes→### Impact(optional)
Type: docs/chore
- 中文:
### 概述→### 改动说明 - English:
### Summary→### Changes
Language and Output Format (Step 5)
See _shared/bilingual-output.md for bilingual output rules.
Default: output both 简体中文 and English versions (semantically aligned, not word-for-word translation).
Each language version must be independently written in its respective language — not one version copied and relabeled.
If user explicitly requests single language, output only that language.
Output structure:
PR TitleandPR Descriptionin separate code blocks (they go into different GitHub input fields)- For bilingual output, each language gets its own independent code blocks
- Language label (
中文/English) appears immediately above each code block
Before Finalizing (Step 6)
Quick verification:
- Type is clear and matches the actual changes
- Headings follow the type-specific map (see _shared/pr-heading-map.md)
- In bilingual mode, each language has its own code blocks
- All claims are grounded in the actual diff
If something doesn't look right, adjust and regenerate.
Output Template
PR Title
中文
<type>: <brief description>
English
<type>: <brief description>
PR Description
中文
### <fixed-section-heading>
- <fact>
English
### <fixed-section-heading>
- <fact>
Example
PR Title
中文
fix: 防止认证 token 刷新竞态
English
fix: prevent auth token refresh race
PR Description
中文
### 问题描述
- 并发 refresh 请求可能覆盖有效 token。
### 修复方式
- 串行化 refresh 流程,并为 401 边界场景增加重试保护。
### 测试说明
- 增加 refresh 竞态场景的回归测试。
English
### Problem
- concurrent refresh requests could overwrite valid tokens.
### Solution
- serialize refresh flow and add retry guard for 401 edge cases.
### Testing
- add regression tests for refresh race scenarios.
Conventions
- Mention base branch only as internal baseline for analysis, not in PR summary narrative
- Keep statements grounded in actual branch diffs and commits
- Prefer concrete change highlights over generic wording
More from quentinhsu/skills
commit-message
Generate conventional commit messages from staged git diff. Use this skill whenever the user asks to generate a commit message, write commit text, create a conventional commit, or says things like '生成 commit', '写 commit message', '根据暂存区生成提交说明', 'generate commit message from staged diff', 'write a conventional commit', 'what should my commit say', 'help me commit this'. Also trigger when you see requests to follow Conventional Commits format or when the user has staged changes and asks about committing.
15change-pack
Generate branch name, commit message, and PR content from one shared diff context. Use this skill whenever the user asks to generate multiple git writing artifacts at once, wants to save time by analyzing changes once, or says things like '一口气生成分支名、commit、PR 内容', '链式生成 git 文案', '一次分析改动生成全部', 'generate branch + commit + PR from same diff', 'generate everything', 'all git content from this diff', 'chain generate', or 'one-shot git writing'. This is more efficient than calling individual skills separately because it reads the diff only once and reuses the context.
13branch-name
Generate Git branch names from current branch changes against a base branch. Use this skill whenever the user mentions branch naming, wants to create/rename a branch based on their work, asks for branch name suggestions, or says things like '给这个分支起个名字', '生成分支名', '根据改动起一个 branch 名', 'suggest branch name from diff', 'name this branch based on changes', 'what should I call this branch', or 'name this feature branch'. Also trigger when you see diff-based naming requests or when the user has uncommitted work and asks about branching.
13refactor-migrate
Migrate dependencies, frameworks, or runtime versions with minimal breakage. Use this skill when upgrading libraries, switching frameworks, replacing deprecated APIs, bumping language/runtime versions, or says things like '升级依赖', '迁移到新版本', '替换废弃 API', 'upgrade to v4', 'migrate from X to Y', 'replace deprecated calls', 'bump Node/Python/Go version', 'framework migration', or 'dependency upgrade'. Also trigger when handling breaking changes from a version bump.
3refactor-clean
Perform clean refactoring on any codebase — remove dead code, simplify logic, improve naming, extract abstractions, and reduce complexity without changing behavior. Use this skill when the user asks to clean up code, refactor for readability, reduce complexity, remove unused code, simplify conditionals, flatten nesting, rename for clarity, or says things like '重构一下这段代码', '清理无用代码', '简化逻辑', 'clean up this code', 'refactor for readability', 'reduce complexity', 'remove dead code', 'simplify this function', 'flatten nesting', or 'make this easier to read'. Also trigger when reviewing code quality or performing tech debt cleanup.
3refactor-modernize
Modernize code by replacing legacy patterns with current language features and idiomatic conventions. Use this skill when rewriting old-style code to use modern syntax, adopting new language features, replacing callbacks with async/await, using pattern matching instead of switch, applying modern iteration, or says things like '用现代写法重写', '替换旧语法', '用 async/await 重写回调', 'modernize this code', 'use modern syntax', 'replace legacy patterns', 'convert to async/await', 'use destructuring', 'apply modern idioms', or 'rewrite with current best practices'. Also trigger when adopting new edition features (Rust editions, Python 3.10+ features, ES2024, etc.).
3