new-branch
Skill40 starsChanged 8 months agoMITView on GitHub
Cut a clean new branch off the latest origin/main and verify it matches the remote.
2 other projects use a version of this.
Adopted by
Most recently taken up by
- thettwe/nyanntheir own version, first seen Aug 22, 2026
- EverMind-AI/EverOStheir own version, first seen Jul 29, 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
- thettwe/nyann★ 6same 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.
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
- Distinctive: line 29
No derivable information at all → only then ask.
- Distinctive: line 56
No ready branch name and no derivable requirement description → ask.
- Very specific: line 62
Start from the latest: always base on origin/main, never on a possibly stale local main.
- Distinctive: line 64
Verify right after cutting: use rev-list to confirm actual sync.
≈ “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 (create a branch off the latest mainline)
Branch off the latest origin/main so the starting point is clean and in sync with the remote.
Trigger
The user asks to "create a new branch / new branch / cut a branch" and wants it based on the latest mainline.
Scope (important)
This skill is only responsible for quickly creating a clean new branch, up to "verify right after cutting".
- Do: fetch → branch from
origin/main→ verify sync → output confirmation. - Do NOT: explore / read code, spawn Explore / Plan agents, produce an implementation plan, or start writing code.
Any requirement description the user includes at trigger time (e.g. "improve the add-to-slack onboarding flow") is only used to derive the branch name / record intent, not a dev task to start here. Follow-up requirement refinement and implementation are discussed by the user in a new conversation and are out of scope for this skill.
Pre-checks
- Confirm the branch name (always in English, following the
<type>/<short-desc>convention, e.g.feat/credit-guard,fix/stream-recovery):- User already gave a ready branch name → use it directly.
- User gave a requirement sentence (e.g. "improve the add-to-slack onboarding flow") → derive an English branch name from it (e.g.
feat/slack-onboarding-flow) and create it directly, no need to ask. - No derivable information at all → only then ask.
- Confirm the working tree is clean (
git status). If there are uncommitted changes, stop and ask the user how to handle them; do not force-switch.
Steps
# 1. Fetch the latest remote mainline
git fetch origin main
# 2. Create and switch to the new branch off the latest origin/main
git checkout -b <branch-name> origin/main
# 3. Verify: should be 0 ahead, 0 behind
git rev-list --left-right --count origin/main...HEADgit checkout -b <name> origin/main in one step guarantees the new branch's start = the latest remote mainline; no need to update local main first.
Verification
git rev-list --left-right --count origin/main...HEADoutputs0 0(0 ahead, 0 behind).git statusshows you are on the new branch with a clean working tree.
Output confirmation: branch name, current HEAD commit, and sync status against origin/main.
When to stop and ask
- No ready branch name and no derivable requirement description → ask.
- Uncommitted changes in the working tree → ask how to handle (stash / commit / discard); never discard on your own.
- A branch with the same name already exists → ask whether to overwrite or rename.
Key principles
- Start from the latest: always base on
origin/main, never on a possibly stale local main. - Never lose changes: confirm before any operation that could lose the user's work.
- Verify right after cutting: use rev-list to confirm actual sync; never assume.
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.

