Skip to content
cccskills
FreePublished on GitHub

worktree

Manage git worktrees for parallel work on multiple branches simultaneously. Use when you need to work on two features at once without stashing or branch-switching.

The English summary is being prepared. Showing the original description.

Run score Not tested

See how to install

Files included (1)

  • SKILL.md1.7 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

Worktree Skill

Manage git worktrees for parallel, isolated work.

When to use

  • Need to review a PR while working on a feature
  • Running a long test suite on one branch while developing on another
  • Comparing behavior between two branches side-by-side
  • Agent team work where each agent operates on a separate branch

Create a worktree

# Create a worktree for an existing branch
git worktree add ../project-feature feature/my-feature

# Create a worktree for a new branch
git worktree add -b feature/new-thing ../project-new-thing main

List active worktrees

git worktree list

Remove a worktree (when done)

# 1. Confirm the work is committed or merged
# 2. Remove the worktree
git worktree remove ../project-feature

# Force remove if needed (work is intentionally discarded)
git worktree remove --force ../project-feature

Prune stale worktree references

git worktree prune

Rules

  • NEVER remove a worktree without confirming all work is committed
  • Each worktree has its own working directory — changes don't bleed between them
  • Worktrees share the same git history — commits on one branch are visible from all
  • Name worktrees consistently: ../project-<branch-slug>

For agent team workflows

When spawning multiple subagents for parallel work:

  1. Create one worktree per agent before spawning
  2. Give each agent its worktree path as its working directory
  3. After all agents finish, review each worktree's changes
  4. Merge or cherry-pick as needed
  5. Clean up all worktrees after merge

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

ask

Free

Route a codebase question to the right tool — structural graph, semantic search, or risk analysis. Use when you need to find or understand code without knowing exact file names.

The English summary is being prepared. Showing the original description.

brain-bootstrap/claude-code-brain-bootstrap11Updated Apr 25, 2026

Auto-configure CLAUDE.md and claude/ knowledge docs for a new project. Use when setting up Brain Bootstrap in a new repository. Discovers the codebase, fills in templates, and writes project-specific configuration.

The English summary is being prepared. Showing the original description.

brain-bootstrap/claude-code-brain-bootstrap11Updated Apr 25, 2026

Use before any new feature, component, or behavioral change — when you need to explore requirements and design before writing code

The English summary is being prepared. Showing the original description.

brain-bootstrap/claude-code-brain-bootstrap11Updated Apr 25, 2026

Activate safety guards for the session. Use /careful before critical operations — blocks rm -rf, DROP TABLE, git push --force, kubectl delete namespace, docker system prune via PreToolUse hook.

The English summary is being prepared. Showing the original description.

brain-bootstrap/claude-code-brain-bootstrap11Updated Apr 25, 2026

Generate a user-facing changelog from git commits — categorize, filter noise, translate to user language. Runs in isolated fork context.

The English summary is being prepared. Showing the original description.

brain-bootstrap/claude-code-brain-bootstrap11Updated Apr 25, 2026

Save session state before context gets full or before ending. Writes current task state, branch, and loaded docs to claude/tasks/todo.md so the next session can resume cleanly.

The English summary is being prepared. Showing the original description.

brain-bootstrap/claude-code-brain-bootstrap11Updated Apr 25, 2026

See all skills by brain-bootstrap

Report a problem with this skill