All skills
getsentry avatar

/create-branch

@884f073 official
by Sentrygetsentry/skills1k stars
53

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.

Use this Skill: https://skilld.dev/gh/getsentry/skills/create-branch

This session only. Nothing lands on disk.

SKILL.md

≈58 tokens always: the name and description. ≈554 when used: this file.

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

Source: SKILL.md on GitHub

No alerts16d5 checks · Risk SAFE
  • Gen Agent Trust Hub16d

    The skill automates the creation of git branches according to Sentry naming conventions. It uses standard local git commands to determine the current repository state and generate appropriate branch names. No malicious activities or security risks were identified.

  • Socket16d

    No alerts

  • Snyk16d

    Risk: LOW · No issues

  • Runlayer7mo

    1 file scanned · No issues

  • ZeroLeaks5mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at 884f073. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated 5 months ago
argument-hint
[optional description of the work]
  • Git/VCS
  • branch
  • sentry
  • naming-conventions
  • workflow
  • automation

README badge

README badge for getsentry/skills/create-branch

Creates a git branch using Sentry's naming convention (type/kebab-case-description), deriving the description from uncommitted changes or user input and automatically detecting the base branch. Handles branch collisions by appending numeric suffixes and skips interactive prompts unless the user requests manual naming.

Generated from the current SKILL.md.

Does this skill automatically detect the work type, or do I need to specify it?
The skill automatically classifies the branch type (feat, fix, ref, chore, etc.) based on the work description and local changes. You only need to provide an optional description; the type classification is inferred.
What happens if I'm on a non-default branch when I run this skill?
The skill branches from your current branch instead of switching to the default branch first, unless you explicitly ask it to.
Does this skill follow a specific naming convention?
Yes, it creates branches in the format `<type>/<short-description>` following Sentry's naming standards, with kebab-case descriptions and automatic collision avoidance.

Generated from the current SKILL.md. These answers refresh after source changes.