install
source · Clone the upstream repo
git clone https://github.com/JasonWarrenUK/goblin-mode
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/JasonWarrenUK/goblin-mode "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/git-rename-branch" ~/.claude/skills/jasonwarrenuk-goblin-mode-git-rename-branch && rm -rf "$T"
manifest:
skills/git-rename-branch/SKILL.mdsource content
Assess and Rename Current Branch
- If user has specified a new name, apply it; otheriwse, get the current branch name with
git branch --show-current - Get a summary of what's actually been done on this branch:
to see commitsgit log main..HEAD --oneline
to see changed filesgit diff main..HEAD --name-only
- Compare the branch name against the actual changes:
- Does the name still accurately describe the work?
- Is the scope broader or narrower than the name implies?
- Does the name follow the
convention?<prefix>/<short-description>
- If the name is still accurate, say so and stop
- If a rename is warranted, suggest a better name and explain why
- Format:
— all lowercase, hyphens, imperative mood (<prefix>/<short-description>
notadd-feature
oradds-feature
)adding-feature
- Format:
- Await approval — if accepted:
- Rename locally:
git branch -m <new-name> - Rename on remote:
thengit push origin HEAD:<new-name>git push origin --delete <old-name> - Set upstream:
git branch --set-upstream-to=origin/<new-name>
- Rename locally: