opsmill/infrahub · Archived

speckit-git-validate

Validate current branch follows feature branch naming conventions

First seen May 16, 2026

Installation

$ npx skills add opsmill/infrahub --skill speckit-git-validate

Stronger alternatives

This repository is archived — consider an actively maintained alternative.

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from opsmill/infrahub · top by installs.

npx skills add opsmill/infrahub

Browse all from opsmill/infrahub

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

Stars 513
License LICENSE.txt
Default branch stable
Open issues 439
Status Archived

Skill metadata

Parsed from SKILL.md frontmatter.

CompatibilityRequires spec-kit project structure with .specify/ directory
More metadata
author
github-spec-kit
source
git:commands/speckit.git.validate.md

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 2,015 B
  • docs SUMMARY.md 93 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 2 installs

SKILL.md

Validate Feature Branch

Validate that the current Git branch follows the expected feature branch naming conventions.

Prerequisites

  • Check if Git is available by running git rev-parse --is-inside-work-tree 2>/dev/null
  • If Git is not available, output a warning and skip validation:

`` [specify] Warning: Git repository not detected; skipped branch validation ``

Validation Rules

Get the current branch name:

git rev-parse --abbrev-ref HEAD

The branch name must match one of these patterns:

  1. Sequential: ^[0-9]{3,}- (e.g., 001-feature-name, 042-fix-bug, 1000-big-feature)
  2. Timestamp: ^[0-9]{8}-[0-9]{6}- (e.g., 20260319-143022-feature-name)

Execution

If on a feature branch (matches either pattern):

  • Output: ✓ On feature branch: <branch-name>
  • Check if the corresponding spec directory exists under specs/:

- For sequential branches, look for specs/<prefix>- where prefix matches the numeric portion - For timestamp branches, look for specs/<prefix>- where prefix matches the YYYYMMDD-HHMMSS portion

  • If spec directory exists: ✓ Spec directory found: <path>
  • If spec directory missing: ⚠ No spec directory found for prefix <prefix>

If NOT on a feature branch:

  • Output: ✗ Not on a feature branch. Current branch: <branch-name>
  • Output: Feature branches should be named like: 001-feature-name or 20260319-143022-feature-name

Graceful Degradation

If Git is not installed or the directory is not a Git repository:

  • Check the SPECIFY_FEATURE environment variable as a fallback
  • If set, validate that value against the naming patterns
  • If not set, skip validation with a warning