with one click
pr-and-cleanup
worktree での開発完了後に PR を作成し、worktree を自動削除する。ローカル/リモートブランチは保持。
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
worktree での開発完了後に PR を作成し、worktree を自動削除する。ローカル/リモートブランチは保持。
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
| name | pr-and-cleanup |
| description | worktree での開発完了後に PR を作成し、worktree を自動削除する。ローカル/リモートブランチは保持。 |
worktreeでの開発完了後、PR作成と同時にworktreeを自動的にクリーンアップします。
このスキルは以下を自動で実行します:
重要: ローカルブランチとリモートブランチは残ります(削除されません)
cd .worktrees/<feature-name>
bash ../../.pi/skills/pr-and-cleanup/scripts/pr_and_cleanup.sh
# PR作成のみ(worktreeを削除しない)
bash pr_and_cleanup.sh --pr-only
# worktreeクリーンアップのみ(PR作成済みの場合)
bash pr_and_cleanup.sh --cleanup-only
# タイトルと本文を事前指定
bash pr_and_cleanup.sh --title "feat: Add new feature" --body "詳細な説明..."
# ドラフトPRとして作成
bash pr_and_cleanup.sh --draft
# 未コミット変更を無視(非推奨)
bash pr_and_cleanup.sh --force
gh CLI がインストール・認証済みであること$ cd .worktrees/issue-42-auth
$ bash ../../.pi/skills/pr-and-cleanup/scripts/pr_and_cleanup.sh
[INFO] Current branch: feature/issue-42-auth
[INFO] Worktree path: /path/to/.worktrees/issue-42-auth
[STEP] Checking for uncommitted changes...
[INFO] No uncommitted changes detected
[STEP] Creating pull request...
[INFO] PR created: https://github.com/user/repo/pull/123
[STEP] Removing worktree...
[INFO] Worktree removed successfully
[STEP] Returning to main branch...
[INFO] Now on branch: main
スクリプトは停止し、コミットを促します。
worktreeは削除されず、現在のディレクトリに留まります。
警告を表示し、処理を中止します。
create-worktree: worktree作成worktree-workflow: ワークフロー全体の概要詳細については REFERENCE.md を参照してください。
PR作成後のCI監視、失敗時の分類と対応、自動マージまでの完全なワークフローを定義
GitHub Issue間の依存関係(Is blocking / Blocked by)を設定・取得するためのAPI操作を提供
GitHub Issueのラベルとメタデータを使用した環境状態管理。worktree/ホスト環境すべてからアクセス可能なSingle Source of Truth
PRの作成からマージ、クリーンアップ、ロールバックまでの標準フローを定義
バージョン整合性チェック→提案→承認→GitHub Release作成までの標準リリースフロー(マルチエコシステム対応)
Git worktree を作成し、並行開発用の独立したブランチ環境を構築する。プラットフォーム固有コード開発時に使用。