Search

PythonReactSEOPDF
GitHub Skill

git-branch

Generates and validates conventional branch names. Use when naming a new branch, renaming an existing branch, or asking "what should I name this branch".

erclx☆ 1 Repository stars0 Repository forks

Installation

Follow the repository instructions for this skill and your agent. Review the files and dependencies before adding it to your workflow.

View source ↗Guides

Skill instructions

Git Branch

Before generating a branch name, read:

  • standards/branch.md — format, types, length limit, and constraints

Follow it exactly.

Context

Run scripts/context.sh to gather git context before generating a branch name.

Guards

  • If already on main or master, stop: ❌ Cannot rename a protected branch.
  • If branch name already follows conventions, stop: ✅ Branch name already follows conventions.
  • If no commits and no args provided, stop: ❌ No commits or description to derive a branch name from.

Response Format

Preview
  • Current: <current_branch>
  • Suggested: <suggested_name>
  • Length: /50
  • Status: <LOCAL_ONLY | EXISTS on remote>
  • Analysis:

If EXISTS on remote, warn and stop:

⚠️ Branch exists on remote. Rename manually via GitHub UI or gh CLI to avoid breaking open PRs.
Final command

Only output if LOCAL_ONLY:

git branch -m <current> <suggested>

Examples

Read the usage examples in the source repository.

View source ↗

Source history

Indexed on
2026-03-11
Index updated
2026-03-11
Branch
main

Index and sync dates describe this directory. View the source repository for code history.

GitHub ↗

chat Comments (0)

chat_bubble_outline

No comments yet. Be the first to share your thoughts!