branche — Claude Code skill: branch off fresh main
Creates a new Git branch from the latest main with a feat/ or fix/ prefix. Handy before you start isolated work on a task.
npx skills add naiersaidane/claude-mastery --skill branche -a claude-codeWhat branche does
The skill does one thing: starts a branch from the newest main. It switches to main and pulls changes with git checkout main && git pull origin main, then creates the branch and checks it out.
Pass a name as an argument, like /branche feat/algorithme-churn, and it goes straight into git checkout -b. With no argument the skill asks for a branch name or a short description, then suggests a name with a feat/ prefix for new functionality or fix/ for a bug fix. It finishes by running git branch --show-current to confirm.
Because it branches off main, uncommitted changes in your current branch can block the checkout — worth a git stash or a commit first. The skill is meant as the step before /livre and runs in Claude, Codex, Cursor, GitHub Copilot, Gemini CLI and OpenCode.
What it helps with
- start a branch from an up-to-date main in one command
- get a branch name with a feat/ or fix/ prefix
- pull the latest changes before starting work
- avoid inventing a branch name by hand
- confirm which branch you ended up on
Example prompts for the agent
- /branche feat/algorithme-churn
- /branche
- create a branch for a new feature, start from main
How to install branche
1Skills CLI (Vercel)
npx skills add naiersaidane/claude-mastery --skill branche -a claude-code2Manually: put the files in place
~/.claude/skills/branche/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/branche/
1Skills CLI (Vercel)
npx skills add naiersaidane/claude-mastery --skill branche -a codex2Manually: put the files in place
.agents/skills/branche/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add naiersaidane/claude-mastery --skill branche -a cursor2Manually: put the files in place
.cursor/skills/branche/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install naiersaidane/claude-mastery branche2Manually: put the files in place
.github/skills/branche/SKILL.md1Skills CLI (Vercel)
npx skills add naiersaidane/claude-mastery --skill branche -a gemini-cli2Platform CLI
gemini skills install https://github.com/naiersaidane/claude-mastery --path skills/brancheManually: put the files in place
.devin/skills/branche/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add naiersaidane/claude-mastery --skill branche -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about branche
How do I install branche in Claude?
Run npx skills add naiersaidane/claude-mastery --skill branche -a claude-code. The skill file lands at ~/.claude/skills/branche/SKILL.md.
What does branche do?
It switches to main, pulls the latest changes and creates a new branch with a feat/ or fix/ prefix, then confirms the current branch.
How do I set the branch name?
Pass it as an argument: /branche feat/algorithme-churn. Without an argument the skill asks for a name or description and suggests one with a prefix.
Source text
SKILL.md · MIT
--- name: branche description: "Crée une nouvelle branche Git à partir de la dernière version de main, avec un préfixe conventionnel feat/ (nouvelle fonctionnalité) ou fix/ (correction de bug). Utilise sur /branche, ou quand l'utilisateur veut démarrer un nouveau travail sur une branche dédiée : \"nouvelle branche\", \"crée une branche\", \"je commence une feature\", \"pars de main à jour\", avant d'attaquer un développement isolé. Amont naturel de /livre." argument-hint: "[nom-de-branche]" --- # /branche Crée une nouvelle branche à partir de la dernière version de main. ## Étapes 1. Bascule sur main et récupère la dernière version : ```bash git checkout main && git pull origin main ``` 2. **Si `$ARGUMENTS` est fourni** (ex. `/branche feat/algorithme-churn`) : - Utilise l'argument directement comme nom de branche - Crée et bascule sur la branche : `git checkout -b <nom-de-branche>` 3. **Si aucun argument n'est fourni :** - Demande à l'utilisateur le nom de la branche ou une description du travail - Propose un nom avec un préfixe conventionnel : `feat/` ou `fix/` - Une fois confirmé, crée la branche : `git checkout -b <nom-de-branche>` 4. Confirme la création de la branche en exécutant `git branch --show-current` ## Conventions de nommage des branches Utilise ces préfixes : - `feat/` — Nouvelle fonctionnalité - `fix/` — Correction de bug Si l'utilisateur fournit un nom sans préfixe, propose d'en ajouter un.
© naiersaidane · MIT · naiersaidane/claude-mastery