pr
8
总安装量
8
周安装量
#35788
全站排名
安装命令
npx skills add https://github.com/chanmuzi/git-conventions --skill pr
Agent 安装分布
amp
8
gemini-cli
8
github-copilot
8
codex
8
kimi-cli
8
cursor
8
Skill 文档
Gather Context
Run the following commands to understand the current state:
git log --oneline main..HEAD 2>/dev/null || git log --oneline -10â list commits on this branchgit diff main...HEAD --stat 2>/dev/null || echo "Could not determine diff"â list changed files
If the base branch is not main, adjust the commands to use the correct base branch.
Determine PR Type
Parse $ARGUMENTS:
- If it contains “release” â use the Release PR Template below.
- Otherwise â use the Individual PR Template.
PR Title Convention
Format: {Type}: {description}
Type Prefixes (capitalize first letter â differs from commit messages)
| Type | Purpose |
|---|---|
Feat: |
New feature |
Fix: |
Bug fix |
Refactor: |
Code restructuring |
Perf: |
Performance improvement |
Docs: |
Documentation |
Test: |
Test changes |
Chore: |
Maintenance |
Hotfix: |
Urgent fix |
Release: |
Release integration (e.g., Release: dev â main íµí© (v0.5.0)) |
Write the description in the language configured in the project’s CLAUDE.md. If no language is configured, follow the user’s conversational language.
Individual PR Template
Apply this template for feature, fix, refactor, and other non-release PRs.
## ð ê°ì
{1-3 sentences: background, problem, and solution}
> â ï¸ **Breaking Change**: {only if applicable â describe migration needed}
## â
ë³ê²½ ì¬í
### 1. {Change category title}
{Detailed description. Include before/after comparisons, code snippets, or diagrams where helpful.}
### 2. {Change category title}
{...}
## ð íì¼ ë³ê²½ ìì½
| êµ¬ë¶ | íì¼ |
|------|------|
| ì¶ê° | `path/to/new/file.py` |
| ìì | `path/to/modified/file.py` |
| ìì | `path/to/deleted/file.py` |
## 𧪠í
ì¤í¸
- [ ] {Test item 1}
- [ ] {Test item 2}
## ð ê´ë ¨ ì´ì/PR
- #{number}
ð¤ Generated with [Claude Code](https://claude.com/claude-code)
Release PR Template
Apply this template when $ARGUMENTS contains “release”. Typically used for dev â main integration.
Collect all merged PRs since the last release:
gh pr list --state merged --base dev --limit 30 --json number,title --jq '.[] | "- #\(.number) \(.title)"'
Title format: Release: dev â main íµí© (vX.Y.Z)
## ð ê°ì
{Release summary â what this release includes}
> â ï¸ **ë°°í¬ ê³µì§**: {Deployment impact notice â which servers are affected, migration steps if any}
## ⨠주ì ë³ê²½ì¬í
### 1. {Feature/Fix name} (#{PR number})
{Brief summary of this PR's changes}
### 2. {Feature/Fix name} (#{PR number})
{...}
## ð ë³ê²½ë íì¼
| íì¼ | ë³ê²½ ë´ì© |
|------|----------|
| `file.py` | {description} |
## ð í
ì¤í¸
- [ ] {Test checklist item}
## ð ê´ë ¨ PR
- #{number1}
- #{number2}
## ð ë°°í¬ ì ë³´
| íê²½ | ìë² | ë¸ëì¹ |
|------|------|--------|
| ê°ë° | {dev server} | dev |
| ì´ì | {prod server} | main |
ð¤ Generated with [Claude Code](https://claude.com/claude-code)
Task
- Determine PR type: Release (if
$ARGUMENTScontains “release”) or Individual. - Draft the PR title and body using the appropriate template above, and show it to the user.
- Sync check before pushing:
git fetch origin {base-branch}- If the local branch is behind, inform the user and suggest an appropriate action (rebase, merge, or proceed as-is).
- Push the branch if not already pushed:
git push -u origin {branch-name} - Create the PR:
gh pr create --title "..." --body "$(cat <<'EOF' ... EOF)" - Return the PR URL.
Important:
- For Release PRs, automatically collect all included PRs from the merge history.
- Adapt section headers and content language to the project’s CLAUDE.md language setting.
- The file change table should be generated from the actual diff, not guessed.