← Back to list

new-pr
by jjeremycai
⭐ 0🍴 0📅 Jan 20, 2026
SKILL.md
name: new-pr description: This skill should be used when the user asks to "create a PR", "open a pull request", "submit for review", "push my changes", or wants to create a new pull request from current changes. Handles branch detection, commit, push, and PR creation.
Create a new pull request from current changes with smart branch/target detection.
Pre-flight Checks
# Check current branch and status
git branch --show-current
git status --porcelain
# Check remote tracking and sync state
git rev-parse --abbrev-ref --symbolic-full-name @{upstream} 2>/dev/null || echo "No upstream set"
git status -sb
# Check for uncommitted changes
git diff --stat
git diff --cached --stat
Decision Tree
If on main/master branch:
STOP. Ask user: "You're on the main branch. Should I create a feature branch first?"
If no changes exist:
STOP. Tell user: "No changes detected. Working tree is clean and up to date with remote."
If uncommitted changes:
- Review the diff:
git diffandgit diff --cached - Check commit message conventions:
git log --oneline -10 - Commit with meaningful message
If branch exists on remote but is behind:
Check if force push is needed. Ask user before force pushing.
Target Branch Detection
Priority order:
- Explicit argument from user
- Default branch:
gh repo view --json defaultBranchRef -q .defaultBranchRef.name - Common patterns: main, master, develop
- ASK if unclear
PR Creation Steps
-
Review all changes:
git log origin/<target>..HEAD --oneline git diff origin/<target>...HEAD --stat -
Check for conflicts:
git fetch origin <target> git merge-base HEAD origin/<target> -
Check for PR template:
cat .github/PULL_REQUEST_TEMPLATE.md 2>/dev/null -
Create the PR:
- Title: Under 80 chars, imperative mood
- Body: Describes the "why", includes test plan
- Use
--draftif WIP
After Creation
- Output the PR URL prominently
- Mention CI will run if configured
- Ask if user wants to request reviewers
Score
Total Score
50/100
Based on repository quality metrics
✓SKILL.md
SKILL.mdファイルが含まれている
+20
○LICENSE
ライセンスが設定されている
0/10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
Reviews
💬
Reviews coming soon