git-pr-descriptionlisted
Install: claude install-skill alexeyshishin/as-skill
# git-pr-description — PR description from a branch diff
Goal: give the user a ready-made PR description in one step — analysis of the branch's commits and diff against the base branch.
Before starting, read `~/.claude/rules/git-conventions.md` — the section on PR structure.
## Step 1. Determine the base branch and the current one
```
git branch --show-current
git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's@^refs/remotes/origin/@@'
```
If `origin/HEAD` is not determined — ask the user: `main` or `master`. Store it as `BASE`.
## Step 2. Gather the material
```
git log $BASE..HEAD --oneline
git log $BASE..HEAD --stat
git diff $BASE...HEAD --stat
git diff $BASE...HEAD
```
Study what changed: the file list, the size of the changes, the commit texts.
## Step 3. Build the PR title
The title is a Conventional Commit for the intended merge commit:
- if all commits on the branch are `feat` — `feat(<scope>): <overall feature>`
- if only `fix` — `fix(<scope>): <what was fixed>`
- if mixed — pick the dominant type
## Step 4. Build the description
Structure (markdown):
```markdown
## Why
<1-2 sentences: what problem is being solved, whose pain, links to the issue/ticket>
## What changed
- <bullet per logical change, not per file>
- <another one>
- <another>
## How to verify
<either manual verification steps, or "covered by new tests in X", or "smoke-tested on staging">
## Risks / breaking changes
<either "none", or an explicit list with migration steps>