branch-and-worktree-workflow

branch-and-worktree-workflow is a skill for Claude Code from cbrock84/headcount. It costs 70 tokens per session (453 once invoked), scanned A, original, MIT.

A Git workflow for isolating work in branches or worktrees and integrating it cleanly later. A worktree is a second checkout of the same repository in another folder.

In plain words
What is it for?
It helps start isolated feature work, keep branches current, make coherent commits, run final checks, and merge or split completed changes.
Why use it?
It keeps unfinished or parallel changes from disturbing the current workspace and reduces merge conflicts and mixed-purpose commits.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the technology plugin — 11 skills shipped together

Good fit It helps start isolated feature work, keep branches current, make coherent commits, run final checks, and merge or split completed changes.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/cbrock84/headcount/branch-and-worktree-workflow
About the project

headcount is an organization of independently installable Claude Code plugins, each grouping skills for a department such as finance, security, or demand generation. Claude Code users install the departments they need and invoke their skills for specialized work; the catalogue entries are skills and related agent tooling from that organization.

cbrock84/headcount · 1,320 stars · on GitHub · cbrock84.github.io

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.

Any agent
npx skills add cbrock84/headcount --skill branch-and-worktree-workflow
Clone the repo
git clone --depth 1 https://github.com/cbrock84/headcount

Made for: Claude Code.

Or install technology, the plugin that ships this one along with the rest of its 11 skills.

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 branch-and-worktree-workflow

README.md
[![agentmods](https://agentmods.dev/badge/skills/cbrock84/headcount/branch-and-worktree-workflow/github.svg)](https://agentmods.dev/skills/cbrock84/headcount/branch-and-worktree-workflow)
Your own site
<a href="https://agentmods.dev/skills/cbrock84/headcount/branch-and-worktree-workflow"><img src="https://agentmods.dev/badge/skills/cbrock84/headcount/branch-and-worktree-workflow/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for branch-and-worktree-workflow

Your own site · 80×15
<a href="https://agentmods.dev/skills/cbrock84/headcount/branch-and-worktree-workflow"><img src="https://agentmods.dev/badge/skills/cbrock84/headcount/branch-and-worktree-workflow.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 70 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 453 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.1 $0.00070 $0.00453
Opus 5 $0.00035 $0.00227
Sonnet 5 $0.00014 $0.00091
Haiku 4.5 $0.00007 $0.00045

Measured 5d ago against content hash 63cbf34b4118, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

branch-and-worktree-workflow 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 5d 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.

plugins/technology/skills/branch-and-worktree-workflow/SKILL.md · 45 lines

What it actually says

Branch and worktree workflow

Starting

Work that will take more than one sitting, or that runs alongside other work, gets its own isolated workspace. A worktree gives you a second checkout of the same repository on a different branch — two efforts, two directories, one object store, no stashing.

Branch from the current upstream default, not from whatever is checked out. Branching off a stale local branch is how unrelated commits end up in a review.

While working

  • Commit at points where the tree is coherent, not at the end of the day.
  • Keep the branch current with its base often. A merge conflict found on day one is a five-minute fix; the same conflict found on day ten is an afternoon.
  • One concern per branch. If you find an unrelated bug, note it and leave it.

Finishing

Before proposing the work:

  1. Rerun the full check the project actually gates on, not the subset you have been running.
  2. Read your own diff top to bottom. Remove debug output, stray files, and commented-out code.
  3. Confirm the branch merges cleanly into its base.

Then decide how it integrates:

  • Small and coherent — merge as is.
  • Several separable concerns — split into stacked branches so each can be reviewed on its merits. A reviewer given three concerns in one diff reviews none of them well.
  • Exploratory — keep the useful commits, drop the rest.

Never

  • Rewrite history on a branch someone else has checked out. Merge instead; a force-push breaks their working copy.
  • Leave a worktree behind after merging — stale worktrees hold references and confuse later work.
  • Merge your own change without the checks green on the final commit, not an earlier one.
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. 5d ago First seen · 45 lines · 70 tokens per session scan A 63cbf34b4118

Subscribe to this mod's changes

branch-and-worktree-workflow is a skill published in the GitHub repository cbrock84/headcount (1,320 stars, last pushed 6d ago), licensed MIT. It adds 70 tokens to every session and 453 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-09-03.

Related

Other skills, from other repositories

team-workspace

Use to set up or work with a SHARED, git-backed team workspace for artifacts a team co-owns — team charters, strategy docs, decision records — kept strictly separate from your private reflections, which never leave your machine. Trigger phrases include "share our team charter with the team", "set up a shared…

shwetank/bettersense · 159 tokens

pr-review

Address feedback left on a GitHub pull request: fetch unresolved review threads, make agreed Elixir/Phoenix code fixes, reply, and resolve. Use for a PR URL/number or reviewer comments. NOT for pre-PR review, findings triage, or CI monitoring.

oliver-kriska/claude-elixir-phoenix · 59 tokens

phx-pr-review

Address feedback left on a GitHub pull request: fetch unresolved review threads, make agreed Elixir/Phoenix code fixes, reply, and resolve. Use for a PR URL/number or reviewer comments. NOT for pre-PR review, findings triage, or CI monitoring.

oliver-kriska/claude-elixir-phoenix · 61 tokens

genshijin-commit

A guide for writing short Git commit messages in Conventional Commits format, a shared style that labels changes such as features, fixes, tests, and documentation. It supports Japanese and English and emphasizes explaining why a change was made.

InterfaceX-co-jp/genshijin · 88 tokens

commit-push-pr

Full git workflow - creates branch, commits, pushes, and creates or updates a PR with summary and test plan.

sneg55/agent-starter · 28 tokens

commit

Create a single well-crafted git commit from current changes. Analyzes diff, follows repo's commit style, and writes a concise "why not what" message.

sneg55/agent-starter · 35 tokens