create-pr-description
GitHub根据 git diff、提交日志和变更文件生成符合项目模板的 PR 描述。在用户请求创建或推送 PR 时自动触发,先读取模板并分析代码变更,生成摘要和细节列表供确认,确认后执行推送及创建 PR 操作。
Trigger Scenarios
Install
npx skills add NeverSight/learn-skills.dev --skill create-pr-description -g -y
SKILL.md
Frontmatter
{
"name": "create-pr-description",
"description": "Generates a PR description by reading docs\/pull_request_template.md and filling it with bulleted points derived from the git diff, commit log, and changed files on the current branch. ALWAYS use this skill whenever the user asks to create a PR, push a PR, open a pull request, or make a PR — in any form. This skill MUST run before `gh pr create` is called, every single time."
}
Create PR Description
To generate a PR description that matches the project template, follow this workflow.
Step 1: Read the PR Template
Read docs/pull_request_template.md to get the exact section headings and format required. Do not invent sections — use only what the template defines.
Step 2: Gather What Changed
Run the following git commands to understand the work done on this branch:
# Commits on this branch not yet on main
git log main..HEAD --oneline
# Files changed vs main
git diff main..HEAD --stat
# Full diff for detail
git diff main..HEAD
If main does not exist or the branch has no upstream, fall back to recent commits:
git log --oneline -10
git diff HEAD~1..HEAD --stat
Read the .gitignore file to not include files which have been ignored, these will not be a part of the commit anyway.
Step 3: Fill the Template
Map the gathered information to each section from docs/pull_request_template.md, keeping things super simple for other devs and not too many little details:
Summary
One or two sentences describing the overall purpose of the PR. Focus on the why — what problem it solves or what value it adds — not a file list.
Details
A bulleted list of the specific things that were built or changed. Each bullet describes one logical change in plain language.
Bullet writing rules:
- Start each bullet with a past-tense verb: "Added", "Removed", "Fixed", "Replaced", "Updated", "Extracted"
- Be specific but concise — one sentence per bullet
- Mention component or feature names, not file paths
- Group related file changes into one meaningful bullet
- Skip noise (import reordering, linter auto-fixes) unless that is the point of the PR
- Aim for 3–8 bullets
Step 4: Output
Print the completed PR description as a fenced markdown code block so the user can review it.
Then ask for confirmation. Once confirmed:
- Push the branch if not already pushed:
git push -u origin HEAD - Run
gh pr createusing the generated description as the body
Example Output
### Summary
Added a design md file to control new component ui designs.
### Details
- Added `DESIGN.md` in the project root.
- Added a templte PR description in docs.
- Created a new skill `create-pr-description` to make human-readable descriptions for PRs.
- Added a command to
Version History
- e0220ca Current 2026-07-05 23:25


