minhtran3124/agent-harness/using-git-worktrees

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Set up or verify an isolated worktree before implementation-plan execution. Detect existing isolation first, prefer the harness-native worktree tool, and use a safe git fallback only when needed.

Install

npx vskill@latest install minhtran3124/agent-harness/using-git-worktrees

SKILL.md

Using Git Worktrees

Announce that you are setting up an isolated workspace. Run skills/using-git-worktrees/scripts/detect-isolation.sh before creating anything.

  • linked-worktree: report the path and branch; use it (a detached head needs a branch before

finish).

  • submodule: do not misclassify it as an isolated worktree; follow its own repository policy.
  • main-worktree: create isolation as below.

Create isolation

Use the native worktree tool if the harness provides one; do not create untracked state the harness cannot manage. In Claude Code, call EnterWorktree with name: "<type>/<kebab-slug>" so the tool itself creates the worktree under .claude/worktrees/. Do not create a checkout by hand and enter it with path: a path outside .claude/worktrees/ raises a "permission-root relocation" confirmation on every entry.

The tool names the branch worktree-<name> (with / written as +), not <type>/<slug>. Rename it with git branch -m <type>/<slug>. Immediately after entering, before any edit, compare git rev-parse HEAD with git rev-parse <base> (the branch the PR will target); if they differ, run git reset --keep <base>, which stops instead of discarding local changes.

Only when no native tool exists, choose an existing .worktrees/ (preferred) or worktrees/ location, or the location documented in CLAUDE.md; if none exists, ask before choosing a root. Ensure the chosen parent is ignored before running:

bash
git worktree add <parent>/<branch> -b <branch>

Use <type>/<kebab-slug> branch names and keep the slug equal to specs/<slug> where possible. Never silently create a nested worktree or allow git add -A to capture one as a gitlink.

Enter the workspace

From inside the selected workspace, deploy the derived harness first:

bash
bash scripts/deploy-harness.sh --target "$(git rev-parse --show-toplevel)"

Then detect project setup from repository manifests and run its clean baseline. Report an existing failure before implementation. writing-plans and subagent-driven-development require this skill; finishing-a-development-branch owns the final PR flow.

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
7
7-day trend score
10

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/minhtran3124/agent-harness/using-git-worktrees/badge)](https://verified-skill.com/skills/minhtran3124/agent-harness/using-git-worktrees)

Something wrong with this skill or its page? Tell us.