From athena
Use when starting feature work that needs isolation from current workspace — creates isolated git worktrees with safety verification
How this skill is triggered — by the user, by Claude, or both
Slash command
/athena:git-worktrees <branch-name or feature description><branch-name or feature description>This skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Git worktrees create isolated workspaces sharing the same repository, allowing work on multiple branches simultaneously without switching.
Git worktrees create isolated workspaces sharing the same repository, allowing work on multiple branches simultaneously without switching.
Core principle: Systematic directory selection + safety verification = reliable isolation.
When NOT to use this skill manually: The myrmidon-swarm skill owns worktree creation for its
background subagents. Use this skill for manual development work, not to duplicate swarm setup.
Follow this priority order:
The tested scripts/prepare_worktree.py helper checks .worktrees and then worktrees. If both
exist, .worktrees wins.
Read AGENTS.md and its referenced repository guidance. If a preference is specified, pass it to
the helper with --directory DIRECTORY.
When no repository preference exists, use the host's temporary directory from
tempfile.gettempdir() with <project>-<branch>. This is commonly /tmp on Unix-like hosts and
avoids polluting the project directory.
The helper computes the project name from the repository root.
MUST verify directory is ignored before creating worktree. The helper fails closed when its project-local directory is not ignored.
If NOT ignored:
.worktrees/ to .gitignoreWhy critical: Prevents accidentally committing worktree contents to repository.
No .gitignore verification needed — outside the project entirely.
scripts/prepare_worktree.py
against this installed skill directory and invoke that absolute helper path with
BRANCH_NAME --start-point BASE_SHA --dry-run. For a contract requiring a distinct branch and
path, also pass exact --path and --path-root values.--dry-run, optionally supplying the documented
repository preference through --directory. Never replace the recorded SHA with ambient HEAD.If tests fail: Report failures, ask whether to proceed or investigate.
If tests pass: Report ready.
When work is done, invoke tidy for branch inspection and rebasing. Use the separately approved
audit and removal flow in tidy (Phase 1) for worktrees; do not improvise deletion commands.
Preserve the worktree by default. Delivery, merge, abandonment, or a general cleanup request does
not authorize removal; tidy must re-audit it and obtain per-path Gate C approval.
| Situation | Action |
|---|---|
.worktrees/ exists + ignored | Use it |
| Neither exists | Use the host temporary directory with <project>-<branch> |
| Directory not ignored | Add to .gitignore + commit first |
| Tests fail at baseline | Report failures + ask before proceeding |
Pairs with:
tidy for worktree audit and removal (its first phase) and branch inspection.Adapted from obra/superpowers under the MIT License. Copyright (c) 2025 Jesse Vincent.
Guides collaborative design exploration before implementation: explores context, asks clarifying questions, proposes approaches, and writes a design doc for user approval.
Creates structured, bite-sized implementation plans from specs or requirements before writing code. Useful for breaking down multi-step tasks into testable steps with file structure and task boundaries.
Resolves in-progress git merge or rebase conflicts by analyzing history, understanding intent, and preserving both changes where possible. Runs automated checks after resolution.
npx claudepluginhub homericintelligence/athena --plugin athena