一键导入
pr-creation
ghコマンドでドラフトPRを作成する。 ブランチにコミット済み&リモートにpush済みの状態で使用。 git + gh / GitButler 両環境に対応。 単純ケースはスキル内で完結、複雑ケースはpr-managerサブエージェントへ委譲。
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
ghコマンドでドラフトPRを作成する。 ブランチにコミット済み&リモートにpush済みの状態で使用。 git + gh / GitButler 両環境に対応。 単純ケースはスキル内で完結、複雑ケースはpr-managerサブエージェントへ委譲。
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Adds Spell UI visual documentation pages to docs-site from repos/ sources: optional clone into repos/, Context Engineering (JiT loading, structured extraction, self-refinement), scan-source.sh inventory, Think–Structure–Style and templates, writes docs/<name>.html, links index.html, opens draft PRs. Encodes requested reading tone in concrete wording (short steps, clear labels, respectful imperatives) instead of meta section titles or brochure taglines. Aligns index card titles with the page title and subject matter. Use when converting READMEs, SKILLs, or cloned repos under repos/ into docs-site pages. Do not use for non-docs-site projects, source outside repos/, standalone generic HTML outside this site, large in-place rewrites of existing pages (do focused edits instead), or pages that only name a vibe in headings without substantive content.
現在の差分を分析し、最適な粒度でコミットを分割・実行する。 Git / GitButler CLI 両環境に対応。 単純なケースはスキル内で完結、複雑なケースはcommit-managerサブエージェントへ委譲。
| name | pr-creation |
| description | ghコマンドでドラフトPRを作成する。 ブランチにコミット済み&リモートにpush済みの状態で使用。 git + gh / GitButler 両環境に対応。 単純ケースはスキル内で完結、複雑ケースはpr-managerサブエージェントへ委譲。 |
核心原則: レビュアーは忙しい。「読みたい」と思っていない前提で、読んでもらう努力をする。
PR作成フローの最初に、現在の作業環境を判定する。
but status 2>/dev/null && echo "GITBUTLER" || echo "GIT"
| 結果 | 環境 | 状態確認 | Push | PR作成 |
|---|---|---|---|---|
GITBUTLER | GitButler | but status -f | but push <branch> | gh pr create |
GIT | 通常 git | git status 等 | 済み前提 | gh pr create |
設計意図: PR作成は両環境とも
gh pr createを使用する。but prは対話式のため、エージェント自動化にはgh pr create+ ヒアドキュメントの方が制御しやすい。
IF 単純なケース(以下すべて該当):
├─ ブランチ: feature/{codename}/00-* または fix/* または hotfix/*
├─ ベースブランチ: main
├─ 依存PR: なし
└─ → スキル内で完結(下記フローに従う)
IF 複雑なケース(以下いずれか該当):
├─ ブランチ: feature/{codename}/{NN}-*(NN > 00)
├─ ベースブランチ: 前の連番ブランチ
├─ 依存PR: あり
├─ マルチパッケージ変更
├─ GitButler スタックブランチ
└─ → pr-manager サブエージェントを起動
flowchart LR
A[環境検出] --> B[状況把握]
B --> C[コマンド生成]
C --> D[Self-Refine]
D --> E[Push + PR作成]
E --> F[完了確認]
git branch --show-current # 現在のブランチ名
git status --short # 未コミットの変更確認
git log --oneline -3 # 最新のコミット確認
but status -f # ブランチ一覧・コミット・ファイル状態を一括確認
but status -fは、ブランチ名・コミット履歴・未コミット変更を全て含む。git 環境で3コマンド必要な情報が1コマンドで得られる。
判断:
| 状態 | 判断 | アクション |
|---|---|---|
| ブランチ名が取得できない | エラー | 処理終了、ユーザーに報告 |
| 未コミットの変更がある | 警告 | ユーザーに確認を求める |
| コミットがない | 警告 | ユーザーに確認を求める |
| スタックブランチである(GitButler) | 複雑 | pr-manager サブエージェントへ委譲 |
templates.md のテンプレートを使用してPR本文を作成。 decision-logic.md でベースブランチ・タイトルを決定。
コマンドを実行する前に、safety-checks.md に従って評価。
flowchart LR
A["生成<br>(Generator)"] --> B["評価<br>(Evaluator)"]
B --> C{"合格?"}
C -->|No| D["修正<br>(Refiner)"]
D --> B
C -->|Yes| E["実行へ"]
重要: 評価結果を表示し、問題がなければ「評価完了」と宣言して実行に進む。
cat <<'EOF' | gh pr create \
--draft \
--base main \
--assignee @me \
--title "<タイトル>" \
--body-file -
<本文>
EOF
# 1. Push(GitButler経由)
but push <branch>
# 2. PR作成(gh CLI — 通常 git と同じ)
cat <<'EOF' | gh pr create \
--draft \
--base main \
--assignee @me \
--title "<タイトル>" \
--body-file -
<本文>
EOF
GitButler 環境では
but pushでリモートに反映してからgh pr createを実行する。PR作成コマンド自体は両環境で同一。
PR作成完了:
- Title: <タイトル>
- URL: https://github.com/org/repo/pull/123
- Base: main
- Draft: true
- Assignee: @me
確認チェックリスト:
複雑なケースでは以下のプロンプトで pr-manager サブエージェントを起動:
【タスク】
PR作成
【環境】
{GIT または GITBUTLER}
【現在のブランチ】
{git branch --show-current または but status の結果}
【最新コミット】
{git log --oneline -5 または but status -f の結果}
【期待する出力】
- 依存PRの特定と関連付け
- 適切なベースブランチの決定
- PR本文の生成
- Push(GitButler環境の場合は but push)
- ghコマンドの実行
| シーン | 参照ファイル |
|---|---|
| 本文・タイトルテンプレート | templates.md |
| ベースブランチ・依存PR決定 | decision-logic.md |
| クォーティング・Self-Refine | safety-checks.md |
| 項目 | 値 | 理由 |
|---|---|---|
| ドラフトモード | 有効 | レビュー前の準備期間を確保 |
| アサイン | 作成者(@me) | 責任者の明確化 |
| レビュー依頼 | なし | ドラフト解除時に設定 |