reedom-ghcreate-draft-pr
Prepare complete PR content ready for creation via reedom-gh:pr-maker agent.
When & Why to Use This Skill
The reedom-gh:create-draft-pr skill streamlines the GitHub workflow by automating the preparation of comprehensive Pull Request (PR) content. By analyzing Git commits and diffs, it generates standardized, high-quality PR titles and bodies, handles multi-language support, and manages complex PR dependencies, significantly reducing the manual overhead of code submission.
Use Cases
- Automated PR Drafting: Automatically generate professional, semantic PR titles and detailed summaries based on code changes and commit history to save developer time.
- Workflow Standardization: Enforce consistent PR formats (e.g., feat/fix/refactor) and body structures across a development team to improve code review efficiency.
- Managing PR Chains: Automatically update the descriptions of preceding PRs when a new dependent PR is prepared, ensuring clear tracking of development sequences.
- Multi-language Documentation: Generate PR content in specific languages (such as English or Japanese) to facilitate communication in international or distributed teams.
| name | reedom-gh:create-draft-pr |
|---|---|
| description | Prepare complete PR content ready for creation via reedom-gh:pr-maker agent. |
| allowed-tools | Read |
Collect data, draft complete PR content, cleanup, return ready-to-use JSON.
Arguments
| Arg | Default | Description |
|---|---|---|
--against |
origin/main | Target branch |
--lang |
system | PR content language |
--prefix |
"" | Prefix to prepend to title |
Workflow
- Run
${CLAUDE_PLUGIN_ROOT}/skills/create-draft-pr/scripts/collect-info.sh -a <target> --lang <lang> - Check for errors
- Read temp files (commits, diffs)
- Draft PR title and body
- Prepare preceding PR update (if exists)
- Run
${CLAUDE_PLUGIN_ROOT}/skills/create-draft-pr/scripts/cleanup.sh <temp_dir> - Return complete PR data
Output JSON
{
"current_branch": "feature/x",
"target_branch": "origin/main",
"push_needed": true,
"matched_spec": "auth",
"pr": {
"title": "feat(auth): add login module",
"body": "## Summary\n..."
},
"existing_pr": {
"exists": false,
"number": null
},
"preceding_pr": {
"exists": true,
"number": 122,
"updated_body": "## PR Order\n- this PR\n- #NEW\n\n<original body>"
}
}
Agent replaces #NEW with actual PR number after creation.
Title Format
<prefix> type(scope): description
- Prepend
--prefixvalue if provided - Type: feat/fix/refactor/chore/docs/test (from commits)
- Scope: matched_spec if single, omit if multiple/none
- Max 50 chars (excluding prefix), lowercase, imperative
Body Format
Language: lang.effective
## Summary
What and why (2-3 sentences)
## Changes
- Key changes
## Testing
How to verify
## Related Issues
closes #N
Preceding PR Update
If preceding PR exists, prepare updated_body:
## PR Order
- this PR
- #NEW
<original body>
Use ## PR順序 for Japanese.
Large Diff Strategy
When split: read manifest.json, prioritize source files, skip generated.
Error Handling
{"error": "message", "error_code": "NOT_GIT_REPO"}