speckit-git-validate

Validates Git branch names against spec-kit feature branch naming conventions.

Updated May 22, 2026
One-click install
npx skills add https://github.com/WU-MAO-CHIA/AI_tset_platfrom --skill speckit-git-validate-wu-mao-chia
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: speckit-git-validate
Source: https://github.com/WU-MAO-CHIA/AI_tset_platfrom/tree/main/.opencode/skills/speckit-git-validate
Command: npx skills add https://github.com/WU-MAO-CHIA/AI_tset_platfrom --skill speckit-git-validate-wu-mao-chia

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Teams using spec-kit workflows need feature branches to follow strict naming conventions so that specs, branches, and directories stay aligned. Manually checking branch names is error-prone, and working on a misnamed branch can break downstream spec tooling. ## Core Features & Use Cases - Branch Name Validation: Checks the current Git branch against sequential patterns (e.g., 001-feature-name) and timestamp patterns (e.g., 20260319-143022-feature-name). - Spec Directory Verification: Confirms that a matching spec directory exists under specs/ for the branch prefix. - Graceful Degradation: Falls back to the SPECIFY_FEATURE environment variable or skips with a warning when Git is unavailable. - Use Case: Before running spec-kit commands like plan or implement, validate that you are on a properly named feature branch so generated artifacts land in the correct spec directory. ## Quick Start Ask the assistant to validate that the current Git branch follows the spec-kit feature branch naming convention 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 validation to compare the current branch from git rev-parse --abbrev-ref HEAD against two patterns: a sequential prefix like 001-feature-name or a timestamp prefix like 20260319-143022-feature-name. Matching branches are confirmed, and non-matching branches are reported with the expected formats.

What branch naming conventions does spec-kit use?▼

Spec-kit feature branches use either a sequential numeric prefix of three or more digits followed by a hyphen, such as 042-fix-bug, or a timestamp prefix in YYYYMMDD-HHMMSS format, such as 20260319-143022-feature-name.

Does branch validation work outside a Git repository?▼

Yes, it degrades gracefully. If Git is unavailable or the directory is not a repository, it checks the SPECIFY_FEATURE environment variable and validates that value instead. If neither is available, it skips validation with a warning.

Why does validation warn about a missing spec directory?▼

After confirming a valid feature branch, the check looks for a matching directory under specs/ using the branch's numeric or timestamp prefix. A missing directory means the spec has not been created yet, so downstream spec-kit commands may not find the expected files.

What are the limitations of Git branch name validation?▼

It only checks naming patterns and spec directory existence; it does not verify branch contents, commit history, or remote synchronization. Branches that match the pattern but belong to a different feature will still pass validation.