/ctx:ctx-worktreefrom ctx
Manages git worktrees for parallel agent development with creation, listing, and teardown of isolated task tracks and guardrails.
Ships in ctx. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Manage git worktrees to parallelize agent work across independent task tracks. Supports creating, listing, and tearing down worktrees with ctx-aware guardrails.
create <name>Create a new worktree as a sibling directory with a work/ branch.
Process:
Check count: refuse if 4 worktrees already exist:
git worktree list
Count lines. If >= 5 (1 main + 4 worktrees), stop and explain the limit.
Determine project name from the current directory basename:
basename "$(git rev-parse --show-toplevel)"
Create the worktree as a sibling directory:
git worktree add "../<project>-<name>" -b "work/<name>"
Verify the worktree was created:
ls "../<project>-<name>"
Remind the user:
Do NOT run
ctx initin the worktree. The context directory is already tracked in git and will be present. Launch a separate Claude Code session there and work normally.
listShow all active worktrees:
git worktree list
teardown <name>Merge a completed worktree back and clean up.
Process:
Check for uncommitted changes in the worktree:
git -C "../<project>-<name>" status --porcelain
If output is non-empty, warn and stop. The user must commit or discard changes first.
Merge the work branch into the current branch:
git merge "work/<name>"
If there are conflicts, stop and help the user resolve them. TASKS.md conflicts are common: see guidance below.
Remove the worktree:
git worktree remove "../<project>-<name>"
Delete the branch:
git branch -d "work/<name>"
Verify cleanup:
git worktree list
git branch | grep "work/<name>"
../<project>-<name>,
never inside the project treework/ branch prefix: all worktree branches use work/<name>
for easy identification and cleanupctx init in worktrees: the context directory is tracked
in git; running init would overwrite shared context files[x] completions from both sides.
No task should go from [x] back to [ ].The encryption key lives at ~/.ctx/.ctx.key (user-level, outside
the project). All worktrees on the same machine share this path, so
ctx pad and ctx hook notify work in worktrees automatically.
One thing to watch:
ctx journal import and journal enrichment
resolve paths relative to the current working directory. Files
created in a worktree stay in that worktree and are discarded on
teardown. Enrich journals on the main branch after merging: the
JSONL session logs are intact regardless.Before creating worktrees, analyze the backlog to group tasks into non-overlapping tracks:
Proposed worktree groups:
work/docs : recipe updates, blog post, getting started guide
(touches: docs/)
work/crypto : P3.1-P3.3 encrypted scratchpad infra
(touches: internal/crypto/, internal/config/)
work/pad-cli : P3.4-P3.9 pad CLI commands
(touches: internal/cli/pad/)
Let the user approve or adjust before proceeding.
Before any operation, verify:
work/ prefix../)ctx init in worktreeWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub activememory/ctx --plugin ctx54 skills in this plugin
/ctx-agentLoad full context packet. Use at session start or when context seems stale or incomplete./ctx-architectureBuild and maintain architecture maps. Use to create or refresh ARCHITECTURE.md and DETAILED_DESIGN.md. Supports principal mode for deeper analysis: vision, future direction, bottlenecks, implementation alternatives, gaps, upstream proposals, and intervention points./ctx-architecture-enrichEnrich architecture artifacts with code intelligence data. Takes existing /ctx-architecture output as baseline, verifies and quantifies with GitNexus MCP (blast radius, execution flows, domain clustering, registration sites). Run after /ctx-architecture, not instead of it./ctx-architecture-failure-analysisAdversarial failure analysis for codebases. Generates falsifiable incident hypotheses: race conditions, ordering assumptions, cache staleness, error swallowing, ownership gaps, idempotency failures, and scaling cliffs. Produces DANGER-ZONES.md with evidence-backed, ranked findings./ctx-archiveArchive completed tasks. Use when TASKS.md has many completed items cluttering the view./ctx-blogGenerate blog post draft. Use when documenting project progress, sharing learnings, or writing about development experience.Other plugins' skills for the same job