/git-github:create-pull-requestfrom git-github
このスキルは、ユーザーが「PRを作成して」「pull requestを作って」のように、現在のbranchの変更をpull requestとして提出したい場合に使用する
Ships in git-github. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
&&や;によるチェーン実行は禁止コマンド実行時にエラーが発生した場合
ユーザの意図しない誤った内容で書き込みをする操作は避ける
git branch --show-current
抽出ルール: branch名の最後のセグメントが数値のみの場合、それをissue番号とする
feature/123 → 123bug/456 → 456feature/fix-username-validation → 数値のみのセグメントがないため抽出なしissue番号のないbranchも存在するため、取得できなかった場合はスキップしてよい。Step 2へ進む
以下をもとにAskUserQuestionツールを呼び出してユーザに確認する
questions:
- question: マージ先のbranch名を選択してください
header: マージ先
multiSelect: false
options:
- label: main (推奨)
description: mainブランチにマージする
- label: develop
description: developブランチにマージする
Step 3へ進む
# マージ先branchを最新化
git fetch origin <Step 2のマージ先branch>
# 変更差分を取得
git log origin/<Step 2のマージ先branch>..HEAD --oneline
git diff origin/<Step 2のマージ先branch>...HEAD
## 変更内容
変更差分をもとに変更概要を箇条書きで自動生成
## 動作確認
- [ ] 動作確認すべき内容をここに追記
## 補足
任意のセクション。なければ省略
生成したPull Requestの内容をユーザに表示し、Step 4に進む
<変更概要>にはStep 3で取得した変更差分をもとに自動生成した内容を挿入する
Step 1でissue番号を取得できている場合のみ、以下をもとにAskUserQuestionツールを呼び出してユーザに確認する
questions:
- question: Pull Requestタイトルの形式を選択してください
header: タイトル形式
multiSelect: false
options:
- label: 【#<issue番号>】<変更概要>
description: GitHub issue番号付きのタイトル
- label: <変更概要>
description: issue番号なしのタイトル
issue番号を取得できなかった場合は確認せず <変更概要> をそのままタイトルとする
Step 5へ進む
以下を実行してPull Requestを作成
gh pr create --title "<Step 4のPull Requestタイトル>" --base <Step 2のマージ先branch> --body "<Step 3のPull Request内容>"
Pull Request作成後、生成されたPull RequestのタイトルおよびURLをユーザに表示
Step 6へ進む
code-reviewを利用してコードレビューを実施するようユーザに伝える
実行は不要
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub flupinochan/metalmental-claude --plugin git-github4 skills in this plugin
Other plugins' skills for the same job