speckit-git-validate

Validate Git branch names against SpecKit feature naming conventions and spec directories.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill prevents mismatches between your current feature branch name and the SpecKit spec directory naming, reducing broken links in validation and review workflows.

Core Features & Use Cases

  • Branch naming validation: Confirms the current branch name matches either sequential or timestamp feature naming patterns.
  • Spec directory cross-check: Verifies the expected corresponding folder exists under the specs/ directory using the branch prefix.
  • Graceful fallback: If Git is unavailable or you are not in a Git repo, it can validate a fallback branch name from the SPECIFY_FEATURE environment variable.

Quick Start

Run the speckit-git-validate Skill while on your feature branch to see whether the branch name and its expected specs/<prefix>-* directory both match.

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 my Git branch name against SpecKit feature naming conventions?

Git branch validation for SpecKit confirms your current branch matches sequential or timestamp feature naming patterns and checks that a corresponding specs/<prefix>-* directory exists. This prevents mismatches between branch names and spec directories during review workflows.

What happens to SpecKit branch validation if I am not in a Git repository?

If Git is unavailable or you are outside a repository, SpecKit branch validation falls back to reading the SPECIFY_FEATURE environment variable. It uses this fallback branch name to enforce prefix-matching rules against the expected specs/<prefix>-* paths.

How does branch prefix matching work with the specs directory?

Branch prefix matching extracts a prefix from your current Git branch name and verifies that a matching spec directory exists under the specs/ path. It enforces naming rules against specs/<prefix>-* paths to ensure structural alignment for validation workflows.

Do I need Git installed to run SpecKit directory cross-checks?

Git is required for normal SpecKit directory cross-checks inside a repository, but the validation gracefully falls back to the SPECIFY_FEATURE environment variable if Git is unavailable. This allows branch and spec directory validation to proceed outside a Git context.

Why does my SpecKit validation fail when my branch name does not match the spec folder?

SpecKit validation fails when the Git branch name prefix does not match the corresponding specs/ directory name, preventing broken links in review workflows. It enforces strict prefix-matching rules against specs/<prefix>-* paths for both sequential and timestamp-based branches.