branch-naming
Skill1 starsChanged 2 months agoMITView on GitHub
ブランチ命名規則を探索して命名する。ml-pipeline 手順1.5 で自動使用。「ブランチ名を決めて」「命名規則を調べて」でも使う。
In this repository27 other files it gives its agents.
- AGENTS.mdAGENTS.md
- adrSkill
- architecture-checkSkill
- brainstormSkill
- codex-delegateSkill
- config-explainSkill
- config-setSkill
- cross-reviewSkill
- design-interviewSkill
- diagnosing-bugsSkill
- fix-ciSkill
- handoffSkill
- leakage-checkSkill
- literature-reviewSkill
- mlflow-logSkill
- multi-seedSkill
- mutation-testSkill
- paper-writingSkill
- pre-mortemSkill
- property-testSkill
- python-standardsSkill
- refactor-scoutSkill
- regression-suiteSkill
- retrospectiveSkill
- security-reviewSkill
- spec-checklistSkill
- tddSkill
The file
Files
ブランチ命名規則の探索と決定
プロジェクト内からブランチ命名規則を探し、見つかればそれに従った名前を、 無ければテンプレート既定の形式を返す。
探索の手順(見つかった時点で確定し、以降は探さない)
- キャッシュ確認: docs/branch-convention.md が存在すればそれを読み、 記載された規約をそのまま使う(探索をスキップ)。
- CONTRIBUTING.md / CONTRIBUTING.ja.md(リポジトリルートと docs/ 配下): 「ブランチ」「branch」「命名」「naming」を含むセクションを探す。
- README.md: 同様のセクションを探す。
- docs/ 配下の開発ガイド: development.md, workflow.md, git*.md 等。
- .github/ 配下: PULL_REQUEST_TEMPLATE.md、workflows/*.yml 内の ブランチ名検証(正規表現)を探す。正規表現があればそれが規約。 例外: 手順1〜3の文書で規約を新規に見つけた場合も、この手順4 (CI の検証正規表現)だけは必ず確認し、文書と CI が矛盾したら CI を 採用する(文書が古くても CI は実際にブロックするため)。手順0の キャッシュ命中時はこの確認も不要(キャッシュは前回この確認を経て 確定した結果のため)。また、どの手順でも「廃止」「deprecated」等の 明記がある記述は採用せず次の候補へ進む。
- 既存ブランチの実績分析:
git branch -a --format='%(refname:short)'を実行し、 スラッシュ区切りの最初のセグメント(プレフィックス)の頻度を集計する。 同一プレフィックスが3本以上あれば、それを事実上の規約とみなす (例: feature/ が5本 → feature/<説明> 形式を採用)。 main / master / develop / HEAD / origin 系は集計から除外する。 - どこにも無い場合: テンプレート既定の
pipeline/YYYYMMDD-<トピック>を使う。
名前の生成ルール
- 規約が見つかった場合、その形式に従う。種類(feature/fix/refactor 等)は 依頼内容から判断する(新機能→feature、バグ修正→fix、等)
- 説明部分は依頼内容から2〜4語の英語 kebab-case で生成する (規約が snake_case を指定していればそれに従う)
- Issue 番号や日付が規約に含まれる場合、日付は今日、Issue 番号は ユーザーに確認する(勝手に番号を作らない。no-guess)
キャッシュの保存
規約を確定したら(既定へのフォールバック時を除く)、docs/branch-convention.md に 以下の形式で保存する。次回からは手順0で即決できる。 このテンプレートのリポジトリでは docs/ は .gitignore 対象(git 管理外)のため この保存はコミットされない(下流プロジェクトでは各自の .gitignore 設定に依るため、 挙動が異なる場合がある)。
ブランチ命名規則(自動検出)
- 形式: <検出した形式。例: feature/<issue番号>-<説明>>
- 出典: <どこで見つけたか。例: CONTRIBUTING.md「ブランチ運用」節 / 既存ブランチの実績(feature/ が5本)>
- 検出日: YYYY-MM-DD
- 備考: この内容が実態と合わなくなったらこのファイルを削除する(次回に再探索される)
出力
決定したブランチ名を1行で返し、根拠(出典)を1文添える。 このスキルはブランチを作成しない(名前の決定まで。作成は呼び出し元が行う)。
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

