create-branch

create-branch is a skill for Claude Code, Codex from tmj-90/gaffer. It costs 50 tokens per session (1,364 once invoked), scanned A, original, Apache-2.0.

A workflow for creating or checking the working Git branch before changing code. Git branches are separate lines of work that keep unfinished changes away from protected branches such as main.

In plain words
What is it for?
Starting work on a Dispatch ticket, verifying an existing gaffer branch, or creating the required prefixed branch when none was prepared.
Why use it?
It helps prevent edits from being made directly on a protected branch and handles the difference between a prepared worktree and a standalone project.

Skill for Claude CodeCodex

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/tmj-90/gaffer/create-branch
Any agent
npx skills add tmj-90/gaffer --skill create-branch
Clone the repo
git clone --depth 1 https://github.com/tmj-90/gaffer

Made for: Claude Code, Codex.

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 create-branch

README.md
[![agentmods](https://agentmods.dev/badge/skills/tmj-90/gaffer/create-branch.svg)](https://agentmods.dev/skills/tmj-90/gaffer/create-branch)
Your own site
<a href="https://agentmods.dev/skills/tmj-90/gaffer/create-branch"><img src="https://agentmods.dev/badge/skills/tmj-90/gaffer/create-branch.svg" alt="Measured on agentmods" height="20"></a>
Per session 50 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,364 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.00050 $0.01364
Opus 5 $0.00025 $0.00682
Sonnet 5 $0.00010 $0.00273
Haiku 4.5 $0.00005 $0.00136

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

Security

Grade A, and why

create-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.

runner/skills/create-branch/SKILL.md · 101 lines

How it starts

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

Get onto the working branch

All work happens on a prefixed feature branch — never on a protected branch (main/master/release/*). The safety hook blocks pushes to protected branches.

Two paths — know which one you're in:

  • In the factory (the normal case): the runner has ALREADY created your gaffer/… branch and checked you out onto its worktree. You do not create or switch branches — you verify you're on the right kind of branch and stop if you aren't. See Factory path below.
  • Standalone / non-factory: no branch was prepared for you, so you create one yourself with the exact convention. See Standalone path below.

Factory path — VERIFY, do not create

The runner already created and checked you out onto your gaffer/ticket-<number>-… worktree branch. Your job is to confirm the ground is safe, not to branch:

  1. Confirm you're on a non-protected branch. Check the current branch (git branch --show-current / git rev-parse --abbrev-ref HEAD). It must NOT be main/master/release/*. The gaffer/ prefix is expected.
  2. Do NOT run git switch -c / git checkout -b. A branch already exists; creating another one diverges from the worktree the runner set up and the factory expects.
  3. Check the working tree is clean. Run git status --porcelain. If it is dirty — uncommitted or untracked state left over from a prior partial run on this worktree — do not branch over it or start editing on top of it. Stop and mark_ticket_blocked with a clear reason ("worktree dirty on arrival: "); a human resolves the stale state. Fabricating a clean start over dirty state corrupts the delivery.
  4. If you are somehow on a protected branch (the runner's setup didn't take), do not "fix" it by creating your own branch — mark_ticket_blocked and report it, because the environment isn't what the factory guarantees.

Once you've verified a clean tree on a non-protected gaffer/… branch, implement directly on it. The rest of this skill (the naming convention) applies to the standalone case.

Read the full file on GitHub · 101 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 · 101 lines · 50 tokens per session scan A 22b65a840b7b

Subscribe to this mod's changes

create-branch is a skill published in the GitHub repository tmj-90/gaffer (2 stars, last pushed 4d ago), licensed Apache-2.0. It adds 50 tokens to every session and 1,364 once invoked, about $0.0003 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.