Skip to content
cccskills
FreePublished on GitHub

ensure-branch

コミットやPR作成の前に、作業ブランチが適切かどうかを確認・切り替えるスキル。git-commit や create-pr からサブルーチンとして呼び出される。

The English summary is being prepared. Showing the original description.

See how to install

Files included (1)

  • SKILL.md1.7 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

ブランチ確認・切り替えスキル

コミットや PR 作成の前に、現在のブランチが作業内容に対して適切かどうかを確認し、必要であれば切り替える。

判断基準

以下のいずれかに該当する場合、適切なブランチへ切り替える:

  1. メインブランチにいる場合 (例: main, master)
  2. ブランチが変更内容と明らかに無関係な場合:
  • 変更内容とブランチ名が全く関係ない(例: feat/add-pr-skill ブランチで全く別の機能を実装している)
  • 以前の作業で使ったブランチが残っていて、新しい作業とは無関係

判断が難しい場合はユーザーに確認すること。

手順

1. 現在のブランチを確認する

git branch --show-current
git log --oneline -5

2. 切り替えが必要か判断する

  • 上記「判断基準」に照らして、切り替えが必要かどうかを判断する
  • 変更内容(git diff・git status)を参照してブランチ名の適切さを評価する

3. 必要であれば切り替える

変更内容から適切なブランチ名を生成して切り替える(例: feat/add-pr-skill, fix/ci-path):

git switch -c <branch-name>

既存ブランチへ切り替える場合:

git switch <branch-name>

注意: ブランチの切り替えには git checkout ではなく git switch を使用すること。

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

modules/npm/packages/ に新しい npm/pnpm パッケージを追加するスキル

The English summary is being prepared. Showing the original description.

rito528/dotfiles2Updated Oct 18, 2026

install/ 配下に新しいセットアップ用シェルスクリプトを追加するスキル

The English summary is being prepared. Showing the original description.

rito528/dotfiles2Updated Oct 18, 2026

GitHub issue を新規作成・下書きするとき、または既存 issue の本文を書き直すときに必ず使うスキル。「issue を作って」「issue 化して」「これを issue にまとめて」のような依頼で発火し、`gh issue create` を直接呼ぶ前に必ず参照する。人間が合意した内容だけを、意味を足さずに issue へ残すための基準を定める。

The English summary is being prepared. Showing the original description.

rito528/dotfiles2Updated Oct 18, 2026

GitHub に Pull Request を作成するスキル。ユーザーが「PRを作って」「プルリクエストを出して」「PR作成して」と言ったとき、またはコミット済みの変更をレビューに出したいときに使用する。

The English summary is being prepared. Showing the original description.

rito528/dotfiles2Updated Oct 18, 2026

ドメインモデル、可視性、操作可能性、不変条件、層境界、API 設計に関わる実装時に使う。不正な状態や誤った呼び出し方を、型、関数の境界、ドメイン語彙で表し、正しい使い方が自然になる設計へ寄せるためのスキル。

The English summary is being prepared. Showing the original description.

rito528/dotfiles2Updated Oct 18, 2026

コードを実装・修正・リファクタリングするすべてのタスクで使うスキル。純粋関数を中心に設計し、副作用(DB、HTTP、ファイル、時刻、乱数、ログなど)を境界へ寄せ、データ変換、エラー表現、コレクション操作、可変状態の扱いを既存コードに合う形で整理する。ユーザーが明示的に指示しなくても、言語を問わず、コードを書き始める前に発火する。設定値やドキュメントだけの変更では不要。

The English summary is being prepared. Showing the original description.

rito528/dotfiles2Updated Oct 18, 2026

See all skills by rito528

Report a problem with this skill