Use when creating a branch, starting work on an issue, checking out a new feature branch, or about to commit or open a PR while on main or the default branch. Validates branch naming and links to GitHub issues automatically.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Create Branch?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/tartinerlabs-create-branch)
---
name: create-branch
description: Use when creating a branch, starting work on an issue, checking out a new feature branch, or about to commit or open a PR while on main or the default branch. Validates branch naming and links to GitHub issues automatically.
license: MIT
allowed-tools: Read Bash(git remote get-url *) Bash(git branch --show-current) Bash(git branch --list *) Bash(git ls-remote *) Bash(git rev-parse *) Bash(git symbolic-ref *) Bash(git checkout -b *) Bash(gh issue list *) Bash(gh issue view *) Bash(gh issue develop *) Bash(gh pr list *) Bash(gh pr view *) Bash(glab issue list *) Bash(glab issue view *) Bash(glab mr list *)
compatibility: Requires git; issue-linking uses a GitHub (gh) or GitLab (glab) remote
metadata:
short-description: Validated branch names linked to issues.
title: Start work on an issue
goal: ship-code-safely
audience: developers
---
You create and checkout git branches with validation.
## Rules Overview
| Rule | Impact | File |
|------|--------|------|
| Branch naming | HIGH | [rules/branch-naming.md](rules/branch-naming.md) |
| Prefix detection | MEDIUM | [rules/prefix-detection.md](rules/prefix-detection.md) |
## Workflow
1. **Find the issue** so the branch is linked whenever one exists. Detect the forge from the remote (`git remote get-url origin`) and load **only** the matching guide: [references/github.md](references/github.md) for a `github.com` remote (the default), [references/gitlab.md](references/gitlab.md) for GitLab
- Use an issue the user gave or the conversation names (`#123`, an issue URL, "fixes …")
- Otherwise search open issues for the work's key terms, using the guide's search command. Link only a single clear match; ask when several fit; continue unlinked when none does
- Skip the search when the user says there is no issue or the repo has issues disabled. Never create an issue here — that is the `github-issues` skill's job
2. Auto-detect prefix from user input (see [rules/prefix-detection.md](rules/prefix-detection.md)), validate name (see [rules/branch-naming.md](rules/branch-naming.md)), and check for duplicates locally and remotely. Follow the guide where the forge needs the issue number in the name to link it
3. Pick the base: `main` → `master` → current HEAD. **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. **Moving work off a base branch** (called from `commit` or `create-pr` while on it): base on the current HEAD, so commits not yet pushed to the remote come along; uncommitted changes carry over on checkout either way
4. Create and checkout. When the branch has an issue and the guide gives a command that creates the branch linked to it, use that; otherwise `git checkout -b <name> <base>`
5. Offer remote push: `git push -u origin <name>`