| name | slack-pr-recap |
| description | Generate a Slack recap message for a pull request and copy to clipboard. Use when a PR is ready to share with the team on Slack. |
| allowed-tools | Bash(gh pr:*), Bash(gh api:*), Bash(pbcopy), Bash(echo:*), Read, Glob, Grep |
Slack PR Recap for PR #$ARGUMENT$
Generate a concise, Slack-friendly recap message for the specified pull request.
Process
1. Fetch PR Information
Get the PR details:
gh pr view $ARGUMENT$ --json title,body,url,state,author,files,additions,deletions
2. Analyze Documentation Changes
Check for documentation changes to understand context:
gh pr diff $ARGUMENT$ -- '*.md' 'docs/*'
Focus on:
- CLAUDE.md changes (project documentation updates)
- Any docs/ folder changes
- README updates
- The PR description itself
3. Change Statistics
The additions, deletions, and files data is already available from the JSON output in step 1.
4. Determine Change Type
Based on the PR title, description, and changes, identify the type:
- 🚀 feat: New feature
- 🐛 fix: Bug fix
- ♻️ refactor: Code refactoring
- 📚 docs: Documentation only
- 🧪 test: Test additions/changes
- 🔧 chore: Maintenance/dependencies
5. Generate Slack Message
Create a message using Slack formatting:
- Use
*text* for bold
- Use
<url|text> for links
- Use bullet points with
•
- Include relevant emojis
Message Template:
🚀 *[PR Title]* (#[number])
📝 *What changed:*
• [Key change 1 - derived from docs/description]
• [Key change 2]
• [Key change 3 if needed]
🔧 *Type:* [Feature/Bugfix/Refactor/etc]
📁 *Scope:* [X] files changed (+[additions] -[deletions])
🔗 <[PR URL]|View PR>
6. Copy to Clipboard
Use pbcopy to automatically copy the message:
echo "[generated message]" | pbcopy
7. Output
Display the message and confirm it's been copied to clipboard:
✅ Slack message copied to clipboard!
--- Message Preview ---
[show the message]
-----------------------
Ready to paste into Slack!
Guidelines
- Keep the summary to 2-3 bullet points maximum
- Focus on the "what" and "why", not the "how"
- Use documentation changes to understand the purpose
- Make bullet points scannable (short and clear)
- Ensure the message renders correctly in Slack