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.
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
Copy the command file below.
Save it as .claude/commands/<name>.md in your project (create the folder if it doesn't exist).
Adjust anything project-specific (see the note below, if there is one).
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.