Skip to content
Agentmart
Submit a tool

using-git-worktrees

Use when the active execution profile requires or benefits from an isolated Git workspace.

Skill by eyildirim82

IndexedMIT
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/eyildirim82-using-git-worktrees

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Use when the active execution profile requires or benefits from an isolated Git workspace.

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/using-git-worktrees

What's inside

Skill name
using-git-worktrees
Description
Use when the active execution profile requires or benefits from an isolated Git workspace.
License
MIT
Instructions
37 lines in SKILL.md · view on GitHub

Files (1)

  • SKILL.md

SKILL.md (first lines)

# Using Git Worktrees

Isolation strength is profile-selected: `current-ok`, `isolated-preferred`, or `isolated-required`.

## Policy
- **current-ok (FAST):** a clean existing feature branch is acceptable for narrow reversible work.
- **isolated-preferred (STANDARD):** isolate multi-file/multi-step work when it reduces interference; a suitable existing feature worktree/branch is acceptable.
- **isolated-required (CRITICAL):** use an isolated workspace. Do not implement on main/master unless the user explicitly authorized that exact risk.

Creating a local reversible worktree does not require a separate approval prompt when the profile calls for isolation.

## MPD frozen-base contract

When Adaptive has selected Controller-Gated MPD, each lane worktree/branch must honor the wave's assigned branch and exact frozen-base contract before implementation. A moved branch, unexpected ancestry, or wrong base is a blocker to investigate; do not rebase/reset/force-push merely to make the lane look current unless that history mutation is separately authorized by the governing task.

Worktree isolation does not grant push, merge, deploy, production-write, destructive-action, or history-rewrite authority. Those effects remain independently governed by Adaptive authorization.

## Detect existing isolation first
Use `git rev-parse --git-dir`, `--git-common-dir`, `--show-superproject-working-tree`, and current branch. A linked worktree (not a submodule) already satisfies isolation; do not nest another one.

## Creation order
1. Prefer a native harness worktree mechanism such as `EnterWorktree`, `WorktreeCreate`, `/worktree`, or an explicit `--worktree` facility when available.
2. Otherwise use Git worktrees.
3. For manual Git worktrees, honor an explicit repo/user location preference, then an existing `.worktrees/` or `worktrees/` directory; otherwise **default to `.worktrees/` at the project root**.
4. Before creating a project-local manual worktree, verify the directory is ignored. If it is not ignored, make the smallest safe ignore change before use.

Do not bypass a native harness worktree facility merely because `git worktree add` is familiar; the harness may own cleanup and lifecycle state.

## Baseline evidence
Verification depth is adaptive:
- FAST: targeted sanity proof when needed;
- STANDARD: affected/relevant baseline;
- CRITICAL: strong clean-baseline evidence for the surfaces that will be used as gates.

If baseline failures already exist, record them as pre-existing evidence. Investigate only when they block attribution or the requested work; do not force a user stop solely because the repository was already imperfect.

From eyildirim82/adaptive-superpowers, MIT.

More from eyildirim82/adaptive-superpowers

Signals

Stars
0
Forks
0
Open issues
21
Last commit (this folder)
Sep 13, 2026 (1 month ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from eyildirim82

Cite this page

using-git-worktrees skill. Agent Mart. https://agentmart.dev/skills/eyildirim82-using-git-worktrees (last updated 2026-10-24)