К основному содержанию
скилл CX Codex

speckit-git-feature — скилл для Claude Code

Скилл speckit-git-feature для Claude Code создаёт Git-ветку по описанию задачи внутри проекта Spec Kit и использует его конфигурацию.

MIT ★ 110 обновлён 2026-10-19

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add alfredoperez/speckit-companion --skill speckit-git-feature -a claude-code
Открыть на GitHub

Что делает speckit-git-feature

Скилл генерирует имя ветки по описанию задачи, определяет следующий номер или временную метку, и выполняет git checkout -b. Он читает стратегию нумерации из .specify/extensions/git/git-config.yml — может быть sequential или timestamp. Поддерживает шаблоны веток вроде {author}/{app}/{number}-{slug} для монорепозиториев, где каждый проект ведёт собственный счётчик.

Прежде чем создавать ветку, скилл проверяет наличие Git и то, что текущая директория — репозиторий. Если Git недоступен, выводит предупреждение и продолжает работу. Требует структуру .specify/ директории — ветка создаётся только; файлы spec создаёт отдельный воркфлоу /speckit-specify.

Какие задачи решает

  • Создавать feature-ветки с автоматической нумерацией
  • Синхронизировать имена веток с Spec Kit конфигурацией
  • Форматировать ветки для монорепозиториев с префиксом автора и приложения
  • Переключаться на новую ветку сразу после создания

Примеры запросов агенту

  • Создай ветку для добавления аутентификации через OAuth
  • Новая ветка с временной меткой для срочного исправления платежей
  • Создай feature-ветку для интеграции с API платформы

Как установить speckit-git-feature

1Через Skills CLI (Vercel)

npx skills add alfredoperez/speckit-companion --skill speckit-git-feature -a claude-code

2Вручную: положить файлы

~/.claude/skills/speckit-git-feature/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/speckit-git-feature/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Вопросы о speckit-git-feature

Как установить speckit-git-feature в Claude Code?

Выполни npx skills add alfredoperez/speckit-companion --skill speckit-git-feature -a claude-code, затем открой ~/.claude/skills/speckit-git-feature/SKILL.md для проверки.

Что делает speckit-git-feature?

Создаёт и переключается на новую Git-ветку с автоматическим номером или временной меткой. Имя ветки генерируется из описания задачи и может включать префиксы автора или приложения, если это указано в конфиге Spec Kit.

Какие требования к проекту?

Нужна структура Spec Kit с директорией .specify/ и Git-репозиторий. Стратегия нумерации ветвей читается из .specify/extensions/git/git-config.yml или значений по умолчанию (sequential).

Исходный текст

SKILL.md · MIT
---
name: speckit-git-feature
description: Create a feature branch with sequential or timestamp numbering
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 Feature Skill

# Create Feature Branch

Create and switch to a new git feature branch for the given specification. This command handles **branch creation only** — the spec directory and files are created by the core `/speckit-specify` workflow.

## User Input

```text
$ARGUMENTS
```

You **MUST** consider the user input before proceeding (if not empty).

## Environment Variable Override

If the user explicitly provided `GIT_BRANCH_NAME` (e.g., via environment variable, argument, or in their request), pass it through to the script by setting the `GIT_BRANCH_NAME` environment variable before invoking the script. When `GIT_BRANCH_NAME` is set:
- The script uses the exact value as the branch name, bypassing all prefix/suffix generation
- `--short-name`, `--number`, and `--timestamp` flags are ignored
- `FEATURE_NUM` is extracted when the final path segment starts with a numeric or timestamp feature marker (for example `042-name`, `feat/042-name`, or `jdoe/app/042-name`), otherwise set to the full branch name

## Prerequisites

- Verify Git is available by running `git rev-parse --is-inside-work-tree 2>/dev/null`
- If Git is not available, warn the user and skip branch creation

## Branch Numbering Mode

Determine the branch numbering strategy by checking configuration in this order:

1. Check `.specify/extensions/git/git-config.yml` for `branch_numbering` value
2. Check `.specify/init-options.json` for `feature_numbering` value (inherit from core)
3. Check `.specify/init-options.json` for `branch_numbering` value (deprecated, backward compatibility — will be removed in a future release)
4. Default to `sequential` if none of the above exist

## Branch Name Template

Check `.specify/extensions/git/git-config.yml` for an optional `branch_template` value. If it is empty or missing, use the default branch shape `{number}-{slug}`. If it is set, `{slug}` must not appear before `{number}`, its final path segment must start with `{number}-`, and the script expands these tokens:

- `{author}`: sanitized Git config author (`user.name`, falling back to the email local part)
- `{app}`: sanitized Spec Kit init directory name
- `{number}`: sequential number or timestamp
- `{slug}`: generated short branch slug

For monorepos, a template such as `{author}/{app}/{number}-{slug}` creates names like `jdoe/web/008-guided-tour` while preserving per-project feature numbering.

The script also accepts `branch_prefix` as a shorthand for simple namespaces; it expands to `<branch_prefix>/{number}-{slug}`.

## Execution

Generate a concise short name (2-4 words) for the branch:
- Analyze the feature description and extract the most meaningful keywords
- Use action-noun format when possible (e.g., "add-user-auth", "fix-payment-bug")
- Preserve technical terms and acronyms (OAuth2, API, JWT, etc.)

Run the appropriate script based on your platform:

- **Bash**: `.specify/extensions/git/scripts/bash/create-new-feature-branch.sh --json --short-name "<short-name>" "<feature description>"`
- **Bash (timestamp)**: `.specify/extensions/git/scripts/bash/create-new-feature-branch.sh --json --timestamp --short-name "<short-name>" "<feature description>"`
- **PowerShell**: `.specify/extensions/git/scripts/powershell/create-new-feature-branch.ps1 -Json -ShortName "<short-name>" "<feature description>"`
- **PowerShell (timestamp)**: `.specify/extensions/git/scripts/powershell/create-new-feature-branch.ps1 -Json -Timestamp -ShortName "<short-name>" "<feature description>"`

**IMPORTANT**:
- Do NOT pass `--number` — the script determines the correct next number automatically
- Always include the JSON flag (`--json` for Bash, `-Json` for PowerShell) so the output can be parsed reliably
- You must only ever run this script once per feature
- The JSON output will contain `BRANCH_NAME` and `FEATURE_NUM`
- Do not manually expand `branch_template`; the script reads the git extension config and applies it consistently

## Graceful Degradation

If Git is not installed or the current directory is not a Git repository:
- Branch creation is skipped with a warning: `[specify] Warning: Git repository not detected; skipped branch creation`
- The script still outputs `BRANCH_NAME` and `FEATURE_NUM` so the caller can reference them

## Output

The script outputs JSON with:
- `BRANCH_NAME`: The branch name (e.g., `003-user-auth`, `20260319-143022-user-auth`, or `jdoe/web/003-user-auth`)
- `FEATURE_NUM`: The numeric or timestamp prefix used

© spec-kit-core · MIT · alfredoperez/speckit-companion

Похожие скиллы

Все скиллы по теме «Git и GitHub» →
speckit-converge github-spec-kit Скилл speckit-converge сравнивает текущий код с требованиями в spec.md, plan.md и tasks.md, затем добавляет в tasks.md новые задачи для оставшейся работы. Работает в проектах со структурой spec-kit. CX Codex +1 1 300установок git-workflow ruvnet Скилл git-workflow для Claude Code помогает управлять ветками, разрешать конфликты и вести жизненный цикл PR. Он включается для сложных Git-операций и координации pull request. CX Codex +1 743установок github-workflow transilienceai Скилл github-workflow для Claude Code автоматизирует GitHub-операции: ветки, коммиты, пуши, pull requests, issues и code review. Выполняет запросы агента на коммит, пуш, создание PR и управление веткой. CX Codex +1 195установок worktree FlorianBruniaux Команда создаёт отдельную папку git worktree для работы над фичей или фиксом. Полезна, когда нужно параллельно вести несколько задач без конфликтов в основной ветке. CX Codex +1 ★ 6 529звёзд репо speckit-taskstoissues github-spec-kit Скилл speckit-taskstoissues превращает задачи из tasks.md в issues GitHub с учётом зависимостей. Скилл помечен как устаревший — есть замена в виде расширения. CX Codex +1 1 600установок clean-branches qdhenry Команда clean-branches для систематической очистки слитых и заброшенных веток в Git. Помогает держать репозиторий в порядке, удаляя ненужные ветки и синхронизируя локальное состояние с удалённым. CX Codex +1 ★ 1 357звёзд репо

Из того же набора83

Весь набор →
publish Команда publish проводит выпуск версии VS Code-расширения: проверяет релизные условия, помогает подготовить чейнджлог, обновить версию и отправить коммит с тегом. Для Codex файл команды устанавливают отдельно. CX Codex +1 ★ 110звёзд репо release-loop Команда release-loop для Claude Code и Codex проводит пакет изменений через исправления, QA и выпуск релиза. Перед публикацией она собирает отчёт и ждёт одобрения. CX Codex +1 ★ 110звёзд репо bench-wave Команда bench-wave запускает полный цикл бенчмарка для этапа оптимизации pipeline-diet в Speckit Companion и сохраняет метрики в сводную таблицу. Пригодится при замерах скорости и расхода токенов. CX Codex +1 ★ 110звёзд репо speckit.git.feature Команда speckit.git.feature создаёт и переключает на новую Git-ветку для функции из спецификации. Нумерацию и шаблон имени можно задать через конфигурацию проекта. CX Codex +1 ★ 110звёзд репо speckit.companion.living-move Команда speckit.companion.living-move переносит спецификации Speckit между общим каталогом capabilities и папками с кодом, одновременно обновляя реестр проекта. CX Codex +1 ★ 110звёзд репо publish-mod Команда publish-mod проводит релиз мода Claude Code через marketplace репозитория и готовит материалы для отправки в каталог Anthropic. CX Codex +1 ★ 110звёзд репо speckit.companion.mark-complete Команда speckit.companion.mark-complete для Claude Code помечает активную спеку завершённой через write-context.py. Закрывает спеку вручную без полного слияния. CX Codex +1 ★ 110звёзд репо speckit.constitution Промпт speckit.constitution создаёт или обновляет конституцию проекта в .specify/memory/constitution.md и синхронизирует связанные шаблоны спецификаций. CX Codex GP ChatGPT ★ 110звёзд репо

Спонсоры проекта

Компании, которые помогают держать аналитику открытой