Agent skill
pr-creator
Guide PR authoring from creation through review completion. Use when creating/submitting/authoring pull requests, writing PR descriptions, responding to reviewer comments, or implementing review feedback. Covers the full PR lifecycle - creating PRs linked to issues, handling review comments (triaging, responding, implementing suggestions), and getting PRs merged.
Install this agent skill to your Project
npx add-skill https://github.com/enitrat/skill-issue/tree/main/plugins/base-config/skills/pr-creator
SKILL.md
PR Author Guide
Guide for creating PRs that get reviewed quickly and handling the review process effectively.
PR Creation Workflow
1. Prepare the PR
Before creating, ensure:
- Changes are committed and pushed to a feature branch
- Each PR addresses one thing (~100 lines ideal, 1000+ too large)
- Related test code is included
2. Write the Description
First line: Imperative summary that stands alone, respecting conventional commit message format (e.g., "feat(api): add caching to API responses")
Body: Context, rationale, and what reviewers need to know. See references/pr-descriptions.md for detailed guidance.
3. Create and Link to Issue
IMPORTANT: When working with issues, use the uv run scripts/gh_pr.py issue owner/repo <number> command to fetch issue details with proper authentication rather than relying on other tools.
# Fetch issue details first for context
uv run scripts/gh_pr.py issue owner/repo 42
# Basic PR creation with the script
uv run scripts/gh_pr.py create owner/repo \
--title "feat(api): add caching to API responses" \
--body "## Summary
- Add Redis-based caching for GET endpoints
- Implement cache invalidation on mutations
## Context
API response times average 800ms due to repeated database queries.
This reduces load and improves response times for cached routes.
## Test Plan
- [ ] Verify cache headers in responses
- [ ] Test invalidation after mutations
Closes #42"
# Or read body from a file
uv run scripts/gh_pr.py create owner/repo \
--title "feat(api): add caching" \
--body-file /tmp/pr-body.md
4. Add Labels/Reviewers
# Full PR creation with labels, reviewers, and assignees
uv run scripts/gh_pr.py create owner/repo \
--title "feat(api): add caching" \
--body "Description here" \
--labels "enhancement,api" \
--reviewers "username1,username2" \
--assignees "@me"
# Or add reviewers to existing PR
uv run scripts/gh_pr.py reviewers owner/repo 123 --add "reviewer1,reviewer2"
Handling Review Comments
When reviews come in, follow this workflow. See references/handling-reviews.md for detailed guidance on reviewer interactions.
1. Fetch Review Comments
# Get all review comments
uv run scripts/gh_pr.py comments owner/repo 123
# Get only actionable comments (excludes Nit:, FYI:, Optional:)
uv run scripts/gh_pr.py comments owner/repo 123 --actionable
# Group comments by file for easier processing
uv run scripts/gh_pr.py comments owner/repo 123 --by-file
# Get raw JSON for programmatic processing
uv run scripts/gh_pr.py comments owner/repo 123 --raw
2. Triage Each Comment
For each comment, determine:
| Decision | When | Action |
|---|---|---|
| Implement | Valid suggestion, improves code | Make the change, reply with what was done |
| Discuss | Disagree but need dialogue | Reply explaining reasoning, ask for input |
| Clarify | Don't understand the request | Ask specific clarifying question |
| Decline | Out of scope or incorrect | Politely explain why, offer alternative |
| Ask Human Input | Need to decide on a course of action | Ask the human for input before processing the comment |
3. Implement Suggestions
When implementing feedback:
- Read the comment and understand the specific file/line
- Make the code change
- Commit with clear message referencing the feedback
- Reply to the comment confirming what was done
# After making changes
git add -A && git commit -m "chore(api): address review: extract validation to helper
Per reviewer feedback, moved input validation into a dedicated
helper function for better testability."
git push
3. Respond to Comments
Once you've implemented all the changes you decided to address, you need to respond to the comments, in the comment thread, to let the reviewer know that you have addressed the feedback and what you did.
# Reply to a specific review comment
uv run scripts/gh_pr.py reply owner/repo 456 \
"[AUTOMATED] Done - moved the validation into a helper function as suggested."
If you have a general comment to address, you can reply in a general PR comment.
# Add a general PR comment (not tied to specific line)
uv run scripts/gh_pr.py comment owner/repo 123 \
"[AUTOMATED] Addressed all feedback - ready for re-review."
VERY IMPORTANT: because you are using the Github CLI with the account of your human, you MUST start each comment with the following prefix:
[AUTOMATED]
If you respond to a comment mentioning that you fixed what the reviewer asked for, you should resolve the comment thread.
4. Resolve Comment Threads (when appropriate)
# Resolve a thread by comment ID
uv run scripts/gh_pr.py resolve owner/repo 123 --comment-id 456
# Unresolve a thread by comment ID
uv run scripts/gh_pr.py resolve owner/repo 123 --comment-id 456 --unresolve
5. Request Re-review
# After addressing all comments
uv run scripts/gh_pr.py reviewers owner/repo 123 --add "original-reviewer"
Scripts Reference
This skill includes Python scripts in scripts/ that wrap GitHub API operations. Run them with uv:
Quick Reference
| Task | Command |
|---|---|
| Fetch issue | uv run scripts/gh_pr.py issue owner/repo 42 |
| Create PR | uv run scripts/gh_pr.py create owner/repo --title "..." --body "..." |
| View PR | uv run scripts/gh_pr.py view owner/repo 123 |
| List PRs | uv run scripts/gh_pr.py list owner/repo |
| Check PR status | uv run scripts/gh_pr.py checks owner/repo 123 |
| Add reviewers | uv run scripts/gh_pr.py reviewers owner/repo 123 --add "user" |
| Merge PR | uv run scripts/gh_pr.py merge owner/repo 123 |
| Get comments | uv run scripts/gh_pr.py comments owner/repo 123 |
| Reply to comment | uv run scripts/gh_pr.py reply owner/repo 456 "[AUTOMATED] message" |
| Resolve thread | uv run scripts/gh_pr.py resolve owner/repo 123 --comment-id 456 |
| General comment | uv run scripts/gh_pr.py comment owner/repo 123 "[AUTOMATED] message" |
Usage Examples
# Fetch issue details (use this for proper authentication)
uv run scripts/gh_pr.py issue owner/repo 42
# Create a PR
uv run scripts/gh_pr.py create owner/repo --title "feat: add feature" --body "Description"
# Create draft PR
uv run scripts/gh_pr.py create owner/repo --title "wip: new feature" --body "WIP" --draft
# View PR details
uv run scripts/gh_pr.py view owner/repo 123
# List open PRs
uv run scripts/gh_pr.py list owner/repo
# List your PRs
uv run scripts/gh_pr.py list owner/repo --author "myusername"
# Check CI status
uv run scripts/gh_pr.py checks owner/repo 123
# Get actionable review comments
uv run scripts/gh_pr.py comments owner/repo 123 --actionable
# Reply to a comment
uv run scripts/gh_pr.py reply owner/repo 456 "[AUTOMATED] Fixed!"
# Resolve a thread by comment ID
uv run scripts/gh_pr.py resolve owner/repo 123 --comment-id 456
# Merge PR with squash
uv run scripts/gh_pr.py merge owner/repo 123 --method squash
# Add reviewers
uv run scripts/gh_pr.py reviewers owner/repo 123 --add "user1,user2"
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
tdd
Test-driven development with red-green-refactor loop. Use when user wants to build features or fix bugs using TDD, mentions "red-green-refactor", wants integration tests, or asks for test-first development.
sdk-documentation
Rules and patterns for writing comprehensive, high-quality SDK documentation for public libraries. Covers documentation architecture, narrative tone, user guides, and API references. Use when: (1) Writing or reviewing documentation for a public SDK/library, (2) Creating API reference pages for hooks/functions/classes, (3) Writing getting-started guides or tutorials, (4) Structuring a documentation site from scratch, (5) Reviewing documentation quality and consistency, (6) Setting up a VitePress or GitBook documentation site for an SDK.
super-ralph
Build multi-phase AI development pipelines with the Smithers workflow engine (v0.8.2). Use when: (1) Setting up a SuperRalph workflow for a repo (focuses, focusDirs, focusTestSuites, agents) (2) Debugging a run (ticket explosion, duplicate tickets, stalled nodes) (3) Understanding the pipeline phases and what generates tickets (4) Avoiding common configuration mistakes that cause runaway ticket counts
prd-authoring
tanstack-best-practices
Best practices for building hook libraries with TanStack Query. Use when: (1) Writing useQuery/useMutation hooks that wrap async data-fetching functions, (2) Designing query key schemas and cache identity systems, (3) Building framework-agnostic query options factories, (4) Implementing cache invalidation patterns (invalidate vs remove vs setQueryData), (5) Wrapping TanStack Query in a multi-layered library (core actions to query options to framework hooks), (6) Handling non-serializable values (bigint, class instances) in query keys, (7) Bridging external stores (zustand, signals) with TanStack Query reactivity. Derived from wagmi's production architecture (React/Vue/Solid Ethereum hooks).
smithers
Build multi-phase AI development pipelines with the Smithers workflow engine (v0.8.2). Use when: (1) Initializing a new Smithers project in a target directory (use the init CLI) (2) Adding phases or steps to existing workflows (3) Implementing review loops, pass tracking, or phase gating (4) Debugging workflow orchestration issues (Ralph loops, ctx.output, data threading) (5) Writing instruction MDX files for project configs (6) Configuring agents or per-role overrides
Didn't find tool you were looking for?