new-branch
Skill6 starsChanged 3 months agoMITView on GitHub
Create a strategy-compliant git branch. TRIGGER when the user says "create a branch for X", "start a feature branch", "new fix branch", "cut a release branch", "start a hotfix", "branch for bug in Y", "make a branch named X", "/nyann:branch". DISAMBIGUATION: if the user mentions BOTH branch creation AND committing in the same message (e.g. "branch and commit", "start a branch and commit this"), this skill wins — create the branch first, then suggest `/nyann:commit` (or the commit skill) as the follow-up. Do NOT trigger on informational questions about branches ("what branch am I on?") or on general git-history questions.
2 other projects use a version of this.
Adopted by
Most recently taken up by
- EverMind-AI/EverOStheir own version, first seen Jul 29, 2026
- Surething-io/cockpittheir own version, first seen Mar 25, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- EverMind-AI/EverOS★ 13ksame name
- Surething-io/cockpit★ 40same 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 repository41 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- add-team-sourceSkill
- bootstrap-projectSkill
- check-prereqsSkill
- cleanup-branchesSkill
- commitSkill
- diagnoseSkill
- diff-profileSkill
- doctorSkill
- explain-diffSkill
- explain-stateSkill
- fleet-retrofitSkill
- fleetSkill
- gen-ciSkill
- gen-claudemdSkill
- gen-dependency-updaterSkill
- gen-devcontainerSkill
- gen-templatesSkill
- gh-protectSkill
- hotfixSkill
- iac-applySkill
- iac-planSkill
- inspect-profileSkill
- learn-profileSkill
- migrate-profileSkill
- optimize-claudemdSkill
- prSkill
- record-decisionSkill
- releaseSkill
- retrofitSkill
- route-docsSkill
- settingsSkill
- setupSkill
- shipSkill
- suggestSkill
- syncSkill
- sync-team-profilesSkill
- undo-bootstrapSkill
- undoSkill
- wait-for-pr-checksSkill
- watchSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 3 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 19
Never run git branch or git checkout -b directly — route through bin/new-branch.sh so the branching strategy, base branch, and name pattern …
- Distinctive: line 25
Read the user's phrasing. Purpose inference:
- Distinctive: line 34
If the phrasing is ambiguous ("I want a branch for the auth work"),
- Distinctive: line 55
Don't guess when stakes are non-trivial (release vs hotfix especially).
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
new-branch
You are creating a git branch that matches the repo's active profile.
Never run git branch or git checkout -b directly — route through
bin/new-branch.sh so the branching strategy, base branch, and name
pattern stay consistent.
1. Infer purpose
Read the user's phrasing. Purpose inference:
| User says something like... | Purpose |
| "new feature for X", "landing page", "add X" | feature |
| "bug in checkout", "fix Y", "bugfix" | bugfix |
| "release v1.2", "cut a release" | release |
| "hotfix production", "emergency fix" | hotfix |
If the phrasing is ambiguous ("I want a branch for the auth work"),
you MUST call the AskUserQuestion tool (not plain text):
{
"questions": [
{
"question": "What kind of branch do you need?",
"header": "Purpose",
"multiSelect": false,
"options": [
{ "label": "Feature", "description": "New functionality or enhancement" },
{ "label": "Bugfix", "description": "Fix for an existing issue" },
{ "label": "Release", "description": "Cut a release branch" },
{ "label": "Hotfix", "description": "Emergency fix against a tagged version" }
]
}
]
}Don't guess when stakes are non-trivial (release vs hotfix especially).
2. Derive a slug
Short, lowercase-kebab, no spaces. Map the user's words:
- "bug in the checkout button" →
checkout-button - "add a landing page" →
landing-page - "v1.2.0" release → slug is
1.2.0, use--version 1.2.0(see below).
Enforce the regex ^[a-z0-9][a-z0-9._-]*$. If the user's phrasing
doesn't reduce to a clean slug, propose one and ask for confirmation.
3. Release / hotfix version flag
release and hotfix patterns in GitFlow use {version} not {slug}.
For those purposes, ask the user which version (unless they already
said), then pass --version <x.y.z> to the orchestrator.
4. Invoke the orchestrator
bin/new-branch.sh \
--target <cwd> \
--profile <active-profile-name> \
--purpose <feature|bugfix|release|hotfix> \
--slug <slug> \
[--version <x.y.z>] \
--checkoutExit codes you should expect:
| Code | Meaning | What to do |
| 0 | created (and checked out if --checkout) | Report the new branch name |
| 2 | profile not found | Ask user to run bootstrap, or pick a different profile |
| 3 | purpose not supported by strategy / placeholder left | Tell user (e.g. GitHub Flow has no release) |
| 4 | slug invalid | Tell user + proposed fix |
| 5 | branch already exists, no --checkout | Offer to switch or suggest a different slug |
5. Report
On success, print:
- The new branch name.
- The base branch it was created from.
- One-line "next step" suggestion (e.g. "start making your changes, then
run
/nyann:commit").
When something goes wrong
- Strategy doesn't support the purpose (e.g. GitHub Flow +
release) → tell the user; suggest creating a release tag instead if that's their intent. main/masterdoesn't resolve → the repo wasn't bootstrapped; run/nyann:bootstrapfirst to seed.- Slug collision on a prior PR → suggest
-v2or a more specific slug rather than silently appending.
When to hand off
- "Now commit my changes" →
commitskill. - "Open a PR from this branch" →
prskill (PR only) orshipskill (PR + merge). - "Sync this branch with main" →
syncskill.
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.

