本文へスキップ
Skillpedia
デプロイとクラウド(DevOps)10k · #12003

speckit-git-validate

できること

このスキルは、現在のGitのブランチ名が、プロジェクトが使う番号付けのパターンに従っているかを確認します。フィーチャーブランチと一緒にSpec Kitの手法を使う開発者向けです。

使う場面

  • ✓変更を加える前に、正しい機能のブランチにいることを確認したいとき。
  • ✓ブランチ名が、プロジェクトの機能の命名パターンに合っていないように見えるとき。
  • ✓ブランチに対応する仕様のフォルダがあるかを確認したいとき。

スキルのリンク

https://github.com/unoplatform/uno/blob/master/.claude/skills/speckit-git-validate/SKILL.md

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/unoplatform/uno/blob/master/.claude/skills/speckit-git-validate/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“現在のGitブランチが、私たちの機能の命名規則に従っていて、その仕様のフォルダがあるかを確認してください。”

毎週5つの新しいスキル。1分で読めます。

仕組み

このスキルは、現在のブランチ名を読み、2つの許可されたパターンと照らし合わせます。そして、同じ番号またはタイムスタンプを持つ仕様のフォルダを探します。

技術的な内容(元のSKILL.md)

作者による元のテキスト(英語)をGitHubからそのまま表示しています。

Validate Feature Branch

Validate that the current Git branch follows the expected feature branch naming conventions.

Prerequisites

  • Check if Git is available by running git rev-parse --is-inside-work-tree 2>/dev/null
  • If Git is not available, output a warning and skip validation:
    [specify] Warning: Git repository not detected; skipped branch validation
    

Validation Rules

Get the current branch name:

git rev-parse --abbrev-ref HEAD

The branch name must match one of these patterns:

  1. Sequential: ^[0-9]{3,}- (e.g., 001-feature-name, 042-fix-bug, 1000-big-feature)
  2. Timestamp: ^[0-9]{8}-[0-9]{6}- (e.g., 20260319-143022-feature-name)

Execution

If on a feature branch (matches either pattern):

  • Output: ✓ On feature branch: <branch-name>
  • Check if the corresponding spec directory exists under specs/:
    • For sequential branches, look for specs/<prefix>-* where prefix matches the numeric portion
    • For timestamp branches, look for specs/<prefix>-* where prefix matches the YYYYMMDD-HHMMSS portion
  • If spec directory exists: ✓ Spec directory found: <path>
  • If spec directory missing: ⚠ No spec directory found for prefix <prefix>

If NOT on a feature branch:

  • Output: ✗ Not on a feature branch. Current branch: <branch-name>
  • Output: Feature branches should be named like: 001-feature-name or 20260319-143022-feature-name

Graceful Degradation

If Git is not installed or the directory is not a Git repository:

  • Check the SPECIFY_FEATURE environment variable as a fallback
  • If set, validate that value against the naming patterns
  • If not set, skip validation with a warning
よくある質問

どの命名パターンが受け入れられますか?

ブランチは、3桁以上の数字、または日付と時刻のタイムスタンプで始められます。

フィーチャーブランチにいない場合はどうなりますか?

このスキルはそれを報告し、使うべき名前の例を示します。

仕様のフォルダがない場合はどうなりますか?

このスキルは、一致する仕様のフォルダが見つからなかったことを警告します。

詳細

作者による元の説明

Validate current branch follows feature branch naming conventions

repo: unoplatform/uno

人気

GitHubのスター
10k
ランキング
#12003
ライセンス
Apache-2.0
更新日
2026/11/2

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル