Agent skill

Worktree Lifecycle

by MadAppGang in MadAppGang/claude-code

A skill your agent uses when starting isolated feature work or before executing implementation plans.

MITAuto-check passedDevelopment

Install Worktree Lifecycle

skills CLI
$ npx skills add MadAppGang/claude-code --skill worktree-lifecycle -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install MadAppGang/claude-code worktree-lifecycle --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/MadAppGang/claude-code.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/dev/skills/discipline/worktree-lifecycle .claude/skills/worktree-lifecycle && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
worktree-lifecycle
GitHub stars
285
Token cost
~3.5k tokens
SKILL.md length
757 words
Files
1
Skills in repo
69
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when starting isolated feature work or before executing implementation plans.

  • Works in 6 steps: Pre-flight Checks → Directory Selection → Creation → …
  • Starting isolated feature work
  • SKILL.md covers When to Use, Red Flags (Anti-Patterns), 6-Phase Lifecycle and Error Recovery, plus 3 more sections
  • Calls git, jq and bun

What it does

Worktree Lifecycle is an agent skill from MadAppGang/claude-code. Use when starting isolated feature work or before executing implementation plans. Manages full worktree lifecycle from creation through cleanup with safety checks and error recovery.

Its SKILL.md is about 3.5k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Git worktrees and Planning. It works with Git. The repository describes itself as: claude code plugins marketplace. The licence is MIT.

When your agent uses it

  • Starting isolated feature work
  • Before executing implementation plans

Example prompts

  • “/worktree-lifecycle”

Requirements

  • Python 3
  • Node.js

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. Pre-flight Checks
  2. Directory Selection
  3. Creation
  4. Setup
  5. Handoff
  6. Cleanup

What it can do on your machine

Read from SKILL.md and the folder at commit 6097ad4. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git
    • jq
    • bun
    • npm
    • cargo
    • go
    • pip
    • pnpm
    • yarn
    • bundle
    • pytest

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git, npm, pip, pnpm and yarn, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Worktree Lifecycle loads about 3.5k tokens when it runs. Until then it costs about 50 tokens; SKILL.md has 757 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~50
When it runs · the whole SKILL.md, loaded when a task matches
~3.5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from MadAppGang/claude-code at commit 6097ad4, republished under its MIT licence (© MadAppGang). 757 words, ~3,500 tokens.

Download SKILL.mdSave it as .claude/skills/worktree-lifecycle/SKILL.md (or your agent's skills folder).
name
worktree-lifecycle
description
Use when starting isolated feature work or before executing implementation plans. Manages full worktree lifecycle from creation through cleanup with safety checks and error recovery.
keywords
worktree, git, isolation, feature-branch, parallel-development, workspace, cleanup, lifecycle, worktrees
created
2026-02-11
updated
2026-02-11
plugin
dev
type
discipline
difficulty
intermediate

Worktree Lifecycle

Purpose: Manage git worktrees for isolated feature work with safety checks, multi-stack setup, and clean lifecycle management.

When to Use

This skill applies whenever you:

  • Start a new feature that requires isolated workspace
  • Execute risky or experimental changes
  • Need to keep current work untouched while testing alternatives
  • Coordinate parallel agent work (each agent in separate worktree)
  • Follow an implementation plan requiring clean environment
  • Preserve long-running feature work across sessions

Trigger keywords: experiment, prototype, risky, breaking, parallel, isolate, worktree, workspace

Red Flags (Anti-Patterns)

  • Creating worktree without checking if branch already exists
  • Creating worktree without checking if directory path is available
  • Forgetting to add worktree directory to .gitignore
  • Manually deleting worktree with rm -rf (use git worktree remove)
  • Removing worktree with uncommitted changes without user confirmation
  • Using same branch in multiple worktrees simultaneously
  • Working in worktree after returning to main directory (stale CWD)
  • Not storing original CWD before entering worktree
  • Skipping dependency installation in new worktree
  • Not running baseline tests before starting work

6-Phase Lifecycle

Phase 1: Pre-flight Checks

Purpose: Verify all prerequisites before creating anything.

Required checks (all must pass):

bash
# 1. Verify git repository
git rev-parse --git-dir &>/dev/null
if [ $? -ne 0 ]; then
  ERROR: "Not a git repository"
  RECOVERY: Abort with clear error message
fi

# 2. Detect detached HEAD state
if ! git symbolic-ref HEAD &>/dev/null; then
  WARNING: "Currently in detached HEAD state"
  RECOVERY: Ask user if they want to create branch from current commit
fi

# 3. Check if branch already in a worktree
if git worktree list | grep -q "$BRANCH"; then
  ERROR: "Branch $BRANCH already checked out in a worktree"
  RECOVERY: Ask user - reuse existing, rename branch, or cancel
fi

# 4. Check if branch exists (but not in worktree)
if git branch --list "$BRANCH" | grep -q .; then
  WARNING: "Branch $BRANCH already exists"
  RECOVERY: Ask user - use existing branch or create new with different name
fi

# 5. Check if target path is available
# IMPORTANT: Create directory first before checking (git check-ignore needs path to exist)
mkdir -p "$WORKTREE_DIR"
if [ -d "$WORKTREE_PATH" ]; then
  ERROR: "Directory $WORKTREE_PATH already exists"
  RECOVERY: Ask user - choose different path or remove existing
fi

Error Recovery Table:

ErrorDetectionRecovery
Not a git repogit rev-parse --git-dir failsAbort with clear error
Detached HEADgit symbolic-ref HEAD failsAsk: create branch from commit?
Branch in worktreegit worktree list | grep $BRANCH succeedsAsk: reuse, rename, or cancel
Branch existsgit branch --list $BRANCH returns resultAsk: use existing or rename
Path existsDirectory already presentAsk: choose different path or remove
Parent not writableCannot create parent directoryAbort with permission error
Phase 2: Directory Selection

Priority order (cascading, first match wins):

  1. Check for existing .worktrees/ directory → use it (no prompt)
  2. Check for existing worktrees/ directory → use it (no prompt)
  3. Check CLAUDE.md for worktree preference → follow it (no prompt)
  4. Ask user (only if no default found)

For orchestrator integration: Pass WORKTREE_DIR=".worktrees" to skip this phase entirely.

Example detection:

bash
if [ -d ".worktrees" ]; then
  WORKTREE_DIR=".worktrees"
elif [ -d "worktrees" ]; then
  WORKTREE_DIR="worktrees"
elif grep -q "worktree.*directory" CLAUDE.md 2>/dev/null; then
  WORKTREE_DIR=$(grep "worktree.*directory" CLAUDE.md | extract_path)
else
  # Ask user via AskUserQuestion
  # Options: .worktrees/, worktrees/, custom
fi
Phase 3: Creation

Steps (must be executed in order):

bash
# 1. Verify .gitignore safety
# IMPORTANT: Directory must exist before git check-ignore
mkdir -p "$WORKTREE_DIR"

if ! git check-ignore -q "$WORKTREE_DIR" 2>/dev/null; then
  echo "$WORKTREE_DIR/" >> .gitignore
  git add .gitignore
  git commit -m "chore: add $WORKTREE_DIR to .gitignore"
fi

# 2. Store original CWD (critical for Phase 6 cleanup)
ORIGINAL_CWD=$(pwd)

# 3. Create worktree
git worktree add "$WORKTREE_PATH" -b "$BRANCH"

# 4. Verify creation succeeded
if [ ! -d "$WORKTREE_PATH" ]; then
  ERROR: "Worktree creation failed"
  RECOVERY: Clean up any partial state, report error
  exit 1
fi

# 5. Change to worktree directory
cd "$WORKTREE_PATH"

# 6. Initialize submodules (if any)
if [ -f .gitmodules ]; then
  git submodule update --init --recursive
fi

# 7. Write statusline worktree marker (persists across compaction)
if [ -n "$SESSION_ID" ]; then
  cat > "$HOME/.claude/.statusline-worktree-${SESSION_ID}" <<MARKER_EOF
{
  "worktree_path": "$WORKTREE_PATH",
  "branch": "$BRANCH",
  "worktree_name": "$(basename "$WORKTREE_PATH")"
}
MARKER_EOF
fi

Error handling: If git worktree add fails, clean up any partial state and report the error to user.

Phase 4: Setup

Multi-stack detection:

bash
# Detect all present stacks
STACKS=()
[ -f package.json ] && STACKS+=("nodejs")
[ -f Cargo.toml ] && STACKS+=("rust")
[ -f go.mod ] && STACKS+=("golang")
[ -f pyproject.toml ] || [ -f requirements.txt ] && STACKS+=("python")
[ -f Gemfile ] && STACKS+=("ruby")

# Run setup for each detected stack
for stack in "${STACKS[@]}"; do
  echo "Setting up $stack..."
  case "$stack" in
    nodejs)
      if [ -f bun.lockb ]; then
        bun install
      elif [ -f pnpm-lock.yaml ]; then
        pnpm install
      elif [ -f yarn.lock ]; then
        yarn install
      else
        npm install
      fi
      ;;
    rust)
      cargo build
      ;;
    golang)
      go mod download
      ;;
    python)
      if [ -f pyproject.toml ]; then
        pip install -e .
      else
        pip install -r requirements.txt
      fi
      ;;
    ruby)
      bundle install
      ;;
  esac
done

Baseline test verification:

bash
# Run tests and capture output (allow pre-existing failures)
for stack in "${STACKS[@]}"; do
  case "$stack" in
    nodejs)
      if [ -f bun.lockb ]; then
        bun test 2>&1 | tee test-output.log
      else
        npm test 2>&1 | tee test-output.log
      fi
      ;;
    rust)
      cargo test 2>&1 | tee test-output.log
      ;;
    golang)
      go test ./... 2>&1 | tee test-output.log
      ;;
    python)
      pytest 2>&1 | tee test-output.log
      ;;
  esac

  # Parse test results (do NOT block on pre-existing failures)
  PASSING=$(grep -o '[0-9]* passing' test-output.log | cut -d' ' -f1)
  FAILING=$(grep -o '[0-9]* failing' test-output.log | cut -d' ' -f1)

  echo "Baseline tests: $PASSING passing, $FAILING failing"
  if [ "${FAILING:-0}" -gt 0 ]; then
    echo "WARNING: Pre-existing test failures detected. Proceed with caution."
  fi
done
Phase 5: Handoff

Structured output for orchestrator:

Worktree ready:
  Path: .worktrees/feature-auth-system
  Branch: feature/auth-system
  Stacks: nodejs
  Dependencies: installed
  Tests: 47 passing, 0 failing
  Status: READY

Original CWD: /path/to/project
Worktree CWD: /path/to/project/.worktrees/feature-auth-system

Write metadata to session (for cleanup phase):

bash
cat > "${SESSION_PATH}/worktree-metadata.json" <<EOF
{
  "worktreePath": "$WORKTREE_PATH",
  "absolutePath": "$(realpath $WORKTREE_PATH)",
  "branchName": "$BRANCH",
  "originalCwd": "$ORIGINAL_CWD",
  "createdAt": "$(date -u +%Y-%m-%dT%H:%M:%SZ)",
  "stacks": $(printf '%s\n' "${STACKS[@]}" | jq -R . | jq -s .),
  "baselineTests": {
    "passing": ${PASSING:-0},
    "failing": ${FAILING:-0}
  },
  "status": "active"
}
EOF

Orchestrator context passing (for dev:developer):

SESSION_PATH: ${SESSION_PATH}
WORKTREE_PATH: ${WORKTREE_PATH}
BRANCH_NAME: ${BRANCH_NAME}
ORIGINAL_CWD: ${ORIGINAL_CWD}

IMPORTANT: You are working in an isolated worktree.
- cd to WORKTREE_PATH before writing any code
- Session artifacts stay in SESSION_PATH (main worktree)
- When complete, return control to orchestrator for cleanup
Phase 6: Cleanup

Trigger conditions:

  • Orchestrator completion phase
  • Explicit user request via /dev:worktree cleanup
  • Error recovery (abort implementation)

Steps (with safety checks):

bash
# 1. Verify worktree metadata exists
if [ ! -f "${SESSION_PATH}/worktree-metadata.json" ]; then
  ERROR: "No worktree metadata found"
  RECOVERY: Ask user for worktree path manually
fi

# Read metadata
WORKTREE_PATH=$(jq -r .worktreePath "${SESSION_PATH}/worktree-metadata.json")
ORIGINAL_CWD=$(jq -r .originalCwd "${SESSION_PATH}/worktree-metadata.json")
BRANCH=$(jq -r .branchName "${SESSION_PATH}/worktree-metadata.json")

# 2. Return to original CWD if currently in worktree
CURRENT_CWD=$(pwd)
if [[ "$CURRENT_CWD" == *"$WORKTREE_PATH"* ]]; then
  cd "$ORIGINAL_CWD"
fi

# 3. Check for uncommitted changes
cd "$WORKTREE_PATH"
if [ -n "$(git status --porcelain)" ]; then
  # Use AskUserQuestion to resolve
  echo "WARNING: Uncommitted changes detected in worktree"
  # Options: commit now, stash, discard, abort cleanup
  # DO NOT proceed until resolved
fi

# 4. Return to original CWD
cd "$ORIGINAL_CWD"

# 5. Remove worktree (NEVER use rm -rf)
git worktree remove "$WORKTREE_PATH"

# 6. Optionally delete branch (only if merged or user confirms)
if git branch --merged | grep -q "$BRANCH"; then
  git branch -d "$BRANCH"  # Safe delete (only if merged)
else
  # Ask user: keep branch or force delete?
  # git branch -D "$BRANCH"  # Force delete (only with confirmation)
fi

# 7. Update metadata status
jq '.status = "removed" | .removedAt = "'$(date -u +%Y-%m-%dT%H:%M:%SZ)'"' \
  "${SESSION_PATH}/worktree-metadata.json" > "${SESSION_PATH}/worktree-metadata.json.tmp"
mv "${SESSION_PATH}/worktree-metadata.json.tmp" "${SESSION_PATH}/worktree-metadata.json"

# 8. Remove statusline worktree marker
if [ -n "$SESSION_ID" ]; then
  rm -f "$HOME/.claude/.statusline-worktree-${SESSION_ID}"
fi

Error handling during cleanup:

ErrorDetectionRecovery
Currently in worktreeCWD matches worktree pathAuto-return to original CWD
Uncommitted changesgit status --porcelain not emptyAsk user: commit/stash/discard
Worktree in usegit worktree remove failsAsk: force removal with --force?
Branch not mergedgit branch -d failsAsk: keep branch or force delete?
Stale marker fileMarker exists but worktree removedAuto-cleaned by statusline (marker ignored if worktree gone)
Show full SKILL.md (293 more words)Show less

Error Recovery

Critical errors (abort workflow):

  • Not a git repository
  • Permission denied creating directory
  • Git worktree creation fails without clear reason

Recoverable errors (ask user):

  • Branch already exists → Use existing or rename
  • Path already exists → Choose different path or remove
  • Uncommitted changes during cleanup → Commit/stash/discard
  • Tests fail during baseline → Proceed or abort

Quick Reference Card

Before starting isolated work:

  1. ✅ Run Pre-flight Checks (Phase 1)
    • Git repo valid
    • Branch available
    • Path available
  2. ✅ Select or detect worktree directory (Phase 2)
  3. ✅ Create worktree + verify .gitignore (Phase 3)
  4. ✅ Install dependencies for all stacks (Phase 4)
  5. ✅ Run baseline tests (Phase 4)
  6. ✅ Store metadata and hand off to agent (Phase 5)

After completing work:

  1. ✅ Return to original CWD if in worktree
  2. ✅ Check for uncommitted changes → resolve
  3. ✅ Remove worktree with git worktree remove
  4. ✅ Optionally delete branch (only if merged or confirmed)

Remember: Always use git worktree remove, never rm -rf.

Orchestrator Integration

/dev:feature Integration

Phase 0 (after session init):

  • Add AskUserQuestion: "Create isolated worktree?"
  • If yes: Run Phases 1-5, pass WORKTREE_PATH to all agents
  • If no: Continue as normal

Phase 8 (completion):

  • If worktree created: Ask cleanup options (PR, merge, keep, discard)
  • Execute Phase 6 with chosen option
/dev:implement Integration

Phase 1 (lightweight version):

  • Add AskUserQuestion: "Use isolated worktree?"
  • If yes: Run Phases 1-5 with defaults (no directory selection)
  • Use .worktrees/ automatically, skip multi-stack detection

Phase 6 (finalization):

  • If worktree created: Ask "Merge and clean up?"
  • Execute Phase 6 with merge or keep option
Subagent Context Template

When delegating to agents in worktrees, always include:

SESSION_PATH: ${SESSION_PATH}
WORKTREE_PATH: ${WORKTREE_PATH}
BRANCH_NAME: ${BRANCH_NAME}

IMPORTANT: You are working in an isolated worktree.
- cd to WORKTREE_PATH before writing any code
- Read from ${SESSION_PATH} for architecture/requirements
- Write code to WORKTREE_PATH (current branch: ${BRANCH_NAME})
- Session artifacts stay in ${SESSION_PATH} (main worktree)

Integration with Other Skills

  • test-driven-development: Baseline tests verify environment readiness
  • verification-before-completion: Worktree cleanup requires clean state
  • systematic-debugging: Isolated worktrees for reproducing bugs
  • context-detection: Multi-stack detection feeds into setup phase
  • agent-coordination-discipline: Parallel agents use separate worktrees

© MadAppGang, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in plugins/dev/skills/discipline/worktree-lifecycle of MadAppGang/claude-code.

Open the folder on GitHubat commit 6097ad4

Compare with similar skills

Worktree Lifecycle next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Worktree Lifecycle compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Worktree Lifecycle this skillMadAppGang/claude-code285—~3.5kAutomated safety check: PassMIT
Build Px4 macOSPX4/PX4-Autopilot13k—~1.1kAutomated safety check: PassBSD-3-Clause
Git Worktree IsolationjnMetaCode/superpowers-zh8.3k1 repos~982Automated safety check: PassMIT
WorktreeAgentsMesh/AgentsMesh2.4k—~553Automated safety check: NotesCustom licence
Cursor Composer Task DelegateChachamaru127/claude-code-harness3.2k—~4.4kAutomated safety check: NotesMIT
Git Worktree Setupk8zdev/k8z155—~930Automated safety check: PassNone

Similar skills

  • Build Px4 macOS

    PX4/PX4-Autopilot

    Build PX4 board firmware on macOS in the px4-dev Docker container, including git worktrees, and stage commit-labeled artifacts without flashing hardware.

    13k GitHub stars~1.1k tokensUpdated today
    DevelopmentAuto-check passed
  • Git Worktree Isolation

    jnMetaCode/superpowers-zh

    Sets up an isolated workspace before feature work or plan execution, preferring native worktree tools and falling back to git worktree, with instructions in Chinese.

    8.3k GitHub starsUsed in 1 repo~982 tokens
    DevelopmentAuto-check passed
  • Worktree

    AgentsMesh/AgentsMesh

    Creates or reuses an isolated AgentsMesh Git worktree from a verified base branch, preserves existing changes, and optionally starts the worktree-scoped development environment.

    2.4k GitHub stars~553 tokensUpdated 15 days ago
    DevelopmentAuto-check: notes
  • Cursor Composer Task Delegate

    Chachamaru127/claude-code-harness

    Hands one implementation task to Cursor Composer in an isolated git worktree, then reviews its diff and cherry-picks the result into the main branch.

    3.2k GitHub stars~4.4k tokensUpdated 4 days ago
    DevelopmentAuto-check: notes
  • Automate git worktree creation and copy private files (not tracked in git) to new workdirs.

    155 GitHub stars~930 tokensUpdated 3 mo ago
    DevelopmentAuto-check passed
  • New Feature

    michaelshimeles/skills

    Start a new task in an isolated Git worktree branched from origin/main so multiple agents can work on the same repo in parallel without conflicts.

    1.3k GitHub starsUsed in 1 repo~699 tokens
    DevelopmentAuto-check passed

More from MadAppGang/claude-code

All 69 skills in this repo
  • Content Brief

    MadAppGang/claude-code

    Content brief template and creation methodology for SEO-optimized content.

    285 GitHub starsUsed in 1 repo~959 tokens
    Auto-check passed
  • Context Detection

    MadAppGang/claude-code

    A skill your agent uses when detecting project technology stack from files/configs/directory structure, auto-loading framework-specific skills, or analyzing multi-stack fullstack projects (e.g…

    285 GitHub stars~5.4k tokensUpdated 6 mo ago
    Auto-check passed
  • Content Optimizer

    MadAppGang/claude-code

    On-page SEO optimization techniques including keyword density, meta tags, heading structure, and readability.

    285 GitHub starsUsed in 1 repo~694 tokens
    Auto-check passed
  • Keyword Cluster Builder

    MadAppGang/claude-code

    Techniques for expanding seed keywords and clustering by topic and intent.

    285 GitHub starsUsed in 1 repo~674 tokens
    Auto-check passed
  • Serp Analysis

    MadAppGang/claude-code

    SERP analysis techniques for intent classification, feature identification, and competitive intelligence.

    285 GitHub starsUsed in 1 repo~1k tokens
    Auto-check passed
  • Agent Coordination Discipline

    MadAppGang/claude-code

    A skill your agent uses when deciding whether to launch an agent, selecting which agent to use, or coordinating multiple agents.

    285 GitHub stars~3.8k tokensUpdated 6 mo ago
    Auto-check passed

Works with

Questions about Worktree Lifecycle

What does Worktree Lifecycle do?

A skill your agent uses when starting isolated feature work or before executing implementation plans. Worktree Lifecycle is an agent skill from MadAppGang/claude-code. Use when starting isolated feature work or before executing implementation plans.

When should I use Worktree Lifecycle?

Worktree Lifecycle fits situations like: starting isolated feature work; before executing implementation plans.

How do I install Worktree Lifecycle in Claude Code?

Run `npx skills add MadAppGang/claude-code --skill worktree-lifecycle -a claude-code`. Or copy the skill folder (plugins/dev/skills/discipline/worktree-lifecycle in MadAppGang/claude-code) into .claude/skills/worktree-lifecycle in your project. Claude Code loads it when a task matches its description.

How do I install Worktree Lifecycle in Codex?

Run `npx skills add MadAppGang/claude-code --skill worktree-lifecycle -a codex`. Or copy the skill folder (plugins/dev/skills/discipline/worktree-lifecycle in MadAppGang/claude-code) into .agents/skills/worktree-lifecycle in your project. Codex loads it when a task matches its description.

Can I use Worktree Lifecycle in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add MadAppGang/claude-code --skill worktree-lifecycle -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/worktree-lifecycle, .gemini/skills/worktree-lifecycle, .github/skills/worktree-lifecycle and .opencode/skills/worktree-lifecycle in your project.

What does Worktree Lifecycle need to run?

Going by SKILL.md and its folder, Worktree Lifecycle needs the command-line tools its instructions call (git, jq, bun, npm, cargo and go). Our summary lists: Python 3; Node.js.

Does Worktree Lifecycle access the network?

SKILL.md contains no URLs. Its commands use git, npm and pip, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Worktree Lifecycle safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Worktree Lifecycle use?

Worktree Lifecycle is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Worktree Lifecycle use?

About 3.5k tokens (SKILL.md is roughly 14k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Worktree Lifecycle?

Skills that share tags, products or a category with Worktree Lifecycle: Build Px4 macOS (PX4/PX4-Autopilot, 13k stars), Git Worktree Isolation (jnMetaCode/superpowers-zh, 8.3k stars), Worktree (AgentsMesh/AgentsMesh, 2.4k stars) and Cursor Composer Task Delegate (Chachamaru127/claude-code-harness, 3.2k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Worktree Lifecycle?

MadAppGang (a GitHub organization) maintains it in MadAppGang/claude-code, which has 285 GitHub stars. The repository holds 69 skills in this directory. The repository was last updated on March 15, 2026.

Source: MadAppGang/claude-code on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.