speckit-git-validate

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

Updated Jan 28, 2024
One-click install
npx skills add https://github.com/Thiago-Cruz-eng/KrockSide --skill speckit-git-validate-thiago-cruz-eng
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: speckit-git-validate
Source: https://github.com/Thiago-Cruz-eng/KrockSide/tree/main/.claude/skills/speckit-git-validate
Command: npx skills add https://github.com/Thiago-Cruz-eng/KrockSide --skill speckit-git-validate-thiago-cruz-eng

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Teams using spec-kit workflows need feature branches to follow strict naming conventions so that specs, plans, and tasks stay traceable to the right branch. Manually checking branch names is error-prone, and working on a misnamed branch silently breaks the link between code and its specification directory. ## Core Features & Use Cases - Branch Name Validation: Checks the current Git branch against two accepted patterns: sequential prefixes like 001-feature-name and timestamp prefixes like 20260319-143022-feature-name. - Spec Directory Detection: Verifies that a matching directory exists under specs/ for the branch prefix, warning when the spec folder is missing. - Graceful Degradation: Falls back to the SPECIFY_FEATURE environment variable when Git is unavailable, or skips validation with a warning instead of failing. - Use Case: Before starting implementation on a spec-kit project, run this validation to confirm you are on branch 042-fix-login-bug and that specs/042-fix-login-bug/ exists, catching setup mistakes before any code is written. ## Quick Start Ask the assistant to validate that the current Git branch follows the spec-kit feature branch naming conventions and that its spec directory exists.

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 in a spec-kit project?▼

Run the branch validation to compare the current branch against the accepted patterns: a sequential prefix like 001-feature-name or a timestamp prefix like 20260319-143022-feature-name. It reports whether you are on a valid feature branch and shows the expected naming format if not.

What branch naming conventions does spec-kit use?▼

Spec-kit accepts two patterns: sequential branches starting with three or more digits followed by a hyphen (e.g., 042-fix-bug), and timestamp branches using YYYYMMDD-HHMMSS followed by a hyphen (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 as a fallback and validates that value against the same naming patterns, otherwise it skips with a warning.

Why does validation warn about a missing spec directory?▼

The warning appears when the branch name is valid but no matching directory exists under specs/ for the branch prefix. This indicates the specification for that feature has not been created yet, so the branch and spec are out of sync.

What happens when I am not on a feature branch?▼

The validation outputs a failure message showing the current branch name and reminds you that feature branches should be named like 001-feature-name or 20260319-143022-feature-name, so you can switch or rename before proceeding.