/shiiman-workflow:issue-branch-pr-create [--help]from shiiman-workflow
Creates an Issue, branch, commits, and PR from existing working tree changes. Useful when you've made changes and want to retroactively create a structured PR workflow.
Ships in shiiman-workflow. 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.
既存の変更内容から Issue → ブランチ → コミット → push → PR を作成する Backward フロー。
$ARGUMENTS に --help が含まれる場合、以下を表示して終了:
/shiiman-workflow:issue-branch-pr-create - 既存変更から Issue・PR を作成する Backward フロー
概要:
ワーキングツリーの変更やコミット済み未プッシュの変更から
Issue → ブランチ/worktree → コミット → push → PR を自動作成する。
使用方法:
/shiiman-workflow:issue-branch-pr-create
/shiiman-workflow:issue-branch-pr-create --help
オプション:
--help このヘルプを表示
例:
/shiiman-workflow:issue-branch-pr-create # 既存変更から Issue・PR を作成(既定はブランチ)
/shiiman-workflow:issue-branch-pr-create --help # ヘルプを表示
指定の伝え方(フラグの代わり):
- 「worktree で」 → ブランチではなく worktree を作成(既存変更は stash 経由で移動)
既存変更 → 確認 → Issue 作成 → ブランチ/worktree 作成 → コミット → push → PR 作成
| ブランチ | 変更状態 | Issue | Branch | Commit | Push | PR |
|---|---|---|---|---|---|---|
| default | 未コミットあり | 実行 | 実行 | 実行 | 実行 | 実行 |
| default | コミット済み未push | 実行 | 実行 | スキップ | 実行 | 実行 |
| feature | 未コミットあり | 実行 | スキップ | 実行 | 実行 | 実行 |
| feature | コミット済み未push | 実行 | スキップ | スキップ | 実行 | 実行 |
| any | 変更なし | エラー終了 | - | - | - | - |
Bash で現在の変更状態を確認する。
git status
git diff
git diff --cached
未プッシュコミットの確認:
git log @{u}..HEAD --oneline 2>/dev/null || git log origin/$(git rev-parse --abbrev-ref HEAD)..HEAD --oneline 2>/dev/null
判定ロジック:
## エラー: 変更がありません
コミット対象の変更が見つかりませんでした。
変更を加えてから再度実行してください。
DEFAULT_BRANCH="$(gh repo view --json defaultBranchRef -q '.defaultBranchRef.name')"
CURRENT_BRANCH="$(git rev-parse --abbrev-ref HEAD)"
CURRENT_BRANCH が DEFAULT_BRANCH と一致 → デフォルトブランチ上Skill ツールで Issue を作成する。変更内容のサマリーを引数に渡す。
Skill: shiiman-github:issue-create
Args: --no-confirm {変更内容のサマリー}
作成された Issue 番号を記録する。
デフォルトブランチ上の場合のみ実行。feature ブランチ上ならスキップ。
既定はブランチ。発話に「worktree で」等があれば worktree を作成する。
ブランチ(既定):
Skill: shiiman-github:branch-create
Args: {issue番号}
worktree(「worktree で」と指示された場合):
⚠️ worktree は別ディレクトリに作成されるため、既存の未コミット変更の移動が必要です。 以下の手順で変更を移動する:
git stash push -m "worktree migration: {issue番号}"
Skill: shiiman-github:worktree-create
Args: {issue番号}
git stash pop
stash pop が失敗した場合(コンフリクト等):
git stash pop がコンフリクトした場合、手動でコンフリクトを解消するgit stash list で確認可能(git stash pop 失敗時は stash は残る)git stash pop --abort 後、元ディレクトリに戻り git stash pop で変更を復元し、--worktree なしでやり直す未コミット変更がある場合のみ実行。コミット済みならスキップ。
Skill ツールでコミットを実行する。
Skill: shiiman-git:add-commit
Args: --no-confirm
この Issue から PR までのフロー全体の明示的な依頼には、Issue・branch・コミット・通常の push・PR 作成を含む。remote・対象 feature branch・送信対象のコミットを確認して git push -u origin {branch} を実行する。この許可だけで force-push、デフォルトブランチへの push、無関係な変更の送信は行わない。
「push しない」と明示されている場合はそれを守り、未公開コミットのため PR 作成を完了できないことを報告する。push できたものとして続行したり PR 作成済みと主張したりしない。既存の許可で十分であり、--no-confirm は任意の互換オプションで、指定自体が許可を与えるものではない。
Skill ツールで PR を作成する。
Skill: shiiman-github:pr-create
Args: --no-confirm
## Backward フロー完了
### 作成された Issue
- #{issue番号}: {タイトル}
### ブランチ
- {ブランチ名}
### 作成された PR
- PR #{pr番号}: {タイトル}
- URL: {pr_url}
PR がマージされると Issue #{issue番号} は自動的にクローズされます。
### worktree クリーンアップ(worktree 作成時のみ)
PR マージ後、不要になった worktree を削除してください:
`/shiiman-git:worktree` で gtr rm または gtr clean を実行
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
github-workflow, pr-creation, issue-creation, git-automation
Other plugins' skills for the same job
4 skills in this plugin
/agent-teamshiiman-workflow:agent-teamAgent Team(tmux + TeamCreate)で並列実装する開発フロー。「エージェントチームフロー」「workflow-agent-team」「Agent Team で実装」「チームで実装」「チーム並列開発」などで起動。依頼された範囲の実装・検証と許可済みの仕上げ操作を、重複確認せず進める。/multishiiman-workflow:multiマルチエージェントで並列実装する開発フロー。「shiiman-workflow:multi」「マルチフロー」「並列で実装」などで起動。依頼された範囲の実装・検証と、許可済みのコミット・Issue・push・PR 作成を重複確認せず行う。/singleshiiman-workflow:singleシングルエージェントで順次実装する開発フロー。「shiiman-workflow:single」「シングルフロー」「順次実装」などで起動。依頼された範囲の実装・検証と、許可済みのコミット・Issue・push・PR 作成を重複確認せず行う。npx claudepluginhub shiiman/claude-code-plugins --plugin shiiman-workflow