/git:branch [branch name] | [natural-language description of the work] | [ticket id]from git
This skill should be used when the user asks to "create a branch", "new branch", "start a new branch", "branch off", "branch for this", "move this work to a new branch", "put these changes on their own branch", or "/branch" — and whenever a branch must be created before starting new development. Runs the mechanical pre-creation checks (working tree state, correct base branch, base up to date, no local/remote name collision), derives a name from the project's branch naming convention, and creates the branch with a single `git switch -c`. Pushes and sets upstream only after explicit confirmation.
Ships in git. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Create a git branch safely: run the mechanical pre-creation checks, name it
from the project's convention, and create it in one step. Arguments given, if
any: $ARGUMENTS
This skill never rewrites history. Work already committed on the base branch is out of scope — creating the branch is all this does.
Interpret $ARGUMENTS:
git status / git diff. A dirty tree means "move this work to its own
branch" and the name comes from what the diff does; a clean tree means "start
new work" and the name comes from what was asked for.One branch, one concern. If the uncommitted work (or the described task) spans two unrelated concerns — a feature plus an unrelated refactor — say so and ask which one this branch is for, rather than sweeping both onto it.
Run these before proposing anything, and report the findings as one short block so the state is visible before any ref is created.
Run git status --porcelain. If it is not empty, stop and ask — do not
guess. Present the concrete options:
git switch -c takes them along.commit skill in this
plugin, then come back.git stash push -u) and restore after branching.Record the answer. It changes which git switch -c form section 4 uses.
Do not assume main. Resolve, in order:
git symbolic-ref --short refs/remotes/origin/HEAD — the remote's declared
default, returned as <remote>/<base>.git branch -a --list '*develop*' — a develop branch signals Git Flow,
where feature branches cut from develop, not main.Also check CLAUDE.md / AGENT.md / CONTRIBUTING.md for a stated base. When
more than one candidate is plausible, present them with a one-line reason each
and ask — branching from the wrong base is expensive to undo later.
Run git fetch <remote> — read-only and safe even with a dirty tree. Then
measure the gap:
git rev-list --count <base>..<remote>/<base>
git pull --ff-only to
fast-forward it, then branch from the local base.<remote>/<base>; no checkout of the base needed.HEAD. Do not stash
and pull behind the user's back. If HEAD is behind, say plainly that the
branch starts from history that is N commits stale and that rebasing onto
the updated base later is the fix.Once a candidate name exists, check both:
git branch -a --list '<name>'
git ls-remote --heads <remote> '<name>'
On a hit, propose a genuinely different name — never silently suffix a number. A collision usually means the work already has a branch; check that first.
If the detected convention requires an ID, use only an ID the user supplied or one verifiable from the repo context (an issue referenced in the conversation, an existing branch, a linked PR). Never invent a ticket number. With none available, either ask for it or fall back to the ID-less form of the pattern — and say which was used.
Detect the project's convention before writing a name:
CLAUDE.md, AGENT.md, AGENTS.md, CONTRIBUTING.md, and .github/
for a branch-naming rule.git branch -a) — prefix
vocabulary, separator, casing.<type>/<short-description>, or
<type>/<ticket-id>-<short-description> when a ticket exists.A declared convention always beats inference, and inference beats the default.
Consult references/naming.md for the type vocabulary, the character and
length rules, the generic-name reject list, and worked examples of deriving a
name from a diff or from a described task.
Validate mechanically before proposing:
git check-ref-format --branch '<name>'
For "move this work", derive the description from what the diff does, not from the filenames it touches.
Show the proposed name and the resolved base, and get confirmation before creating anything. Skip the prompt only when the user supplied an explicit name that passes validation.
Create and switch in a single command; never a separate create then checkout.
Clean tree — pass the start point explicitly:
git switch -c <name> <remote>/<base>
Carrying uncommitted work — omit the start point:
git switch -c <name>
This branches at HEAD and carries the changes over cleanly. Do not pass a
start point here: moving the work and moving the base in the same command is
what makes this operation go wrong.
On a git old enough to lack switch, git checkout -b <name> [<start-point>]
is the equivalent — but default to switch.
After the branch exists, ask whether to push and set upstream:
Branch created locally. Push it and set upstream now?
git push -u origin <name>
Never push without confirmation. Like the sibling commit skill, this
skill does not touch a remote on its own — git fetch and git ls-remote are
the only exceptions, and both are read-only.
Show:
Then close with the two reminders nothing here can enforce:
git branch -d <name>) and on the remote.references/naming.md — convention detection, the default pattern and
type vocabulary, character/length rules, the ambiguous-name reject list,
worked examples, and work-item linkage.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub leonardo-marziali/agentic-development-kit --plugin git4 skills in this plugin
/commitThis skill should be used when the user asks to "commit", "commit these changes", "create a commit", "stage and commit", or "/commit", and wants one or more git commits created following Conventional Commits. Never pushes to a remote./conventional-commitsThis skill should be used whenever the wording/formatting of a commit message itself is the task — writing one from a diff or description, formatting one as Conventional Commits, checking what type/scope/breaking-change marker to use, or another skill (such as the sibling `commit` skill in this plugin) needs message text to hand to `git commit`. Triggers on "write a commit message", "generate a conventional commit", "format this as a conventional commit", "what type should this be", "conventional commits", "commitlint", "semantic commit messages". Produces messages complying with the Conventional Commits v1.0.0 specification (type, optional scope, optional breaking-change marker, description, body, footers) and explains the reasoning behind each choice. This skill only produces message text — it never stages files or runs `git commit` itself; for "commit this" / "commit these changes" style requests where the user wants the commit actually created, that's the `commit` skill's job.Other plugins' skills for the same job