Agent skill

Superpowers Using Git Worktrees

by christopherarter in christopherarter/superpowers-reasonix

Feature work needing an isolated workspace, or executing a plan?

MITAuto-check passedDevelopment

Install Superpowers Using Git Worktrees

skills CLI
$ npx skills add christopherarter/superpowers-reasonix --skill superpowers-using-git-worktrees -a claude-code

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

GitHub CLI
$ gh skill install christopherarter/superpowers-reasonix superpowers-using-git-worktrees --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/christopherarter/superpowers-reasonix.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/superpowers-using-git-worktrees .claude/skills/superpowers-using-git-worktrees && 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
superpowers-using-git-worktrees
GitHub stars
102
Token cost
~1.4k tokens
SKILL.md length
576 words
Files
1
Skills in repo
11
Repo updated
First seen
Licence
MIT

At a glance

Feature work needing an isolated workspace, or executing a plan?

  • Works in 4 steps: Detect Existing Isolation → Create Isolated Workspace → Project Setup → …
  • Tasks that involve Git worktrees
  • SKILL.md covers Overview, Step 0: Detect Existing…, Step 1: Create Isolated… and Step 3: Project Setup, plus 3 more sections
  • Calls git, npm and cargo

What it does

Superpowers Using Git Worktrees is an agent skill from christopherarter/superpowers-reasonix. Feature work needing an isolated workspace, or executing a plan? Load first.

Its SKILL.md is about 1.4k 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. It works with Git. The repository describes itself as: Superpowers skill port to Reasonix coding harness. The licence is MIT.

When your agent uses it

  • Tasks that involve Git worktrees

Example prompts

  • “/superpowers-using-git-worktrees”

Requirements

  • Python 3
  • Node.js

Workflow steps

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

  1. Detect Existing Isolation
  2. Create Isolated Workspace
  3. Project Setup
  4. Verify Clean Baseline

What it can do on your machine

Read from SKILL.md and the folder at commit d202ba4. 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
    • npm
    • cargo
    • go

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

  • Network

    No URLs in SKILL.md. Its commands use git and npm, 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

Superpowers Using Git Worktrees loads about 1.4k tokens when it runs. Until then it costs about 27 tokens; SKILL.md has 576 words of instructions outside code blocks.

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

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 christopherarter/superpowers-reasonix at commit d202ba4, republished under its MIT licence (© christopherarter). 576 words, ~1,414 tokens.

Download SKILL.mdSave it as .claude/skills/superpowers-using-git-worktrees/SKILL.md (or your agent's skills folder).
name
superpowers-using-git-worktrees
description
Feature work needing an isolated workspace, or executing a plan? Load first.

Using Git Worktrees

Overview

Work in isolated workspace. Prefer native worktree tools; manual git worktrees only when none.

Core principle: Detect existing isolation first. Then native tools. Then git fallback. Never fight harness.

Announce at start: "I'm using the superpowers-using-git-worktrees skill to set up an isolated workspace."

Step 0: Detect Existing Isolation

Before creating anything, check if already in isolated workspace. Via bash:

bash
GIT_DIR=$(cd "$(git rev-parse --git-dir)" 2>/dev/null && pwd -P)
GIT_COMMON=$(cd "$(git rev-parse --git-common-dir)" 2>/dev/null && pwd -P)
BRANCH=$(git branch --show-current)

Submodule guard: GIT_DIR != GIT_COMMON also true inside submodules. Verify not a submodule before concluding "worktree":

bash
# If this returns a path, you're in a submodule, not a worktree — treat as normal repo
git rev-parse --show-superproject-working-tree 2>/dev/null

If GIT_DIR != GIT_COMMON (and not a submodule): Already in linked worktree. Skip to Step 3, do NOT create another. Report branch state:

  • On a branch: "Already in isolated workspace at <path> on branch <name>."
  • Detached HEAD: "Already in isolated workspace at <path> (detached HEAD, externally managed). Branch creation needed at finish."

If GIT_DIR == GIT_COMMON (or in a submodule): Normal repo checkout. Preference declared? Honor it, no asking. Else ask consent:

"Would you like me to set up an isolated worktree? It protects your current branch from changes."

Declines: work in place, skip to Step 3 — do NOT start editing feature code on the current branch first.

Step 1: Create Isolated Workspace

1a. Native Worktree Tools (preferred)

Already have a worktree mechanism — a tool named EnterWorktree, WorktreeCreate, a /worktree command, or a --worktree flag? Use it, skip to Step 3.

Native tools handle placement, branch creation, cleanup. Using git worktree add when a native tool exists creates phantom state the harness can't manage. No native tool: proceed to Step 1b.

1b. Git Worktree Fallback

Only use if Step 1a does not apply. Explicit user preference always beats filesystem state.

Directory Selection
  1. Check instructions for declared directory preference. Use it, no asking.
  2. Check for existing project-local worktree directory:
    bash
    ls -d .worktrees 2>/dev/null     # Preferred (hidden)
    ls -d worktrees 2>/dev/null      # Alternative
    Both exist? .worktrees wins.
  3. Check for existing global directory:
    bash
    project=$(basename "$(git rev-parse --show-toplevel)")
    ls -d ~/.config/reasonix/worktrees/$project 2>/dev/null
  4. No other guidance: default to .worktrees/ at project root.
Safety Verification (project-local directories only)

MUST verify directory ignored before creating worktree:

bash
git check-ignore -q .worktrees 2>/dev/null || git check-ignore -q worktrees 2>/dev/null

If NOT ignored: add to .gitignore, commit, proceed. Why critical: prevents committing worktree contents. Global directories need no verification.

Show full SKILL.md (239 more words)Show less
Create the Worktree
bash
# For project-local: path="$LOCATION/$BRANCH_NAME"
# For global: path="~/.config/reasonix/worktrees/$project/$BRANCH_NAME"
git worktree add "$path" -b "$BRANCH_NAME"
cd "$path"

Sandbox fallback: git worktree add fails with permission error (sandbox denial — Reasonix confines writes to [sandbox] workspace_root)? Tell the user the sandbox blocked it, working in the current directory instead. Run setup and baseline tests in place.

Step 3: Project Setup

Auto-detect and run setup, bash:

bash
if [ -f package.json ]; then npm install; fi
if [ -f Cargo.toml ]; then cargo build; fi
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
if [ -f pyproject.toml ]; then poetry install; fi
if [ -f go.mod ]; then go mod download; fi

Step 4: Verify Clean Baseline

Run tests, ensure clean baseline (npm test / cargo test / pytest / go test ./...).

Tests fail: report failures, ask whether to proceed or investigate. Pass: report ready.

Worktree ready at <full-path>
Tests passing (<N> tests, 0 failures)
Ready to implement <feature-name>

Quick Reference

SituationAction
Already in linked worktreeSkip creation (Step 0)
In a submoduleTreat as normal repo (Step 0 guard)
Native worktree tool availableUse it (Step 1a)
No native toolGit worktree fallback (Step 1b)
.worktrees/ existsUse it (verify ignored)
Both .worktrees/ and worktrees/ existUse .worktrees/
Neither existsCheck instruction file, then default .worktrees/
Directory not ignoredAdd to .gitignore + commit
Permission error on createSandbox fallback, work in place
Tests fail during baselineReport failures + ask

Red Flags

Never:

  • Create a worktree when Step 0 detects existing isolation
  • Use git worktree add when a native worktree tool exists — #1 mistake
  • Skip Step 1a, jump straight to git commands
  • Create project-local worktree without verifying it's ignored
  • Skip baseline test verification
  • Proceed with failing tests without asking

Always: run Step 0 first; prefer native tools; follow directory priority (existing > global legacy > instruction file > default); verify ignored for project-local; auto-detect and run setup; verify clean test baseline.

© christopherarter, 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 skills/superpowers-using-git-worktrees of christopherarter/superpowers-reasonix.

Open the folder on GitHubat commit d202ba4

Compare with similar skills

Superpowers Using Git Worktrees 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.

Superpowers Using Git Worktrees compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Superpowers Using Git Worktrees this skillchristopherarter/superpowers-reasonix102—~1.4kAutomated safety check: PassMIT
Build Px4 macOSPX4/PX4-Autopilot13k—~1.1kAutomated safety check: PassBSD-3-Clause
WorktreeAgentsMesh/AgentsMesh2.4k—~553Automated safety check: NotesCustom licence
Git Worktree IsolationjnMetaCode/superpowers-zh8.3k1 repos~982Automated safety check: PassMIT
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
  • 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
  • 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
  • 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 3 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 christopherarter/superpowers-reasonix

All 11 skills in this repo
  • Superpowers Systematic Debugging

    christopherarter/superpowers-reasonix

    Any bug, failing or flaky test, or surprise behavior?. An agent skill from christopherarter/superpowers-reasonix.

    102 GitHub stars~2k tokensUpdated 1 mo ago
    Auto-check passed
  • Superpowers Test Driven Development

    christopherarter/superpowers-reasonix

    Writing or fixing any code?. An agent skill from christopherarter/superpowers-reasonix.

    102 GitHub stars~1.9k tokensUpdated 1 mo ago
    Auto-check passed
  • Superpowers Writing Skills

    christopherarter/superpowers-reasonix

    Creating, editing, or testing a Reasonix skill?. An agent skill from christopherarter/superpowers-reasonix.

    102 GitHub stars~2.8k tokensUpdated 1 mo ago
    Auto-check passed
  • Superpowers Brainstorming

    christopherarter/superpowers-reasonix

    Building a feature or starting from an idea?. An agent skill from christopherarter/superpowers-reasonix.

    102 GitHub stars~1.7k tokensUpdated 1 mo ago
    Auto-check passed
  • Superpowers Finishing A Development Branch

    christopherarter/superpowers-reasonix

    Branch finished, tests green?. An agent skill from christopherarter/superpowers-reasonix.

    102 GitHub stars~1.3k tokensUpdated 1 mo ago
    Auto-check passed
  • Superpowers Receiving Code Review

    christopherarter/superpowers-reasonix

    Got review feedback?. An agent skill from christopherarter/superpowers-reasonix.

    102 GitHub stars~1.2k tokensUpdated 1 mo ago
    Auto-check passed

Works with

Questions about Superpowers Using Git Worktrees

What does Superpowers Using Git Worktrees do?

Feature work needing an isolated workspace, or executing a plan? Superpowers Using Git Worktrees is an agent skill from christopherarter/superpowers-reasonix. Feature work needing an isolated workspace, or executing a plan?

When should I use Superpowers Using Git Worktrees?

Superpowers Using Git Worktrees fits situations like: tasks that involve Git worktrees.

How do I install Superpowers Using Git Worktrees in Claude Code?

Run `npx skills add christopherarter/superpowers-reasonix --skill superpowers-using-git-worktrees -a claude-code`. Or copy the skill folder (skills/superpowers-using-git-worktrees in christopherarter/superpowers-reasonix) into .claude/skills/superpowers-using-git-worktrees in your project. Claude Code loads it when a task matches its description.

How do I install Superpowers Using Git Worktrees in Codex?

Run `npx skills add christopherarter/superpowers-reasonix --skill superpowers-using-git-worktrees -a codex`. Or copy the skill folder (skills/superpowers-using-git-worktrees in christopherarter/superpowers-reasonix) into .agents/skills/superpowers-using-git-worktrees in your project. Codex loads it when a task matches its description.

Can I use Superpowers Using Git Worktrees 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 christopherarter/superpowers-reasonix --skill superpowers-using-git-worktrees -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/superpowers-using-git-worktrees, .gemini/skills/superpowers-using-git-worktrees, .github/skills/superpowers-using-git-worktrees and .opencode/skills/superpowers-using-git-worktrees in your project.

What does Superpowers Using Git Worktrees need to run?

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

Does Superpowers Using Git Worktrees access the network?

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

Is Superpowers Using Git Worktrees 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 Superpowers Using Git Worktrees use?

Superpowers Using Git Worktrees 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 Superpowers Using Git Worktrees use?

About 1.4k tokens (SKILL.md is roughly 5.7k 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 Superpowers Using Git Worktrees?

Skills that share tags, products or a category with Superpowers Using Git Worktrees: Build Px4 macOS (PX4/PX4-Autopilot, 13k stars), Worktree (AgentsMesh/AgentsMesh, 2.4k stars), Git Worktree Isolation (jnMetaCode/superpowers-zh, 8.3k 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 Superpowers Using Git Worktrees?

christopherarter (a GitHub user) maintains it in christopherarter/superpowers-reasonix, which has 102 GitHub stars. The repository holds 11 skills in this directory. The repository was last updated on August 20, 2026.

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