スキル一覧に戻る
jjeremycai

new-pr

by jjeremycai

0🍴 0📅 2026年1月20日
GitHubで見るManusで実行

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:

  1. Review the diff: git diff and git diff --cached
  2. Check commit message conventions: git log --oneline -10
  3. 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:

  1. Explicit argument from user
  2. Default branch: gh repo view --json defaultBranchRef -q .defaultBranchRef.name
  3. Common patterns: main, master, develop
  4. ASK if unclear

PR Creation Steps

  1. Review all changes:

    git log origin/<target>..HEAD --oneline
    git diff origin/<target>...HEAD --stat
    
  2. Check for conflicts:

    git fetch origin <target>
    git merge-base HEAD origin/<target>
    
  3. Check for PR template:

    cat .github/PULL_REQUEST_TEMPLATE.md 2>/dev/null
    
  4. Create the PR:

    • Title: Under 80 chars, imperative mood
    • Body: Describes the "why", includes test plan
    • Use --draft if WIP

After Creation

  1. Output the PR URL prominently
  2. Mention CI will run if configured
  3. Ask if user wants to request reviewers

スコア

総合スコア

50/100

リポジトリの品質指標に基づく評価

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

レビュー

💬

レビュー機能は近日公開予定です