Claude Skill

branch-and-worktree-workflow

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 n

LLM Mart · 0 points · 9 views 0 listing impressions 0 install-command copies
Virus-scanned Reviewed automatically before listing.

Full trust report

Download cbrock84-headcount-plugins_technology_skills_branch-and-worktree-workflow-98d1c17.zip · 2 KB
Part of cbrock84/headcount — 160 skills

Install

skills CLI npx skills add https://github.com/cbrock84/headcount/tree/main/plugins/technology/skills/branch-and-worktree-workflow
Claude Code claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install cbrock84-headcount@llmmart
Git git clone https://github.com/cbrock84/headcount.git

The skills CLI installs just this skill, for any of its supported agents. Claude Code installs the whole cbrock84/headcount collection as a plugin from our marketplace. Git is the plain clone.

Skill manifest

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.

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.
Files (headcount)
  • references
    • sources.md 1.5 KB
      # Sources — `technology:branch-and-worktree-workflow`
      
      <!-- Generated by scripts/build-sources.py from sources/*.toml. Do not edit. -->
      
      Check these before answering on anything they cover, and cite what you used. The use note on each one is binding: most of what a professional cites is free to read and not free to reproduce.
      
      ## Conventional Commits 1.0.0
      
      Conventional Commits project · global · CC BY — quote with attribution
      
      <https://www.conventionalcommits.org/en/v1.0.0/>
      
      **Authoritative for:** 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 · global · **read and cite only — copyrighted, do not reproduce**
      
      <https://git-scm.com/docs>
      
      **Authoritative for:** 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.
      
      ## Semantic Versioning 2.0.0
      
      Semantic Versioning project · global · CC BY — quote with attribution
      
      <https://semver.org/>
      
      **Authoritative for:** 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.
      
      ---
      
      Sources are maintained in `sources/` upstream, not here. If one is wrong, out of date, or missing, fix it there — this file is regenerated and an edit to it is lost.
      
  • SKILL.md 2.4 KB
    ---
    name: branch-and-worktree-workflow
    description: 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.
    ---
    
    # 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.
    
    ## 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.
    

Comments (0)

Sign in to join the conversation.

No comments yet.

Reviews (0)

No reviews yet.

Related