speckit-git-validate

Validate Git feature branch names and matching spec directories.

Updated May 3, 2026
One-click install
npx skills add https://github.com/tykhoncode/dicekit --skill speckit-git-validate-tykhoncode
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: speckit-git-validate
Source: https://github.com/tykhoncode/dicekit/tree/main/.claude/skills/speckit-git-validate
Command: npx skills add https://github.com/tykhoncode/dicekit --skill speckit-git-validate-tykhoncode

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill prevents workflow breakages by validating that the current Git branch follows the expected feature branch naming conventions and has a matching spec directory.

Core Features & Use Cases

  • Branch naming validation: Enforces sequential and timestamp-based branch patterns (e.g., 001-feature-name or 20260319-143022-feature-name).
  • Spec-directory cross-check: Confirms a corresponding specs/<prefix>-* directory exists for the computed prefix.
  • Graceful degradation: Skips Git checks when Git is unavailable, optionally using the SPECIFY_FEATURE environment variable as a fallback.

Quick Start

Run the speckit-git-validate skill in your repository to verify your current branch name and ensure its related 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 that my Git branch name matches a spec directory?

To validate a Git branch name against a spec directory, you can run a check that extracts the current branch name, matches it against sequential or timestamp naming conventions, and confirms a corresponding specs/<prefix>-* directory exists. This ensures branch-driven feature validation consistency.

What naming patterns are supported for feature branch validation?

Feature branch validation supports sequential naming patterns (e.g., 001-feature-name) and timestamp-based naming patterns (e.g., 20260319-143022-feature-name). These conventions ensure branches map correctly to their corresponding specs directories.

Can I check branch naming conventions in a CI environment without Git?

Yes, you can check branch naming conventions without Git by using the SPECIFY_FEATURE environment variable as a fallback. This allows CI workflows to validate the expected prefix and verify the matching spec directory even when Git repository detection is unavailable.

Why does my CI pipeline break when feature branch names don't follow specs mapping?

CI pipelines break because branch-driven feature validation relies on consistent specs/<prefix>-* mappings. If a branch name does not follow the expected sequential or timestamp naming conventions, the matching spec directory cannot be found, causing the workflow to fail.

What is the best way to enforce repository hygiene for feature branch naming?

The best way to enforce repository hygiene is to apply CI checks that validate branch names against expected regex patterns and cross-check for a matching spec directory. This prevents workflow breakages by ensuring consistent feature branch naming and spec mapping.

Do I need a matching specs directory for every Git feature branch?

Yes, you need a matching specs directory for every Git feature branch. The validation process computes a prefix from the branch name and checks for the presence of a corresponding specs/<prefix>-* directory to ensure proper feature validation.