git-branch

git-branch is a skill for Claude Code, Codex from sleeyax/promptfiles. It costs 82 tokens per session (1,174 once invoked), scanned A, original, MIT.

A workflow for suggesting a Git branch name that follows the repository’s existing naming style. A branch is a separate line of work in Git, so changes can be developed without changing the main line immediately.

In plain words
What is it for?
It helps inspect the repository’s branch conventions, suggest a name, and—after confirmation—create or rename a branch.
Why use it?
It reduces inconsistent branch names and records which branch the new work started from.

Skill for Claude CodeCodex

Part of the sleeyax-skills plugin — 17 skills, 2 agents shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/sleeyax/promptfiles/git-branch
Any agent
npx skills add sleeyax/promptfiles --skill git-branch
Clone the repo
git clone --depth 1 https://github.com/sleeyax/promptfiles

Made for: Claude Code, Codex.

Or install sleeyax-skills, the plugin that ships this one along with the rest of its 17 skills, 2 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for git-branch

README.md
[![agentmods](https://agentmods.dev/badge/skills/sleeyax/promptfiles/git-branch.svg)](https://agentmods.dev/skills/sleeyax/promptfiles/git-branch)
Your own site
<a href="https://agentmods.dev/skills/sleeyax/promptfiles/git-branch"><img src="https://agentmods.dev/badge/skills/sleeyax/promptfiles/git-branch.svg" alt="Measured on agentmods" height="20"></a>
Per session 82 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,174 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00082 $0.01174
Opus 5 $0.00041 $0.00587
Sonnet 5 $0.00016 $0.00235
Haiku 4.5 $0.00008 $0.00117

Measured 4d ago against content hash eda5794ab3ca, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

git-branch scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/git/git-branch/SKILL.md · 52 lines

How it starts

The opening of the file, as written. The whole thing — 52 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Git Branch

Suggest a branch name for the current work. If on the default branch, create the branch after confirmation. If on a custom branch, offer to rename it or branch off it. Whichever branch gets created, record the base it was cut from.

Hard requirement: never create or rename a branch without an explicit user choice. Use the AskUserQuestion tool when it's available in the session; where it isn't (e.g. Codex), ask in plain text with the same numbered options and stop until the user replies.

Steps

  1. Detect the default branch with git symbolic-ref refs/remotes/origin/HEAD (strip the refs/remotes/origin/ prefix). Fall back to main if that fails.
  2. Detect the current branch with git rev-parse --abbrev-ref HEAD.
  3. Inspect recent branch names to determine the repo's naming style. Use git for-each-ref --sort=-committerdate --count=20 --format='%(refname:short)' refs/heads refs/remotes and study:
    • Whether names use a prefix/type convention (e.g. feat/, fix/, chore/) or are freeform
    • Separator style (kebab-case, snake_case, slashes)
    • Use of ticket/issue references
    • Typical length and level of detail
  4. Determine what the branch is about:
    • Run git diff --cached and git diff to see changes in progress.
    • Consider the full conversation context — task, intent, relevant discussion. Use this to write a more meaningful name than the diff alone would produce.
    • If there are no changes and no useful conversation context, ask the user what the branch is for before proceeding.
  5. Produce up to 3 branch names, ordered from best to worst. If only one is appropriate, suggest just one. Each name should read like the existing branches from step 3 produced it — indistinguishable in style from the repo's history.
    • Keep names concise but descriptive
    • Match the repo's prefix/separator conventions exactly
  6. Branch off the right base:
    • If on the default branch: the base is the default branch. Run git fetch origin and git pull --ff-only first to bring it up to date. Ask which suggested name (if any) to use, with a Custom name option. On confirmation, run git checkout -b <name> and verify with git rev-parse --abbrev-ref HEAD.
    • If on a custom branch: ask what to do, with these options:
      • Rename this branch to one of the suggested names — run git branch -m <new-name>. If the branch tracks a remote, warn the user that the remote branch will need to be updated separately (git push origin -u <new-name> and delete the old remote branch) and ask whether to do that now.
      • Branch off this one — the current branch is the base (e.g. branching a feature off develop). Run git checkout -b <name> and verify with git rev-parse --abbrev-ref HEAD.
      • Custom name and Cancel.
  7. Record the base so later skills don't have to guess it:

Read the full file on GitHub · 52 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 52 lines · 82 tokens per session scan A eda5794ab3ca

Subscribe to this mod's changes

git-branch is a skill published in the GitHub repository sleeyax/promptfiles (2 stars, last pushed 6d ago), licensed MIT. It adds 82 tokens to every session and 1,174 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.

obra/superpowers · 37 tokens

auto-perf-optimize

Run agent-driven VS Code performance or memory investigations. Use when asked to launch Code OSS, automate a VS Code scenario, run the Chat memory smoke runner, capture renderer heap snapshots, take workflow screenshots, compare run summaries, or drive a repeatable scenario before heap-snapshot analysis.

microsoft/vscode · 62 tokens

chat-perf

Run chat perf benchmarks and memory leak checks against the local dev build or any published VS Code version. Use when investigating chat rendering regressions, validating perf-sensitive changes to chat UI, or checking for memory leaks in the chat response pipeline.

microsoft/vscode · 51 tokens

chat-pet-sprite-creation

Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.

microsoft/vscode · 53 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens