jpskill.com
📦 その他 コミュニティ

flow-finishing-branch

開発ブランチの作業完了後、マージやプルリクエスト、スカッシュなどの方法から、最適な完了処理と後片付けの方法を判断し、スムーズに本流へ統合するSkill。

📜 元の英語説明(参考)

Decide how to complete a development branch: merge, PR, squash, or cleanup.

🇯🇵 日本人クリエイター向け解説

一言でいうと

開発ブランチの作業完了後、マージやプルリクエスト、スカッシュなどの方法から、最適な完了処理と後片付けの方法を判断し、スムーズに本流へ統合するSkill。

※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。

⚡ おすすめ: コマンド1行でインストール(60秒)

下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。

🍎 Mac / 🐧 Linux
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o flow-finishing-branch.zip https://jpskill.com/download/18691.zip && unzip -o flow-finishing-branch.zip && rm flow-finishing-branch.zip
🪟 Windows (PowerShell)
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/18691.zip -OutFile "$d\flow-finishing-branch.zip"; Expand-Archive "$d\flow-finishing-branch.zip" -DestinationPath $d -Force; ri "$d\flow-finishing-branch.zip"

完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。

💾 手動でダウンロードしたい(コマンドが難しい人向け)
  1. 1. 下の青いボタンを押して flow-finishing-branch.zip をダウンロード
  2. 2. ZIPファイルをダブルクリックで解凍 → flow-finishing-branch フォルダができる
  3. 3. そのフォルダを C:\Users\あなたの名前\.claude\skills\(Win)または ~/.claude/skills/(Mac)へ移動
  4. 4. Claude Code を再起動

⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。

🎯 このSkillでできること

下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。

📦 インストール方法 (3ステップ)

  1. 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
  2. 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
  3. 3. 展開してできたフォルダを、ホームフォルダの .claude/skills/ に置く
    • · macOS / Linux: ~/.claude/skills/
    • · Windows: %USERPROFILE%\.claude\skills\

Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。

詳しい使い方ガイドを見る →
最終更新
2026-05-18
取得日時
2026-05-18
同梱ファイル
1

📖 Skill本文(日本語訳)

※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。

Flow Finishing Branch - 分岐完了の意思決定

概要

開発作業が完了したら、それをどのように統合するかを決定する必要があります。このスキルはその決定を導きます。

意思決定の選択肢

A) Fast-forward Merge

When to use:
  - 小さな変更(5ファイル未満)
  - 単独の開発者
  - レビュー不要
  - クリーンなコミット履歴

Command:
  git checkout main
  git merge --ff-only feature/xxx
  git branch -d feature/xxx

Pros:
  - 高速
  - クリーンな履歴
  - マージコミットなし

Cons:
  - レビュー記録なし
  - CI検証なし

B) Create PR (推奨)

When to use:
  - チームプロジェクト
  - レビュー記録が必要
  - CI検証が必要
  - 本番コード

Command:
  git push -u origin feature/xxx
  gh pr create --title "..." --body "..."

Pros:
  - レビュー記録
  - CI検証
  - ディスカッションスレッド
  - 監査証跡

Cons:
  - 時間がかかる
  - レビュアーが必要

C) Squash and Merge

When to use:
  - 多数の小さなコミット
  - 乱雑なコミット履歴
  - main に単一のコミットが欲しい

Command:
  gh pr merge --squash

Pros:
  - クリーンな main の履歴
  - 単一の論理的なコミット
  - WIP コミットを隠す

Cons:
  - 詳細な履歴が失われる
  - bisect が困難

D) Cleanup Only

When to use:
  - 作業が放棄された
  - 実験が失敗した
  - 要件が変更された

Command:
  git checkout main
  git branch -D feature/xxx
  git push origin --delete feature/xxx  # if pushed

Pros:
  - 真っさらな状態
  - デッドブランチがない

Cons:
  - 作業が失われる(後で必要な場合を除く)

意思決定マトリックス

┌─────────────────────────────────────────────────────────────┐
│                    Decision Matrix                          │
├─────────────────────────────────────────────────────────────┤
│                                                             │
│  Files Changed    Review Needed    History Clean    Action  │
│  ─────────────    ─────────────    ─────────────    ──────  │
│  < 5              No               Yes              A) FF   │
│  < 5              No               No               C) Sq   │
│  Any              Yes              Yes              B) PR   │
│  Any              Yes              No               C) Sq   │
│  N/A              N/A              N/A (abandoned)  D) Del  │
│                                                             │
└─────────────────────────────────────────────────────────────┘

完了前チェックリスト

いずれかのオプションを選択する前に、以下を確認してください。

□ すべてのテストがパスする
□ ビルドが成功する
□ lint エラーがない
□ ドキュメントが更新された(必要な場合)
□ EXECUTION_LOG.md が更新された
□ コミットされていない変更がない

プロセス

1. 完了の確認
   → テスト、ビルド、lint を実行する
   → すべてのタスクが完了したか確認する

2. 作業の評価
   → 変更されたファイルの数は?
   → レビューは必要か?
   → コミット履歴はクリーンか?

3. オプションの選択
   → 意思決定マトリックスを使用する
   → 不明な場合は PR をデフォルトとする

4. 実行
   → 適切なコマンドを実行する
   → 成功を確認する

5. クリーンアップ
   → ローカルブランチを削除する
   → リモートブランチを削除する(PR でない場合)

合理化の防止

言い訳 現実
"PR は過剰だ" PR は監査証跡を提供する。それを使用する。
"自分のコードは自分でレビューする" 自己レビューでは問題を見逃す。別の目を入手する。
"履歴は重要ではない" 履歴はデバッグに役立つ。クリーンに保つ。
"とにかくマージする" 最初に検証する。次にマージする。

flow-release との統合

このスキルは、ブランチの処理を決定するために /flow-release で使用されます。

/flow-release execution:
  1. すべてのゲートがパスすることを確認する
  2. このスキルをロードする
  3. オプションをユーザーに提示する
  4. 選択されたオプションを実行する
  5. ステータスを更新する

相互参照


[PROTOCOL]: 変更時にはこのヘッダーを更新し、その後 CLAUDE.md を確認してください

📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開

Flow Finishing Branch - 分支完成决策

Overview

When development work is complete, you need to decide how to integrate it. This skill guides that decision.

Decision Options

A) Fast-forward Merge

When to use:
  - Small changes (< 5 files)
  - Single developer
  - No review needed
  - Clean commit history

Command:
  git checkout main
  git merge --ff-only feature/xxx
  git branch -d feature/xxx

Pros:
  - Fast
  - Clean history
  - No merge commit

Cons:
  - No review record
  - No CI verification

B) Create PR (Recommended)

When to use:
  - Team projects
  - Need review record
  - CI verification required
  - Production code

Command:
  git push -u origin feature/xxx
  gh pr create --title "..." --body "..."

Pros:
  - Review record
  - CI verification
  - Discussion thread
  - Audit trail

Cons:
  - Takes longer
  - Requires reviewer

C) Squash and Merge

When to use:
  - Many small commits
  - Messy commit history
  - Want single commit in main

Command:
  gh pr merge --squash

Pros:
  - Clean main history
  - Single logical commit
  - Hides WIP commits

Cons:
  - Loses detailed history
  - Harder to bisect

D) Cleanup Only

When to use:
  - Work was abandoned
  - Experiment failed
  - Requirements changed

Command:
  git checkout main
  git branch -D feature/xxx
  git push origin --delete feature/xxx  # if pushed

Pros:
  - Clean slate
  - No dead branches

Cons:
  - Work is lost (unless needed later)

Decision Matrix

┌─────────────────────────────────────────────────────────────┐
│                    Decision Matrix                          │
├─────────────────────────────────────────────────────────────┤
│                                                             │
│  Files Changed    Review Needed    History Clean    Action  │
│  ─────────────    ─────────────    ─────────────    ──────  │
│  < 5              No               Yes              A) FF   │
│  < 5              No               No               C) Sq   │
│  Any              Yes              Yes              B) PR   │
│  Any              Yes              No               C) Sq   │
│  N/A              N/A              N/A (abandoned)  D) Del  │
│                                                             │
└─────────────────────────────────────────────────────────────┘

Pre-Completion Checklist

Before choosing any option, verify:

□ All tests pass
□ Build succeeds
□ No lint errors
□ Documentation updated (if needed)
□ EXECUTION_LOG.md updated
□ No uncommitted changes

The Process

1. Verify completion
   → Run tests, build, lint
   → Check all tasks done

2. Assess the work
   → How many files changed?
   → Is review needed?
   → Is commit history clean?

3. Choose option
   → Use decision matrix
   → Default to PR if unsure

4. Execute
   → Run appropriate commands
   → Verify success

5. Cleanup
   → Delete local branch
   → Delete remote branch (if not PR)

Rationalization Prevention

Excuse Reality
"PR is overkill" PR provides audit trail. Use it.
"I'll review my own code" Self-review misses issues. Get another pair of eyes.
"History doesn't matter" History helps debugging. Keep it clean.
"Just merge it" Verify first. Merge second.

Integration with flow-release

This skill is used in /flow-release to decide branch handling:

/flow-release execution:
  1. Verify all gates pass
  2. Load this skill
  3. Present options to user
  4. Execute chosen option
  5. Update status

Cross-Reference


[PROTOCOL]: 变更时更新此头部,然后检查 CLAUDE.md