create-branch — скилл для Claude Code: ветки по конвенции Sentry
Создаёт git-ветку с именем вида feat/... по правилам Sentry. Пригодится, когда начинаешь работу и не хочешь придумывать имя вручную.
npx skills add getsentry/skills --skill create-branch -a claude-codeЧто делает create-branch
Скилл разбирает, над чем ты работаешь, и сам собирает имя ветки. Если передать описание аргументом, берётся оно. Если нет — агент смотрит git diff, git diff --cached и git status --short, вытаскивает из изменений короткую суть. Когда правок нет, подставляется что-то вроде repo-maintenance или work-in-progress.
Дальше тип ветки выбирается по таблице: feat для новой функциональности, fix для починки, ref для перестройки структуры, chore для обслуживания. Всего в списке двенадцать типов, включая docs, test, ci и perf. Имя получается в формате <type>/<short-description>, описание — kebab-case, латиницей, обычно три-шесть слов.
Базу скилл тоже выбирает молча: смотрит текущую ветку, remote и его HEAD, при неудаче откатывается к main, затем к master. На detached HEAD ветка уходит от текущего коммита. Если имя занято локально или на remote, дописывается -2, -3 и так далее. Работает без вопросов к тебе — это повод проверить итоговое имя перед пушем, потому что подтверждения скилл не спрашивает. Переключение на дефолтную ветку происходит только по явной просьбе.
Какие задачи решает
- создать ветку с осмысленным именем без ручного ввода
- определить тип изменения по диффу
- выбрать правильную базовую ветку вместо текущей
- обойти коллизию имени с уже существующей веткой
- начать работу на дефолтной ветке и не забыть уйти с неё
Примеры запросов агенту
- создай ветку
- create-branch добавь ретраи в клиент API
- заведи новую ветку под починку пагинации
Как установить create-branch
1Через Skills CLI (Vercel)
npx skills add getsentry/skills --skill create-branch -a claude-code2Вручную: положить файлы
~/.claude/skills/create-branch/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/create-branch/
1Через Skills CLI (Vercel)
npx skills add getsentry/skills --skill create-branch -a codex2Вручную: положить файлы
.agents/skills/create-branch/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add getsentry/skills --skill create-branch -a cursor2Вручную: положить файлы
.cursor/skills/create-branch/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install getsentry/skills create-branch2Вручную: положить файлы
.github/skills/create-branch/SKILL.md1Через Skills CLI (Vercel)
npx skills add getsentry/skills --skill create-branch -a gemini-cli2Командой платформы
gemini skills install https://github.com/getsentry/skills --path skills/create-branchВручную: положить файлы
.devin/skills/create-branch/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add getsentry/skills --skill create-branch -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о create-branch
Как установить create-branch в Claude?
Выполни npx skills add getsentry/skills --skill create-branch -a claude-code. Файл скилла появится по пути ~/.claude/skills/create-branch/SKILL.md.
Что делает create-branch?
Создаёт git-ветку по конвенции Sentry. Тип и короткое описание агент выводит из аргумента или из текущих изменений в репозитории.
Нужно ли подтверждать имя ветки?
Нет. Скилл работает неинтерактивно и не останавливается на подтверждение, если ты сам не попросишь выбрать имя вручную.
Исходный текст
SKILL.md · Apache-2.0
---
name: create-branch
description: Create a git branch following Sentry naming conventions. Use when asked to "create a branch", "new branch", "start a branch", "make a branch", "switch to a new branch", or when starting new work on the default branch.
argument-hint: '[optional description of the work]'
---
# Create Branch
Create a git branch following Sentry naming conventions.
Keep this workflow non-interactive unless the user explicitly asks to choose the name manually.
## Workflow
1. Resolve the work description:
- If `$ARGUMENTS` is present, use it
- Otherwise inspect:
```bash
git diff
git diff --cached
git status --short
```
- If there are local changes, derive a short description from the diff
- If there are no local changes, use a generic description like `repo-maintenance`, `tooling-update`, or `work-in-progress`
2. Classify the branch type:
| Type | Use when |
|------|----------|
| `feat` | New functionality |
| `fix` | Broken behavior now works |
| `ref` | Behavior stays the same, structure changes |
| `chore` | Maintenance of existing tooling/config |
| `perf` | Same behavior, faster |
| `style` | Visual or formatting only |
| `docs` | Documentation only |
| `test` | Tests only |
| `ci` | CI/CD config |
| `build` | Build system |
| `meta` | Repo metadata |
| `license` | License changes |
When unsure: use `feat` for new things, `ref` for restructuring, `chore` for maintenance.
3. Generate `<type>/<short-description>`.
Keep `<short-description>` kebab-case, ASCII-only, and ideally 3 to 6 words.
4. Choose the base without prompting:
```bash
git branch --show-current
git remote | grep -qx origin && echo origin || git remote | head -1
git symbolic-ref refs/remotes/<remote>/HEAD 2>/dev/null | sed 's|refs/remotes/<remote>/||' | tr -d '[:space:]'
```
- If default branch detection fails, fall back to `main`, then `master`, then the current branch
- If on a detached HEAD, branch from the current commit
- If already on a non-default branch, branch from the current branch
- Only switch to the default branch when the user explicitly asks
5. Avoid collisions by appending `-2`, `-3`, and so on until the name is unused locally and remotely.
6. Create the branch:
```bash
git checkout -b <branch-name>
```
Report the final branch name, but do not stop for confirmation.
## References
- [Sentry Branch Naming](https://develop.sentry.dev/sdk/getting-started/standards/code-submission/#branch-naming)
© getsentry · Apache-2.0 · getsentry/skills