Checkout Git Branch with Conventional Naming

VerifiedSafe

Creates and checks out a new git branch with conventional naming (type/description). Use it to start working on a feature, fix, or task while following naming conventions.

Sby Skills Guide Bot
DevelopmentBeginner
6/2/2026
Claude Code
#git#branch-management#naming-conventions#workflow

Recommended for

Automated summary

Creates and checks out a new Git branch with a conventional name based on the task description.

Strengths

  • Automatically generates branch names following clear conventions (e.g., feat/, fix/).
  • Checks repository status to avoid conflicts with uncommitted changes.
  • Guides the user in selecting the appropriate branch type.

Limitations

  • Requires an explicit task description or interaction to clarify.
  • Does not handle existing branch names or merge conflicts.
  • Depends on Git being installed in the environment.
When to use it

When you need to start a new task and create a structured branch following Git conventions.

When not to use it

If you are already working on an existing branch or if the project does not use branch naming conventions.

Security analysis

Safe
Quality score93/100

The skill only uses restricted Git commands (git checkout, git branch, git status) and AskUserQuestion. No destructive or unauthorized actions are possible.

No concerns found

How this analysis is made

Examples

Create feature branch
Create a branch for adding user authentication
Create fix branch
Start working on fixing the memory leak in the parser
Create docs branch
I need a branch to update the API documentation

name: checkout-branch description: Create and checkout a new git branch with conventional naming based on the task description. Use when the user asks to create a branch, start working on a feature/fix, or begin a new task. allowed-tools: Bash(git checkout:), Bash(git branch:), Bash(git status:*), AskUserQuestion model: haiku

Checkout Branch Skill

This skill helps you create and checkout a new git branch following conventional naming conventions.

Instructions

When the user asks to create a branch or start working on a task, follow these steps:

1. Understand the Task

If the user provides a clear task description, use it directly. If not, use the AskUserQuestion tool to ask:

  • What task are they working on?
  • What type of work is it? (feature, fix, chore, etc.)

2. Determine the Branch Type

Analyze the task description to determine the appropriate type:

  • feat: New features or enhancements

    • Keywords: "add", "create", "implement", "build", "new feature"
    • Examples: "add user authentication", "implement dark mode"
  • fix: Bug fixes

    • Keywords: "fix", "resolve", "bug", "issue", "patch"
    • Examples: "fix memory leak", "resolve login error"
  • chore: Maintenance, dependencies, tooling, configuration

    • Keywords: "update dependencies", "configure", "setup", "maintain"
    • Examples: "update npm packages", "configure eslint"
  • docs: Documentation changes

    • Keywords: "document", "readme", "docs", "documentation"
    • Examples: "update API docs", "add setup instructions"
  • refactor: Code restructuring without changing behavior

    • Keywords: "refactor", "restructure", "reorganize", "simplify"
    • Examples: "refactor auth logic", "simplify error handling"
  • test: Adding or updating tests

    • Keywords: "test", "testing", "unit test", "integration test"
    • Examples: "add unit tests", "update test coverage"
  • style: Code formatting and style changes

    • Keywords: "format", "style", "lint", "prettier"
    • Examples: "format components", "apply linting rules"
  • perf: Performance improvements

    • Keywords: "optimize", "performance", "speed up", "improve performance"
    • Examples: "optimize queries", "reduce bundle size"
  • ci: CI/CD pipeline changes

    • Keywords: "ci", "pipeline", "workflow", "github actions"
    • Examples: "add github actions", "update deploy workflow"
  • security: Security fixes and improvements

    • Keywords: "security", "vulnerability", "secure", "auth"
    • Examples: "fix xss vulnerability", "improve authentication"

3. Generate Branch Name

Convert the task description to a branch name following these rules:

  1. Lowercase: Convert all characters to lowercase
  2. Kebab-case: Replace spaces with hyphens
  3. Remove special characters: Keep only letters, numbers, and hyphens
  4. Trim: Remove leading/trailing hyphens
  5. Format: Use pattern <type>/<description>

Examples:

  • "Add user authentication" → feat/add-user-authentication
  • "Fix memory leak in parser" → fix/memory-leak-in-parser
  • "Update API Documentation!" → docs/update-api-documentation
  • "Refactor: error handling" → refactor/error-handling

4. Check Current Branch Status

Before creating the branch, check the current status:

git status

If there are uncommitted changes, warn the user and ask if they want to:

  • Commit the changes first
  • Stash the changes
  • Continue anyway (changes will carry over to the new branch)

5. Create and Checkout the Branch

Create and checkout the new branch:

git checkout -b <branch-name>

6. Confirm Success

After creating the branch:

  1. Verify with git branch or git status
  2. Inform the user of the branch name
  3. Confirm they're ready to start working

Best Practices

  • Be descriptive: Branch names should clearly indicate the work being done
  • Be concise: Keep names under 50 characters when possible
  • Consistent format: Always use <type>/<description> pattern
  • Check for conflicts: Ensure branch name doesn't already exist
  • Clean branches: Remind users to delete branches after merging

Examples

Example 1: User provides clear description

User: "Create a branch to add user authentication"
Assistant: I'll create a new branch for adding user authentication.
Command: git checkout -b feat/add-user-authentication
Output: Switched to a new branch 'feat/add-user-authentication'
Response: "Created and checked out branch 'feat/add-user-authentication'. You're ready to start working on user authentication!"

Example 2: User needs clarification

User: "Create a new branch"
Assistant: [Uses AskUserQuestion to ask what task they're working on]
User: "I need to fix a bug in the login form"
Assistant: I'll create a new branch for fixing the login form bug.
Command: git checkout -b fix/login-form-bug
Output: Switched to a new branch 'fix/login-form-bug'
Response: "Created and checked out branch 'fix/login-form-bug'. Ready to fix the bug!"

Example 3: Uncommitted changes

User: "Create a branch to refactor the database layer"
Assistant: [Runs git status and sees uncommitted changes]
Response: "You have uncommitted changes. Would you like to commit them first, stash them, or continue anyway?"
User: "Commit them first"
Assistant: [Uses commit skill to commit changes, then creates branch]
Command: git checkout -b refactor/database-layer
Response: "Committed changes and created branch 'refactor/database-layer'."

Error Handling

  • Branch already exists: Inform user and ask if they want to checkout the existing branch or choose a different name
  • Not a git repository: Inform user they need to initialize a git repository first
  • Uncommitted changes: Warn and provide options as described above
  • Invalid characters: Clean the branch name by removing invalid characters

After Creating the Branch

Optionally suggest next steps:

  • "Would you like me to help you implement [task]?"
  • "Should I create a commit plan for this work?"
  • "Need help getting started with this task?"

From the file to a first result

The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.

View the source and supporting files

This download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.

1. Download the file

Download SKILL.md

From the root of a test project, save the file as .skill-downloads/checkout-git-branch-with-conventional-naming-mmbizkox/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.

Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.

mkdir -p '.skill-downloads/checkout-git-branch-with-conventional-naming-mmbizkox' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/checkout-git-branch-with-conventional-naming-mmbizkox/download' --output '.skill-downloads/checkout-git-branch-with-conventional-naming-mmbizkox/SKILL.md.part' && mv '.skill-downloads/checkout-git-branch-with-conventional-naming-mmbizkox/SKILL.md.part' '.skill-downloads/checkout-git-branch-with-conventional-naming-mmbizkox/SKILL.md'

2. Check prerequisites

Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.

Tools declared by the author (check availability in your agent): Bash(git checkout:*), Bash(git branch:*), Bash(git status:*), AskUserQuestion

No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.

The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.

3. Load the skill

After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.

Claude Code
test -f '.skill-downloads/checkout-git-branch-with-conventional-naming-mmbizkox/SKILL.md' && test -s '.skill-downloads/checkout-git-branch-with-conventional-naming-mmbizkox/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/checkout-branch' && cp -R '.skill-downloads/checkout-git-branch-with-conventional-naming-mmbizkox' '.claude/skills/checkout-branch'

OpenSkills

OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.

Official OpenSkills installation
openskills install './.skill-downloads/checkout-git-branch-with-conventional-naming-mmbizkox'

openskills read 'checkout-git-branch-with-conventional-naming-mmbizkox'

Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.

For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.

openskills sync

Manual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.

4. Try a first task

Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:

Read .skill-downloads/checkout-git-branch-with-conventional-naming-mmbizkox/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.

Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.

Related skills