Claude Code · Slash command

/update-branch-name

Look at what actually changed on this branch and rename it to something descriptive — no more guessing a name before you've written the code.

Version control & git·Apache-2.0Source: giselles-ai (giselle)

549★ · Giselle, an open-source AI agentic-workflow builder

What this actually does for you

You start a branch as "fix" or "wip" because you don't know yet what you'll end up building — then once the work is actually done, this looks at the real diff and renames the branch to something a teammate could understand at a glance.

Try it for: Stop overthinking branch names at the start of a task entirely — just branch as "wip" and run this at the end. It removes a tiny but constant naming-things tax from your day.

The command file

# Update Branch Name

Follow these steps to update the current branch name:

1. Check differences between current branch and main branch HEAD using `git diff main...HEAD`
2. Analyze the changed files to understand what work is being done
3. Determine an appropriate descriptive branch name based on the changes
4. Update the current branch name using `git branch -m [new-branch-name]`
5. Verify the branch name was updated with `git branch`

How to add it

01

Copy the command file below.

02

Save it as .claude/commands/<name>.md in your project (create the folder if it doesn't exist).

03

Adjust anything project-specific (see the note below, if there is one).

04

Run the command in Claude Code by typing its name, e.g. it will appear in your / menu.

The linked repo is the source of truth — if the author updates it, the repo link stays current.

Want a whole automation, not just one command? Grab a working n8n template.