Skip to content
Skillpedia
Deploy & cloud (DevOps)10k · #12003

speckit-git-validate

What it does

This skill checks whether your current Git branch name follows the numbering pattern the project uses. It is for developers using the Spec Kit method with feature branches.

When to use it

  • ✓When you want to confirm you are working on the right feature branch before making changes.
  • ✓When a branch name does not look like the project's feature naming pattern.
  • ✓When you want to check that a matching spec folder exists for your branch.

Skill link

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

Copy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.

How to use

The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.

Ready-to-paste message

Use this skill to help me: https://github.com/unoplatform/uno/blob/master/.claude/skills/speckit-git-validate/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute →

Example of what to ask your AI

“Check that my current Git branch follows our feature naming rules and that its spec folder exists.”

5 new skills a week. 1 minute to read.

How it works

The skill reads the current branch name and checks it against the two accepted patterns. It then looks for a spec folder with the same number or timestamp.

Technical content (original SKILL.md)

Original text by the author, straight from 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
FAQ

What naming patterns are accepted?

Branches can start with a number of three or more digits, or with a date and time stamp.

What if I am not on a feature branch?

The skill reports that and shows example names to use.

What if the spec folder is missing?

The skill warns you that no matching spec folder was found.

Details

Original description by the author

Validate current branch follows feature branch naming conventions

repo: unoplatform/uno

Popularity

GitHub stars
10k
Ranking position
#12003
License
Apache-2.0
Updated
11/2/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills