Create Branch skill for Claude
Create a git branch following Sentry naming conventions.
When Claude uses it
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.
Create Branch SKILL.md
The full skill file from getsentry/skills (Apache-2.0).
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
-
Resolve the work description:
- If
$ARGUMENTSis present, use it - Otherwise inspect:
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, orwork-in-progress
- If
-
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.
-
Generate
<type>/<short-description>. Keep<short-description>kebab-case, ASCII-only, and ideally 3 to 6 words. -
Choose the base without prompting:
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, thenmaster, 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
- If default branch detection fails, fall back to
-
Avoid collisions by appending
-2,-3, and so on until the name is unused locally and remotely. -
Create the branch:
git checkout -b <branch-name>Report the final branch name, but do not stop for confirmation.
References
How to install Create Branch
Claude Code
Copy the skill into your personal skills folder (or into .claude/skills/ inside a project):
npx degit getsentry/skills/skills/create-branch#main ~/.claude/skills/create-branchCodex
npx degit getsentry/skills/skills/create-branch#main ~/.codex/skills/create-branchClaude.ai and Claude Desktop
Download the skill folder from GitHub, zip it, and upload it under Settings → Capabilities → Skills.
Frequently asked questions
+What does the Create Branch skill do?
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.
+How do I install Create Branch in Claude Code?
Copy the skill folder into ~/.claude/skills/create-branch, for example with "npx degit getsentry/skills/skills/create-branch#main ~/.claude/skills/create-branch". Claude Code loads it automatically and uses it when a task matches.
+Does Create Branch work with ChatGPT or Codex?
Yes. Create Branch uses the open SKILL.md format. In Codex, put the folder in ~/.codex/skills/create-branch. In Claude.ai, zip the folder and upload it under Settings → Capabilities → Skills.
+Is Create Branch free?
Create Branch is published on GitHub by getsentry under the Apache-2.0 license, which allows free use.