Skill
Branch and worktree workflow
Isolates feature work in its own branch or worktree and integrates it cleanly when done.
- Technology
- branch-and-worktree-workflow
- version 1.1.0
- MIT license
- 3 outside sources
When it loads
Your assistant reads this description and loads the skill when a request matches it. Nothing else is in context until then.
Isolates feature work in its own branch or worktree and integrates it cleanly when done. Use this when starting work that should not disturb the current workspace, when several efforts must proceed in parallel on one repository, or when implementation is finished and the change needs merging, rebasing, or splitting for review.
Add it to your assistant
This skill ships in the Technology department, with 18 others.
Claude Code
/plugin marketplace add cbrock84/headcount
/plugin install technology@headcount
ChatGPT and Codex
Add Headcount: Technology to ChatGPT from the ChatGPT plugin directory.
GitHub Copilot CLI
copilot plugin marketplace add cbrock84/headcount
copilot plugin install technology@headcount
Cursor
The repository is a Cursor plugin marketplace. On a Teams or Enterprise plan, import it under Dashboard, Plugins & MCPs, New marketplace, Import from a repository. To try this department on one machine, copy plugins/technology into ~/.cursor/plugins/local/ and reload the window.
Gemini CLI
Gemini CLI installs one skill at a time:
gemini skills install https://github.com/cbrock84/headcount.git --path plugins/technology/skills/branch-and-worktree-workflow
The skill is identical in every tool. The Copilot, Cursor and Gemini steps follow each tool's published format and have not been run end to end here.
What the skill tells the assistant
The full text, as it installs. View the source on GitHub.
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:
- Rerun the full check the project actually gates on, not the subset you have been running.
- Read your own diff top to bottom. Remove debug output, stray files, and commented-out code.
- 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.
Sources
references/sources.md in this skill lists the outside authorities that settle the questions here — what each one is authoritative for, and what you may do with it. Check them before answering on anything they cover, and cite what you used. Most are free to read and not free to reproduce; the use note on each is binding.
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.
Company context
Before answering, look for the company profile: the file .headcount/company.md in the working folder, or a document titled "Headcount company profile" in the conversation, the project's instructions or files, or saved memory. Where there is one, answer for that company and do not ask for anything it already states. Where it conflicts with what the person says now, the person is right, and say that the profile looks out of date. Where there is none, carry on: ask only for the facts this question turns on, and mention once that executive:company-onboarding records them so they are not asked again.
Other departments
A skill written as department:skill belongs to another department, and each department installs separately. If the one a question belongs to is not installed, name the department that owns it and how to add it, and do not improvise its work. references/departments.md in this skill lists each department this skill names, with the install step for Claude Code and for ChatGPT.
Files it ships with
Loaded only when the skill calls for them.
Sources it checks against
Where a question has an outside authority, the skill points the assistant at it instead of answering from memory.
- Semantic Versioning 2.0.0 Semantic Versioning project
What a version increment is allowed to mean, and therefore whether a given change requires a major bump. A community specification rather than a standards body, but the one every dependency resolver assumes.
- Conventional Commits 1.0.0 Conventional Commits project
The grammar of a commit message, and how a breaking change is marked so that tooling can derive a version bump from history.
- Git reference manual Git project
What a Git operation actually does — what a worktree is, what rebase rewrites, what detached HEAD means. It settles behavior, not which workflow a team should adopt.
More in Technology
- AI workflow architect
Designs AI systems, automations, and agent workflows for a business — identifying which manual work is worth automating, how to structure the system, which tools fit, and what cou…
- API design
Designs interfaces that survive their consumers — resource modeling, errors, versioning, pagination, and compatibility.
- Chief Technology Officer / CIO
Owns architecture, engineering delivery, infrastructure, data platform, and internal systems.
- Cloud infrastructure
Designs and runs cloud infrastructure — environments, infrastructure as code, networking and isolation, scaling, and cost.
- Code review
Conducts and responds to code review — reviewing a change for correctness, design, and risk, and evaluating review feedback received on your own work.
- Completion verification
Verifies that work is actually complete before it is claimed to be — running the checks, reading the output, and confirming the original request was satisfied rather than approxim…
- Data migration
Moves data from one system to another without losing it or corrupting it — profiling the source before mapping, deciding between big-bang and parallel-run cutover, reconciling cou…
- Implementation planning
Turns a spec or requirement into a written plan a separate session or agent can execute, then drives that plan through review checkpoints.
- Observability and reliability
Makes systems debuggable and reliably operable — instrumentation, alerting that is worth waking for, service objectives, and learning from failure.
- Parallel agent delivery
Splits work across multiple agents or sessions running at once, keeping their surfaces disjoint so results merge cleanly.
- Prompt optimizer
Turns rough intent or a weak prompt into a reliable one — diagnosing why output is inconsistent, restructuring the instruction, and adapting it across models.
- Release and deployment
Ships changes safely and often — pipelines, deployment strategies, feature flags, rollback, and database changes.
- Skill authoring
Writes and revises agent skills so they trigger at the right moments and give usable instruction when they do.
- Solution architecture
Designs system structure and makes architectural decisions defensible — boundaries, coupling, trade-offs, and recording why.
- Solution exploration
Explores the problem and the range of possible approaches before any code is written — clarifying what is actually being asked, surfacing options with their tradeoffs, and converg…
- Systematic debugging
Finds the root cause of a bug, test failure, or unexpected behavior before proposing any fix.
- Technical debt management
Makes technical debt visible and decidable — distinguishing real debt from mess, quantifying its cost, and arguing for remediation in business terms.
- Test-driven development
Drives implementation by writing a failing test first, then the smallest code that passes it.