
creating-pr
by kkhys
My personal marketplace for Claude Code.
SKILL.md
name: creating-pr description: Create GitHub pull requests with standardized title format and draft status. Use when the user requests to create a PR. This skill uses gh command to create PRs with specific title format '[base-branch] type: description' and generates concise bullet-point descriptions from git changes.
Creating PR
Overview
Create GitHub pull requests following a standardized format with proper Conventional Commits types and draft status.
PR Creation Workflow
1. Analyze Current State
Check the current branch and merge target:
# Get current branch
git branch --show-current
# Check remote tracking and base branch
git status
2. Gather Change Information
Collect information about the changes:
# Get commit history from base branch
git log origin/main..HEAD --oneline
# Get detailed diff from base branch
git diff origin/main...HEAD --stat
git diff origin/main...HEAD
Replace origin/main with the actual base branch (e.g., origin/master, origin/develop).
3. Analyze Changes and Determine Type
Analyze the changes and determine the appropriate Conventional Commits type:
- Read commit-types.md for detailed type selection guidelines
- Consider the primary purpose of the changes
- Follow the priority order: feat > fix > perf > refactor > test > docs > chore
4. Create PR Title
Format: [base-branch] type: description
Components:
[base-branch]: The target branch name (e.g.,main,master,develop)type: Conventional Commits type (feat, fix, chore, docs, refactor, test, perf, style, ci, build)description: Concise summary of changes in lowercase
Examples:
[main] feat: add user authentication system[main] fix: resolve null pointer in login handler[develop] refactor: extract validation logic
5. Create PR Description
Generate a concise bullet-point list of main changes:
Format:
- Main change 1
- Main change 2
- Main change 3
Guidelines:
- Focus on user-facing or significant technical changes
- Keep each point concise (one line)
- Limit to 3-5 main points
- Use imperative mood (e.g., "Add", "Fix", "Update")
Example:
- Add JWT authentication middleware
- Implement user login and logout endpoints
- Add password hashing with bcrypt
6. Push Branch to Remote
Before creating the PR, ensure the current branch is pushed to the remote repository:
# Check if branch has remote tracking
git rev-parse --abbrev-ref @{upstream} 2>/dev/null
# If no upstream or unpushed commits, push the branch
git push -u origin $(git branch --show-current)
Important:
- Always push before creating PR to avoid "must first push" errors
- Use
-uflag to set up tracking relationship - This step is idempotent - safe to run even if already pushed
7. Create Draft PR
Use gh command to create the draft PR:
gh pr create \
--title "[main] feat: add user authentication" \
--body "- Add JWT authentication middleware
- Implement user login and logout endpoints
- Add password hashing with bcrypt" \
--draft \
--assignee kkhys
Important:
- Always use
--draftflag to create draft PR - Always use
--assignee kkhysflag to assign PR to kkhys (REQUIRED) - Use heredoc for multi-line body if needed:
gh pr create \
--title "[main] feat: add user authentication" \
--body "$(cat <<'EOF'
- Add JWT authentication middleware
- Implement user login and logout endpoints
- Add password hashing with bcrypt
EOF
)" \
--draft \
--assignee kkhys
Common Scenarios
Scenario 1: Feature Branch to Main
User Request: "PRを作成して"
Workflow:
- Current branch:
feature/user-auth - Base branch:
main - Changes: Added authentication system
- Type:
feat - Title:
[main] feat: add user authentication system - Description:
- Add JWT authentication middleware
- Implement login/logout endpoints
- Add bcrypt password hashing
Scenario 2: Bugfix Branch to Main
User Request: "create a PR"
Workflow:
- Current branch:
bugfix/null-pointer - Base branch:
main - Changes: Fixed null pointer exception
- Type:
fix - Title:
[main] fix: resolve null pointer in login handler - Description:
- Add null check before accessing user object
- Add error handling for missing credentials
Scenario 3: Multiple Types of Changes
User Request: "make a pull request"
Workflow:
- Current branch:
feature/api-improvements - Base branch:
develop - Changes: New endpoint + refactoring + tests
- Type:
feat(primary purpose is new functionality) - Title:
[develop] feat: add data export endpoint - Description:
- Add CSV export endpoint
- Refactor data processing logic
- Add integration tests
Type Selection Reference
For detailed guidelines on selecting the appropriate type, see commit-types.md.
Quick Reference:
- feat: New features or functionality
- fix: Bug fixes
- refactor: Code restructuring
- test: Test additions
- docs: Documentation only
- chore: Maintenance tasks
- perf: Performance improvements
- style: Code style/formatting
- ci: CI/CD changes
- build: Build system changes
Score
Total Score
Based on repository quality metrics
SKILL.mdファイルが含まれている
ライセンスが設定されている
100文字以上の説明がある
GitHub Stars 100以上
3ヶ月以内に更新がある
10回以上フォークされている
オープンIssueが50未満
プログラミング言語が設定されている
1つ以上のタグが設定されている
Reviews
Reviews coming soon