Branch name
Personal agent toolkit — curated skills for LLM coding agents
npx -y skills add neumie/almanac --skill branch-nameAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Use when naming or renaming the current git branch from its contents. Triggers: name this branch, rename branch, or working on default branch (main) with uncommitted work.
SKILL.md
2.7 KB, 653 tokens by cl100k_base, as published. Nobody here has run it
Branch Name
Generate a descriptive branch name from the branch's contents and rename the current branch.
What to analyze
These commands run automatically when the skill loads — their output replaces each line below. Use whatever has content.
- Staged file list: !
git diff --cached --stat - Staged diff: !
git diff --cached - Unstaged file list: !
git diff --stat - Unstaged diff: !
git diff - Branch commits: !
git log main..HEAD --oneline 2>/dev/null || git log master..HEAD --oneline 2>/dev/null || true - Commit messages: !
git log main..HEAD --format="%B" 2>/dev/null || git log master..HEAD --format="%B" 2>/dev/null || true
If on main/master with uncommitted changes, only the diff output will be useful.
Naming rules
- Format:
<type>/<short-description>where type isfeat,fix,refactor,chore,docs,test,ci, orperf - Use lowercase kebab-case for the description
- Keep total length under 50 characters
- Be specific:
feat/add-user-avatar-uploadnotfeat/update-users - Use imperative mood:
fix/handle-null-responsenotfix/handled-null-response - No issue numbers unless the user asks for them
Procedure
- Analyze the branch contents (diffs and/or commits as above).
- Determine the primary type from the changes.
- Generate the branch name.
- Present the name and rename:
git branch -m <new-name>
- After renaming, check if the old branch had a remote tracking branch:
git for-each-ref --format='%(upstream:short)' refs/heads/<new-name>
If a remote tracking branch exists, rename the remote branch using GitHub's API (this preserves any open PRs):
gh api -X POST repos/{owner}/{repo}/branches/<old-name>/rename -f new_name="<new-name>"
git branch -u origin/<new-name>
If the gh command fails (e.g. not a GitHub repo), fall back to:
git push -u origin <new-name> && git push origin :<old-name>
Edge cases
- No changes and no commits: Use the current conversation context (task description, discussed goals) to derive the branch name. If there is no conversation context either, report "nothing to name — no context available" and stop.
- On
main/master: Create a new branch instead of renaming:git checkout -b <name> - Already on a well-named branch: Suggest keeping it, or offer the new name as an alternative.
- Detached HEAD: Report error — must be on a branch to rename.
- Mixed change types: Use the dominant type. If truly split, suggest the user commit separately and name after the primary purpose.