speckit-git-validate — скилл для Claude Code: установка
Скилл speckit-git-validate проверяет имя текущей Git-ветки и ищет связанную папку спецификации в specs/. Нужен в проектах со структурой spec-kit.
MIT ★ 110 обновлён 2026-10-19
npx skills add alfredoperez/speckit-companion --skill speckit-git-validate -a claude-codeЧто делает speckit-git-validate
Скилл проверяет, находится ли проект в Git-репозитории, получает имя текущей ветки и сверяет её последний сегмент с двумя правилами. Подходят последовательные имена вроде 001-feature-name и временные имена формата 20260319-143022-feature-name. Для веток с пространством имён проверяется именно последний сегмент.
После успешной проверки скилл ищет в specs/ папку с соответствующим числовым или временным префиксом. Он сообщает, найдена ли спецификация, а для обычной ветки показывает ожидаемый формат имени. В проекте должна быть директория .specify/. Без Git скилл использует SPECIFY_FEATURE как запасное значение, а без него пропускает проверку с предупреждением.
Какие задачи решает
- проверить имя текущей Git-ветки
- найти ветки вне соглашения spec-kit
- сопоставить ветку с папкой в
specs/ - использовать
SPECIFY_FEATUREбез Git
Примеры запросов агенту
- Проверь текущую ветку по правилам
speckit-git-validateи найди связанную спецификацию. - Определи, соответствует ли имя ветки шаблону
001-feature-nameили20260319-143022-feature-name. - Проверь, есть ли в
specs/папка для префикса текущей feature-ветки.
Как установить speckit-git-validate
1Через Skills CLI (Vercel)
npx skills add alfredoperez/speckit-companion --skill speckit-git-validate -a claude-code2Вручную: положить файлы
~/.claude/skills/speckit-git-validate/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/speckit-git-validate/
1Через Skills CLI (Vercel)
npx skills add alfredoperez/speckit-companion --skill speckit-git-validate -a codex2Вручную: положить файлы
.agents/skills/speckit-git-validate/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add alfredoperez/speckit-companion --skill speckit-git-validate -a cursor2Вручную: положить файлы
.cursor/skills/speckit-git-validate/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install alfredoperez/speckit-companion .claude/skills/speckit-git-validate2Вручную: положить файлы
.github/skills/speckit-git-validate/SKILL.md1Через Skills CLI (Vercel)
npx skills add alfredoperez/speckit-companion --skill speckit-git-validate -a gemini-cli2Командой платформы
gemini skills install https://github.com/alfredoperez/speckit-companion --path .claude/skills/speckit-git-validateВручную: положить файлы
.devin/skills/speckit-git-validate/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Claude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о speckit-git-validate
Как установить speckit-git-validate в Claude Code?
Выполните npx skills add alfredoperez/speckit-companion --skill speckit-git-validate -a claude-code, затем проверьте файл ~/.claude/skills/speckit-git-validate/SKILL.md.
Что делает speckit-git-validate?
Скилл проверяет имя текущей Git-ветки, определяет соответствующий префикс и ищет папку спецификации в specs/. Он также сообщает, если ветка не соответствует feature-шаблону.
Что нужно для работы speckit-git-validate?
Проект должен иметь структуру spec-kit с директорией .specify/. Если Git недоступен, скилл может проверить значение SPECIFY_FEATURE.
Исходный текст
SKILL.md · MIT
---
name: speckit-git-validate
description: Validate current branch follows feature branch naming conventions
compatibility: Requires spec-kit project structure with .specify/ directory
metadata:
author: spec-kit-core
source: extension:git
user-invocable: true
disable-model-invocation: false
---
# Git Validate Skill
# 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:
```bash
git rev-parse --abbrev-ref HEAD
```
The branch name's final path segment must start with one of these feature markers:
1. **Sequential**: `[0-9]{3,}-` (e.g., `001-feature-name`, `042-fix-bug`, `1000-big-feature`, `jdoe/web/008-guided-tour`)
2. **Timestamp**: `[0-9]{8}-[0-9]{6}-` (e.g., `20260319-143022-feature-name`, `jdoe/web/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, regardless of branch namespace prefixes
- For timestamp branches, look for `specs/<prefix>-*` where prefix matches the `YYYYMMDD-HHMMSS` portion, regardless of branch namespace prefixes
- 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, 20260319-143022-feature-name, or <namespace>/001-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
© spec-kit-core · MIT · alfredoperez/speckit-companion