Skill: PR Writer
Generates a professional PR description in Markdown format based on the ticket, plan document, rewritten commit messages, and code changes. The PR message is multi-audience: suitable for code reviewers and also serves as a record of intent.
When to Use
After rewriting commit messages (Phase 1 & 2), when you're ready to prepare a pull request for code review. Typically triggered after the user confirms the rewritten commits are acceptable.
Process Overview
- Identify the ticket: Extracts ticket ID from branch name (e.g.,
PROJ-123-feature-name) or asks user - Gather context: Collects ticket description, acceptance criteria, and plan document content
- Synthesize changes: Groups code changes by theme/domain (not by individual commits)
- Generate PR description with:
- Title: <ticket_id>: <short summary> - Summary: 2–3 sentences explaining what and why - Changes: Themed list of changes with commit type labels (feat/fix/refactor/test/docs) - Notes: Caveats, follow-ups, or reviewer attention points
- Present to user via
show_contenttool in Markdown format
PR Description Structure
# <ticket_id>: <Short summary>
## Summary
<2–3 sentences on what this PR does and why>
## Changes
- **feat**: <description of feature additions>
- **fix**: <description of bug fixes>
- **refactor**: <description of code improvements>
- **test**: <description of test additions/updates>
- **docs**: <description of documentation updates>
## Notes
<any caveats, follow-ups, or things reviewers should pay attention to>Key Details
- Audience: Primarily code reviewers (technical)
- Grouping: By theme or domain, not by individual commit
- Commit type labels: Reference the standard types (feat/fix/refactor/test/docs)
- Alignment: Must bridge the ticket intent with actual implementation
- No file paths: Include semantic descriptions, not just file listings
Implementation Notes
- Extract ticket ID robustly from branch names with various patterns
- If ticket ID not found in branch, ask user explicitly
- Synthesize rewritten commit messages + diff stats to identify themes
- Ensure all commits are represented in the PR message
- Call
show_contentwith format namepr-message.md
Related
- Phase 1 & 2 (message rewriting) produces the commit messages this uses
- Phase 4 (Slack announcement) for end-user communication from same data