speckit-git-validate

Validate Git branch names against sequential or timestamp naming patterns.

Updated Apr 10, 2026
One-click install
npx skills add https://github.com/kamalsroor1/nest-scaffolding-crud-manager --skill speckit-git-validate-kamalsroor1
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: speckit-git-validate
Source: https://github.com/kamalsroor1/nest-scaffolding-crud-manager/tree/main/.agent/skills/speckit-git-validate
Command: npx skills add https://github.com/kamalsroor1/nest-scaffolding-crud-manager --skill speckit-git-validate-kamalsroor1

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Ensures developers use consistent feature branch names so automated tooling and spec directories reliably map to feature work, preventing mismatched specifications and broken CI checks.

Core Features & Use Cases

  • Pattern validation: Detects feature branches that follow either a sequential prefix (e.g., 001-feature-name) or a timestamp prefix (e.g., 20260319-143022-feature-name).
  • Spec directory verification: Checks for a matching specs/<prefix>-* directory corresponding to the branch prefix and reports missing spec directories.
  • Graceful fallback: Falls back to the SPECIFY_FEATURE environment variable and skips validation with a clear warning if Git is unavailable, making it useful for local checks, pre-commit hooks, and CI pipelines.

Quick Start

Run the speckit-git-validate check in your project root to confirm the current branch matches the sequential or timestamp naming patterns and that a corresponding specs/<prefix>-* 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 Git branch names against feature branch naming conventions?

Git branch name validation checks the current branch against sequential (e.g., 001-feature-name) or timestamp (e.g., 20260319-143022-feature-name) patterns. It also verifies a corresponding specs/<prefix>-* directory exists to ensure automated tooling reliably maps to feature work.

What is the spec-kit branch naming convention for feature work?

The spec-kit branch naming convention requires a sequential prefix like 001- or a timestamp prefix like 20260319-143022-. This ensures feature branches consistently map to their corresponding specs/<prefix>-* directories and pass CI checks.

Can I enforce branch naming rules in CI pipelines when Git is unavailable?

When Git is unavailable, branch validation falls back to the SPECIFY_FEATURE environment variable. It skips validation with a clear warning, making it suitable for local checks, pre-commit hooks, and CI pipelines.

How do I check if a spec directory exists for my feature branch?

To check if a spec directory exists, run the validation in your project root. It verifies that a matching specs/<prefix>-* directory corresponds to your branch prefix and reports any missing spec directories.

Why does my feature branch fail CI checks for mismatched specifications?

Feature branches fail CI checks due to mismatched specifications when the branch name does not follow sequential or timestamp patterns, or when the corresponding specs/<prefix>-* directory is missing from the repository.

Does speckit-git-validate work without a .specify directory structure?

speckit-git-validate applies to repositories using the spec-kit project structure with a .specify directory. It relies on this structure to verify the corresponding specs/<prefix>-* directory exists for feature work.