speckit-git-validate

Validate Git feature branch names against naming patterns and spec directories.

60|12|Updated Aug 1, 2013
One-click install
npx skills add https://github.com/vtex/front.phone --skill speckit-git-validate-vtex
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: speckit-git-validate
Source: https://github.com/vtex/front.phone/tree/main/.agents/skills/speckit-git-validate
Command: npx skills add https://github.com/vtex/front.phone --skill speckit-git-validate-vtex

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It prevents inconsistent or invalid Git feature branch names from breaking the expected Spec-to-branch workflow.

Core Features & Use Cases

  • Feature branch detection and naming validation: Checks the current branch against sequential and timestamped naming patterns.
  • Spec directory correlation: Verifies that the matching spec directory exists under the expected specs/ path for the branch prefix.
  • Graceful degradation without Git: Uses the SPECIFY_FEATURE environment variable when Git is unavailable or the directory is not a Git repository.

Quick Start

Ask the AI to validate that the current branch name follows the required feature naming patterns and that the corresponding 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 Git branch naming conventions in CI checks?

Validate Git branch naming conventions by reading the current branch name and matching it against expected numeric and timestamp regex patterns to ensure sequential feature branch compliance. The Skill enforces this by checking branch-to-spec mapping during CI or local workflows.

What happens to branch validation when Git is unavailable?

When Git is unavailable or the directory is not a Git repository, branch validation falls back to the SPECIFY_FEATURE environment variable. This graceful degradation ensures workflow enforcement continues without direct Git access.

Can I enforce spec directory presence for feature branches?

Yes, you can enforce spec directory presence by deriving the branch prefix from the Git branch name and verifying the matching spec directory exists under the expected specs/ path. This correlation prevents broken Spec-to-branch workflows.

What regex patterns are used for feature branch detection?

Feature branch detection uses numeric and timestamp regex patterns to match sequential or timestamped branch names. The validation process checks the extracted branch name against these patterns to confirm naming compliance.

Does spec-kit branch validation work outside of Git repositories?

Yes, spec-kit branch validation works outside Git repositories by supporting the SPECIFY_FEATURE fallback environment variable. This allows filesystem validation and branch-to-spec mapping to proceed even when Git is not present.

Why do my CI checks fail on invalid feature branch names?

CI checks fail on invalid feature branch names because the branch does not match the expected sequential or timestamped naming patterns, or the corresponding spec directory is missing under the specs/ path. Validation enforces branch-to-spec correlation.