create-branch · tartinerlabs — скилл для Claude Code: что делает и как установить
Создаёт ветки git с валидацией имени и автопривязкой к задачам GitHub или GitLab. Пригодится при старте работы над issue или фичей.
npx skills add tartinerlabs/skills --skill create-branch -a claude-codeЧто делает create-branch
Скилл автоматизирует создание веток через интерфейс агента. Сначала он проверяет адрес origin через команду git remote get-url origin. Если указан номер задачи на GitHub, вызывается gh issue develop <number> -c, что сразу связывает ветку с тикетом. Для GitLab номер добавляется прямо в имя вроде feature/123-description, чтобы привязать будущий мердж-реквест.
Перед созданием скилл определяет подходящий префикс, валидирует название и ищет дубликаты локально и на сервере. Базовой веткой берётся main, master или текущий HEAD. Если вы продолжаете работу поверх незамёрдженного PR, ветвление пойдёт от текущей ветки, создавая стек связанных изменений. В конце агент предлагает отправить ветку в репозиторий через git push -u origin <name>.
Для связи с задачами понадобятся установленные утилиты gh или glab. Без них скилл не сможет подключить ветку к тикету на удалённом хостинге.
Какие задачи решает
- проверить имя новой git-ветки на дубликаты и формат
- создать ветку на GitHub с привязкой к номеру задачи через
gh - сформировать имя ветки для GitLab с номером тикета
- ответвить задачу от незакрытого PR для создания цепочки изменений
Примеры запросов агенту
- Создай ветку для задачи 42 и свяжи её с GitHub issue
- Сделай ветку bugfix/login-error от текущего незамёрдженного PR
- Создай новую ветку для фичи профиля пользователя
Как установить create-branch
1Через Skills CLI (Vercel)
npx skills add tartinerlabs/skills --skill create-branch -a claude-code2Вручную: положить файлы
~/.claude/skills/create-branch/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/create-branch/
1Через Skills CLI (Vercel)
npx skills add tartinerlabs/skills --skill create-branch -a codex2Вручную: положить файлы
.agents/skills/create-branch/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add tartinerlabs/skills --skill create-branch -a cursor2Вручную: положить файлы
.cursor/skills/create-branch/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install tartinerlabs/skills create-branch2Вручную: положить файлы
.github/skills/create-branch/SKILL.md1Через Skills CLI (Vercel)
npx skills add tartinerlabs/skills --skill create-branch -a gemini-cli2Командой платформы
gemini skills install https://github.com/tartinerlabs/skills --path plugins/workflow/skills/create-branchВручную: положить файлы
.devin/skills/create-branch/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add tartinerlabs/skills --skill create-branch -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы о create-branch
Как установить create-branch в Claude Code?
Выполните npx skills add tartinerlabs/skills --skill create-branch -a claude-code. Конфигурация сохранится в ~/.claude/skills/create-branch/SKILL.md.
Что делает скилл create-branch?
Он проверяет название ветки, исключает совпадения с существующими именами и переключается на неё. При наличии номера задачи скилл связывает её с репозиторием через GitHub CLI или формат имени GitLab.
Какие инструменты нужны для работы скилла?
Требуется установленный git. Для автоматической привязки веток к задачам также нужны консольные клиенты gh для GitHub или glab для GitLab.
Исходный текст
SKILL.md · MIT
--- name: create-branch description: Use when creating a branch, starting work on an issue, or checking out a new feature branch. Validates branch naming and links to GitHub issues automatically. license: MIT allowed-tools: Read Bash(git:*) Bash(gh:*) Bash(glab:*) model: haiku effort: low compatibility: Requires git; issue-linking uses a GitHub (gh) or GitLab (glab) remote metadata: short-description: Validated branch names linked to issues. --- You create and checkout git branches with validation. ## Rules Overview | Rule | Impact | File | |------|--------|------| | Branch naming | HIGH | `rules/branch-naming.md` | | Prefix detection | MEDIUM | `rules/prefix-detection.md` | ## Workflow 1. If an issue number is provided, detect the remote host from `git remote get-url origin` (github.com → gh, gitlab.com → glab; default GitHub). On **GitHub**, use `gh issue develop <number> -c` to create a linked branch and skip to step 4. On **GitLab** (no direct equivalent), include the issue number in the branch name (e.g. `feature/123-description`) so the MR auto-links, then continue through steps 2–4 2. Auto-detect prefix from user input (see `rules/prefix-detection.md`), validate name (see `rules/branch-naming.md`), and check for duplicates locally and remotely 3. Create and checkout from `main` → `master` → current HEAD: `git checkout -b <name> <base>`. **Exception**: when the current branch has an open unmerged PR and the new work builds on it (the user says "on top of this" / "next part", or the change depends on unmerged work), base on the current branch instead — the diff stays scoped to the new layer, and on GitHub the resulting PRs link into a stack automatically 4. Offer remote push: `git push -u origin <name>`
© tartinerlabs · MIT · tartinerlabs/skills
Похожие скиллы
Все скиллы по теме «Git и GitHub» →Сначала — create-branch от других авторов.