Aller au contenu
Skillpedia
Déploiement et cloud (DevOps)48k · #4278

create-branch

Ce qu’il fait

Crée une nouvelle « branche » dans votre projet de code pour organiser votre travail. Elle propose un nom en fonction de ce que vous faites et des conventions de nommage.

Quand l’utiliser

  • ✓Lorsque vous voulez commencer à travailler sur une nouvelle fonctionnalité.
  • ✓Lorsque vous devez corriger un bogue et souhaitez isoler cette correction.
  • ✓Lorsque vous démarrez un nouveau travail et ne savez pas comment nommer la branche.

Lien du skill

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/create-branch/SKILL.md

Copiez-le et collez-le dans votre IA (Claude, ChatGPT ou Cursor) en lui demandant de suivre les instructions.

Comment l’utiliser

Le plus simple : copiez le message et collez-le dans votre IA. Elle lit le skill et suit les instructions.

Message prêt à coller

Utilise ce skill pour m’aider : https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/create-branch/SKILL.md Lis le fichier SKILL.md de ce lien et suis ses instructions pour ma tâche.
Envie que votre IA trouve seule des skills comme celui-ci ?Installez le MCP gratuit de Skillpedia : une ligne, et elle cherche parmi 15 000+ skills avant chaque tâche.Installer en 1 minute →

Exemple de demande à votre IA

“Je veux créer une branche pour ajouter une barre de recherche sur la page des conversations.”

5 nouveaux skills par semaine. 1 minute de lecture.

Comment ça marche

L'IA commence par retrouver votre nom d'utilisateur. Ensuite, elle regarde ce que vous avez modifié dans le code ou vous demande sur quoi vous allez travailler. Sur cette base, elle propose un nom de branche qui suit un modèle précis.

Contenu technique (SKILL.md original)

Texte original de l’auteur, en anglais, directement depuis GitHub.

Create Branch

Create a git branch with the correct type prefix and a descriptive name following Sentry conventions.

When to Use

  • You need to create a new git branch that follows the repository's naming convention.
  • You are starting a new piece of work from the default branch and need help classifying it as feat, fix, docs, or another branch type.
  • You want the branch name proposed from either the task description or the current local diff.

Step 1: Get the Username Prefix

Run gh api user --jq .login to get the GitHub username.

If the command fails (e.g. not authenticated), ask the user for their preferred prefix.

Step 2: Determine the Branch Description

If $ARGUMENTS is provided, use it as the description of the work.

If no arguments, check for local changes:

git diff
git diff --cached
git status --short
  • Changes exist: read the diff content to understand what the work is about and generate a description.
  • No changes: ask the user what they are about to work on.

Step 3: Classify the Type

Pick the type from this table based on the description:

Type Use when
feat New user-facing functionality
fix Broken behavior now works
ref Same behavior, different structure
chore Deps, config, version bumps, updating existing tooling — no new logic
perf Same behavior, faster
style CSS, formatting, visual-only
docs Documentation only
test Tests only
ci CI/CD config
build Build system
meta Repo metadata changes
license License changes

When unsure: feat for new things (including new scripts, skills, or tools), ref for restructuring existing things, chore only when updating/maintaining something that already exists.

Step 4: Generate and Propose

Build the branch name as <username>/<type>/<short-description>.

Rules for <short-description>:

  • Kebab-case, lowercase
  • 3 to 6 words, concise but clear
  • Describe the change, not file names
  • Only use ASCII letters, digits, and hyphens — no spaces, dots, colons, tildes, or other git-forbidden characters

Present it to the user and ask if they want to use it, modify it, or change the type.

Examples

Work description Branch name
Dropdown menu not closing on outside click priscila/fix/dropdown-not-closing-on-blur
Adding search to conversations page priscila/feat/add-search-to-conversations
Restructuring drawer components priscila/ref/simplify-drawer-components
Updating test fixtures priscila/chore/update-test-fixtures
Bumping @sentry/react to latest version priscila/chore/bump-sentry-react
Adding a new agent skill priscila/feat/add-create-branch-skill

Step 5: Create the Branch

Once confirmed, detect the current and default branch:

git branch --show-current
git remote | grep -qx origin && echo origin || git remote | head -1
git symbolic-ref refs/remotes/<remote>/HEAD 2>/dev/null | sed 's|refs/remotes/<remote>/||' | tr -d '[:space:]'

If symbolic-ref fails, fall back to git branch --list main master: use the one that exists; if both or neither exist, ask the user.

If git branch --show-current is empty (detached HEAD), show the current commit (git rev-parse --short HEAD) and ask whether to branch from it or switch to the default branch first.

…

Questions fréquentes

Qu'est-ce qu'une « branche » de code ?

Imaginez une branche comme une copie séparée de votre projet, dans laquelle vous pouvez apporter des modifications sans affecter la version principale. C'est idéal pour expérimenter ou travailler sur de nouvelles fonctionnalités.

Pourquoi le nom de la branche est-il important ?

Un bon nom permet de comprendre rapidement à quoi sert cette branche, ce qui facilite la collaboration avec les autres et l'organisation du projet.

Que signifient les types comme « feat » ou « fix » ?

Ce sont des étiquettes qui indiquent la finalité de la branche : « feat » pour les nouvelles fonctionnalités, « fix » pour les corrections de bogues, « docs » pour la documentation, etc. Cela permet d'organiser le travail.

Détails

Description originale de l’auteur

Create a git branch following Sentry naming conventions. Use when asked to "create a branch", "new branch", "start a branch", "make a branch", "switch to a new branch", or when starting new work on the default branch.

repo: sickn33/agentic-awesome-skills

Popularité

Étoiles GitHub
48k
Position au classement
#4278
Licence
MIT
Mis à jour
15/10/2026

Ce skill vous est-il utile ?

0

Connectez-vous pour voter.

Commentaires

  • …

Autres skills de ce dépôt

Skills similaires