speckit-git-validate

Validates that the current Git branch follows spec-kit feature branch naming conventions.

Updated Apr 8, 2026
One-click install
npx skills add https://github.com/msaid1976/TSP-SmartAIRoute --skill speckit-git-validate-msaid1976
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: speckit-git-validate
Source: https://github.com/msaid1976/TSP-SmartAIRoute/tree/main/.agents/skills/speckit-git-validate
Command: npx skills add https://github.com/msaid1976/TSP-SmartAIRoute --skill speckit-git-validate-msaid1976

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Teams using spec-kit workflows need feature branches to follow strict naming conventions so that specs, branches, and directories stay aligned. Manually checking branch names against sequential or timestamp patterns is error-prone and easy to skip. ## Core Features & Use Cases - Branch Name Validation: Checks the current Git branch against sequential patterns like 001-feature-name and timestamp patterns like 20260319-143022-feature-name. - Spec Directory Detection: Verifies that a matching spec directory exists under specs/ for the branch's numeric or timestamp prefix. - Graceful Degradation: Falls back to the SPECIFY_FEATURE environment variable when Git is unavailable, and skips validation with a warning instead of failing. - Use Case: Before running a spec-kit command, confirm you are on branch 042-fix-bug and that specs/042-fix-bug/ exists, catching misnamed branches early. ## Quick Start Ask the assistant to validate that the current Git branch follows the spec-kit feature branch naming conventions.

Frequently Asked Questions about speckit-git-validate

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I validate a Git feature branch name?▼

Run the validation to compare the current branch from `git rev-parse --abbrev-ref HEAD` against two patterns: sequential names like `001-feature-name` and timestamp names like `20260319-143022-feature-name`. Matching branches report success; others report failure with naming guidance.

What branch naming conventions does spec-kit use?▼

Spec-kit feature branches use either a sequential numeric prefix of three or more digits (e.g., `001-feature-name`, `1000-big-feature`) or a timestamp prefix in `YYYYMMDD-HHMMSS` format (e.g., `20260319-143022-feature-name`).

Does branch validation work without Git installed?▼

Yes, it degrades gracefully. If Git is unavailable or the directory is not a repository, it checks the SPECIFY_FEATURE environment variable and validates that value instead. If neither is available, it skips validation with a warning.

Why does validation warn about a missing spec directory?▼

After confirming a valid feature branch, it looks for a matching directory under specs/ using the branch's numeric or timestamp prefix. A missing directory means the spec for that feature has not been created yet, so it emits a warning rather than an error.

What happens when the current branch is not a feature branch?▼

The validation outputs a failure message showing the current branch name and explains the expected formats, such as `001-feature-name` or `20260319-143022-feature-name`, so you can rename or create a compliant branch.