Generated banner for Create Branch
Generated logo for Create Branch

Create Branch

SentryOfficialPublished by Sentry

  • Skill
  • Workflow
  • Software development
  • Apache-2.0
  • No issues found

From the author

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.
— the description by Sentry

AutoGineer summary

Written by AutoGineer from the skill’s own files, not by the author

This skill streamlines the process of creating new Git branches by automatically generating names based on Sentry's established conventions. It analyzes the current state of the repository, including pending changes or existing diffs, to determine an appropriate branch type and descriptive name. The workflow handles base branch detection and collision avoidance automatically, ensuring a consistent and organized development environment without requiring manual input.

What it does

  • Analyzes local changes or diffs to suggest a relevant branch description.
  • Classifies branches into standard types like feat, fix, ref, or chore.
  • Generates kebab-case branch names following specific naming standards.
  • Automatically detects the appropriate base branch for the new work.
  • Prevents naming collisions by appending numeric suffixes if necessary.
  • Executes the branch creation command directly.

When to use it

  • When starting new development work on a repository.
  • When you need to ensure branch names adhere to team standards.
  • When you want to quickly create a branch based on current local changes.
  • When you need to perform maintenance or documentation updates.

Advantages

  • Ensures consistent branch naming across the project.
  • Reduces manual effort by inferring context from local changes.
  • Handles complex base branch detection automatically.
  • Prevents accidental overwrites or naming conflicts.

Usage examples

“Create a branch for the new login feature.”
The agent creates a branch named feat/new-login-feature based on the current repository state.
“Start a branch for these changes.”
The agent inspects the current diff, determines the appropriate type, and creates a branch like chore/update-config-files.

Install

  1. Download the skill as a ZIP:

    https://mp-staging.autogineer.com/agent-skills/getsentry/create-branch/download
  2. Unzip it into the cross-client skills folder of your project:

    mkdir -p .agents/skills && unzip create-branch.zip -d .agents/skills

Documentation by Sentry

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:

      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:

TypeUse when
featNew functionality
fixBroken behavior now works
refBehavior stays the same, structure changes
choreMaintenance of existing tooling/config
perfSame behavior, faster
styleVisual or formatting only
docsDocumentation only
testTests only
ciCI/CD config
buildBuild system
metaRepo metadata
licenseLicense changes

When unsure: use feat for new things, ref for restructuring, chore for maintenance.

  1. Generate <type>/<short-description>. Keep <short-description> kebab-case, ASCII-only, and ideally 3 to 6 words.

  2. 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, 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

  3. Avoid collisions by appending -2, -3, and so on until the name is unused locally and remotely.

  4. Create the branch:

    git checkout -b <branch-name>

    Report the final branch name, but do not stop for confirmation.

References

Files

Requirements and compatibility

Written for: Claude Code

Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta

“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.

Needs: Claude Code frontmatter, Needs a command-line tool

Security

No issues found by our static scan· No issues found

A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.

Attribution and licence

Published by
Sentry
Publisher
Sentry (Official)
Source
getsentry/skills · skills/create-branch · commit e94f222
Licence
Apache License 2.0 (redistribution allowed)
  • LICENSE (added by AutoGineer from LICENSE)
  • ATTRIBUTION.md (written by AutoGineer)
Synced

AutoGineer is not affiliated with or endorsed by Sentry.

Download ZIP

The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download create-branch.zip