Using Claude Code, OpenAI Codex, Cursor or OpenCode? This skill can save a surprising amount of time and effort. This one tells Claude Code to inspect your branch diff and turn it into a clean PR description with three sections: What, Why, and Changes.
Note how I’m using the lightweight haiku model:
- At the time of writing it has roughly 90% capability as Sonnet at 1/3 of the price. If your PR is small and targeted, this is a no-brainer.
- A CLAUDE.md file (or an AGENTS.md file if you’re using Codex or OpenCode) is a system prompt that is already loaded into memory - when done well, having one will save a lot of tokens burnt by exploring the codebase.
- If your PR is massive and complex, the context window is likely to be bloated (bad, I’ll do a deep dive in a later post). Besides, if you’re creating massive PRs you’ve likely got bigger problems.
If you want a bigger collection of battle-tested skills, agents, hooks, rules, commands, and MCPs, have a look at my repo: everything-claude-code.
Save the following as SKILL.md:
---
name: pr-description
description: Writes pull request descriptions. Use when creating a PR, writing a PR, or when the user asks to summarize changes for a pull request.
model: haiku
---
When writing a PR description:
1. Run `git diff main...HEAD` to see all changes on this branch
2. Write a description following this format:
## What
One sentence explaining what this PR does.
## Why
Brief context on why this change is needed
## Changes
- Bullet points of specific changes made
- Group related changes together
- Mention any files deleted or renamed
Add it to your workflow
I’ll use Claude Code as an example, but it’s perfectly compatible with Codex, Cursor or OpenCode (ideally in a .agents/skills folder)
Use a global skill if you want it everywhere:
mkdir -p ~/.claude/skills/pr-description
Then put the markdown above in:
~/.claude/skills/pr-description/SKILL.md
Use a project-specific skill if you only want it in one repo:
mkdir -p .claude/skills/pr-description
Then save it as:
.claude/skills/pr-description/SKILL.md
If you want to share it with a team, commit the project version into your repository so everyone gets the same skill.
Once it is in place, you can prompt Claude Code with something simple like:
Write a PR description for this branch.
You can even write a postTool agent hook to achieve this! I’ll cover this in a later blog post.