git-branch
Skill2 starsChanged 52 days agoMITView on GitHub
Create a git branch with the prefix convention (`feature/`, `fix/`, `chore/`, `refactor/`, `env/`) required by GitHub auto-PR workflows. Use when user wants to start a branch, says "new branch", or asks to begin a feature.
6 other projects use a version of this.
Adopted by
Most recently taken up by
- microsoft/devsquad-copilottheir own version, first seen Oct 16, 2026
- my-chiefmind/ai-maestrotheir own version, first seen Oct 13, 2026
- cognis-digital/skillsmiththeir own version, first seen Oct 11, 2026
- mir-am/skills-agents-ai-codingtheir own version, first seen Oct 1, 2026
- puku0x/agent-skills-testtheir own version, first seen Apr 19, 2026
- CarpeWu/claude-git-skillstheir own version, first seen Jan 27, 2026
Other versions6 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 6
- microsoft/devsquad-copilot★ 50same name
- my-chiefmind/ai-maestro★ 6same name
- mir-am/skills-agents-ai-coding★ 2same name
- puku0x/agent-skills-test★ 1same name
- CarpeWu/claude-git-skills★ 0same name
- cognis-digital/skillsmith★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository32 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- ask-zslSkill
- codebase-designSkill
- code-reviewSkill
- commit-push-prSkill
- commitSkill
- decision-mappingSkill
- diagnoseSkill
- domain-modelingSkill
- grill-with-docsSkill
- human-itlSkill
- improve-codebase-architectureSkill
- prototypeSkill
- setup-zsl-superpowersSkill
- tdd-parallelSkill
- tddSkill
- teach-me-the-codebaseSkill
- to-issuesSkill
- to-prdSkill
- triageSkill
- verify-coverageSkill
- edit-articleSkill
- setup-pre-commitSkill
- steampipeSkill
- grillingSkill
- grill-meSkill
- handoffSkill
- timesheetSkill
- writing-great-skillsSkill
- afk-fanoutSkill
- afk-workerSkill
- morning-reviewSkill
The file
We split this skill into the rules it gives an agent
8 rules. 0 are common, 6 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 4 edited versions we read keep these.
6
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Create a new git branch with a name that follows the project's required prefix convention so the auto-PR workflow picks it up.
- Very specific: line 25
If the user already provided a valid prefix (e.g.
- Distinctive: line 32
Extract a GitHub issue ID: if the prompt references one.
- Very specific: line 47
Ask: "Create branch <name>?
- Distinctive: line 56
NEVER create a branch without the required prefix
- Distinctive: line 57
NEVER create a branch without user confirmation
- Distinctive: line 58
If the user is already on a non-main branch with uncommitted changes, ask whether to carry the changes over (default) or stash them first
- Distinctive: line 59
If a branch with that name already exists, tell the user and suggest an alternative
“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Create Git Branch
Create a new git branch with a name that follows the project's required prefix convention so the auto-PR workflow picks it up.
Required prefixes
Branches MUST start with one of these prefixes followed by /:
feature/— new functionalityfix/— bug fixchore/— maintenance, tooling, non-functional changesrefactor/— internal restructuring without behavior changeenv/— environment-specific work (e.g.env/seb-test)
Branch names without one of these prefixes will NOT trigger the auto-PR workflow (.github/workflows/auto-pr.yml).
Process
- Parse the user's prompt (the argument after
/git-branch):- If the user already provided a valid prefix (e.g.
fix/logout-button), use it verbatim. - Otherwise, infer the most appropriate prefix from the description and the current working tree context:
- New feature or capability →
feature/ - Bug fix or broken behavior →
fix/ - Docs, dependencies, cleanup, deletions of unused code →
chore/ - Rename, restructure, extract, inline (no behavior change) →
refactor/ - Per-developer sandbox branches →
env/
- New feature or capability →
- Extract a GitHub issue ID if the prompt references one. Match any of:
- A full issue URL:
https://github.com/<org>/<repo>/issues/<N> - A shorthand reference:
#<N>orissue <N>/issue #<N>/gh-<N>For the URL form, fetch the issue title withgh issue view <N> --repo <org>/<repo> --json title -q .titleand use it (slugified) as the description if the user didn't also provide their own wording. For shorthand without a repo, assume the current working directory's repo.
- A full issue URL:
- If the user already provided a valid prefix (e.g.
- Build a slug from the description:
- Lowercase
- Replace spaces and non-alphanumerics with hyphens
- Collapse repeat hyphens
- Trim leading/trailing hyphens
- Total branch name must not exceed 40 characters. Shorten the description until it fits.
- If an issue ID was extracted, prepend it to the slug so the final branch name is
<prefix>/<N>-<slug>(e.g.feature/22-broker-s3-persistence). The issue number goes immediately after the prefix's/, before the descriptive slug.
- Present the proposed branch name to the user and ask for confirmation:
- Show the prefix you chose and why (one sentence)
- Ask: "Create branch
<name>? (y/n)"
- On confirmation, run:
git checkout -b <branch-name>
Important
- NEVER create a branch without the required prefix
- NEVER create a branch without user confirmation
- If the user is already on a non-main branch with uncommitted changes, ask whether to carry the changes over (default) or stash them first
- If a branch with that name already exists, tell the user and suggest an alternative
Examples
<example>
User: `/git-branch remove the broken logout button`
Assistant: Proposes `fix/remove-broken-logout-button` — "fix" because it's removing broken behavior. Asks for confirmation, then runs `git checkout -b fix/remove-broken-logout-button`.
</example><example>
User: `/git-branch chore/update-readme`
Assistant: Uses the provided name verbatim (already has valid prefix). Asks for confirmation, then runs `git checkout -b chore/update-readme`.
</example><example>
User: `/git-branch add cognito group support`
Assistant: Proposes `feature/add-cognito-group-support` — "feature" because it's new functionality.
</example><example>
User: `/git-branch fix https://github.com/Thundergrid149/tg-ops-portal/issues/22`
Assistant: Extracts issue number `22` from the URL, fetches the issue title via `gh issue view 22 --repo Thundergrid149/tg-ops-portal --json title -q .title` (e.g. "Get CPMS broker working in preview environments"), picks `feature/` based on the issue content, and proposes `feature/22-broker-working-in-preview`. Asks for confirmation, then creates the branch.
</example><example>
User: `/git-branch #14 remove logout button`
Assistant: Extracts issue number `14` from the `#14` shorthand, keeps the user's own description, and proposes `fix/14-remove-logout-button`.
</example>Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

