Agent skill
pr-draft
Create a draft PR with a validated body template and issue linkage.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/pr-draft
SKILL.md
PR Draft
Create a draft PR using a consistent template. Validate body locally before opening.
Inputs
Base branch (default main), head branch (default current), PR title, issue number, summary bullets (1-4), implementation checklist items, validation checklist items.
Workflow
-
Confirm branch state — Verify not on
main. Verify at least one commit exists. Push if needed:git push -u origin <branch> -
Build PR body — Write a temporary markdown file:
markdownFixes #<number> ## Summary - <bullet> ## Implementation Plan - [ ] <step> ## Validation - [ ] <criterion> -
Validate body — Run:
powershell -ExecutionPolicy Bypass -File tools/validate_pr_body.ps1 -Body (Get-Content -Raw <tmpfile>)Fix and re-run until green.
-
Create draft PR — Run:
gh pr create --draft --base <base> --head <head> --title "<title>" --body-file <tmpfile> -
Verify & cleanup — Run
gh pr view --json number,url,body. Confirm formatting persisted. Delete the temporary body file.
Output
PR URL, linked issue number, validation result.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?