Catalog
getsentry/create-branch

getsentry

create-branch

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.

global
New~609
v1.0Saved Jul 11, 2026

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:

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.

  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

Files1
1 files · 10.5 KB

Select a file to preview

Overall Score

84/100

Grade

B

Good

Safety

85

Quality

82

Clarity

87

Completeness

79

Summary

A git branch creation skill that automates branch naming and initialization following Sentry's internal conventions. The skill inspects local changes, classifies work type (feat/fix/ref/chore/perf/style/docs/test/ci/build/meta/license), generates kebab-case branch names, and creates branches without interactive prompts. It detects and avoids naming collisions by appending numeric suffixes.

Detected Capabilities

git status readinggit diff analysisgit branch creationshell command executionlocal repository inspectionremote branch detection

Trigger Keywords

Phrases that MCP clients use to match this skill to user intent.

create git branchstart feature branchnew branch with namingautomatic branch namingsentry branch conventions

Risk Signals

INFO

Shell pipe operations (git symbolic-ref | sed) for branch detection

Workflow step 4
INFO

Dynamic branch naming based on diff inspection

Workflow steps 1-2
INFO

git checkout with user-derived branch name

Workflow step 6

Referenced Domains

External domains referenced in skill content, detected by static analysis.

develop.sentry.devwww.apache.org

Use Cases

  • Start feature development with consistent branch naming
  • Create fix branches automatically for bug corrections
  • Generate refactor branches from staged changes
  • Maintain repo organization through typed branch names
  • Avoid branch name collisions with auto-incrementing suffixes

Quality Notes

  • Clear, prescriptive workflow with explicit steps for resolving branch name from arguments or diff analysis
  • Comprehensive branch type classification table with decision guidance
  • Robust fallback logic for default branch detection (main → master → current branch)
  • Non-interactive design respects automation intent; user can still override via arguments
  • Well-documented collision avoidance mechanism using numeric suffixes
  • References official Sentry naming conventions with external link
  • Edge cases clearly addressed: detached HEAD, non-default branch, missing remote
  • Expected behavior documented: does not prompt for confirmation after branch creation
Model: claude-haiku-4-5-20251001Analyzed: Jul 11, 2026

Reviews

Add this skill to your library to leave a review.

No reviews yet

Be the first to share your experience.

Add getsentry/create-branch to your library

Command Palette

Search for a command to run...