Individual skill
worktree
Use when work needs an isolated git worktree: new work, an existing ref, a gated feature workspace, a manifest-tracked loop run, or a candidate patch captured without touching the current checkout (`capture-isolated-patch`). Not for plain branches: use create-branch. Not for remote, credential, publish, deploy, or irreversible changes.
.devin/skills/worktree/SKILL.md
Source commit b0e8ce89a19fac880251dc3ea1babfeb4503a4fe
What was checked
- Matches the observed repository HEAD
- Yes
- Scanner rules are current
- Yes
- Repository scan complete
- No
- Skill scan complete
- Yes
- Observed behavior
- Network or broad shell
- Last checked
- Nov 4, 2026
These are observations at the recorded commit, not a guarantee of safety. Review the source before running it.
Install this skill
Choose an agent in your Stack or copy a command below. Commands fetch the pinned commit and copy only this skill directory. Existing destinations are refused. Copying a command does not install anything.
An install command is unavailable: current rules, complete repository and skill scans, an eligible behavior level and a permitted license are required.
Repository context
- Repository stars (not skill ratings)
- 55
- Repository last updated
- Sep 28, 2026
- License
- Apache-2.0
Observed agent integration: No specific integration evidence. Standard SKILL.md installation does not imply verified compatibility.
- odd Repository topic
- odin Repository topic
- outline Repository topic
- outlines Repository topic
- coding-paradigm Repository topic
- outline-driven-development Repository topic
- claude-plugins Repository topic
- codex-cli Repository topic
- gemini-cli-extensions Repository topic
- outline-driven Repository topic
- engineering Derived category
Files and excerpt
File metadata and permitted, redacted excerpts come from the recorded scan. Source links are pinned to that commit.
Browse files
SKILL.mdcore · 18,114 bytesagents/openai.yamlasset · 286 bytesreferences/git-fallback.mddoc · 2,119 bytes
Read excerpt
# Worktree isolation
## Contract
| Field | Bound contract |
|---|---|
| Trigger | A new isolated worktree or branch is requested, an existing ref or PR needs isolation, feature work needs a gated workspace with setup and baseline tests (feature-gate mode), a run needs a manifest-tracked worktree (loop-run mode), or a candidate patch must be captured from an ephemeral worktree without touching the current checkout (`capture-isolated-patch` mode). |
| Authority | Reversible local: writes only the worktree directory, `.worktrees/` or `.loop-worktrees/` entries, a gitignore entry, symlinked hooks, manifest bookkeeping, or (`capture-isolated-patch` mode) a fresh temporary worktree and binary-safe patch under its parent temporary directory; rollback is removing the worktree and reverting those entries. Capture-isolated-patch mode never writes the original checkout. Loop-run mode never passes `--force` to `git worktree remove`. No remote mutation. |
| Side effect | Local write: creates or attaches an isolated git worktree and reports its exact path and status. Feature-gate mode also runs setup and the baseline test suite. Loop-run mode also maintains a status manifest under `.loop-worktrees/`. Capture-isolated-patch mode runs the command in an ephemeral worktree, captures stdout/stderr/exit code, and writes and returns a binary-safe patch file path or preserves the worktree on extraction failure. |
| Done | `new-work` and `isolate-existing-ref` modes have an isolated workspace the harness can see and manage, with no phantom state. `feature-gate` adds a green baseline suite or surfaces a failure. `loop-run` adds a manifest where every worktree has a legal status and no removal used `--force`. `capture-isolated-patch` writes and returns a binary-safe patch file path and command results, removes its temporary worktree after successful extraction, or preserves it and reports extraction failure; the original checkout is unchanged either way. |
## Inputs
1. Mode (required): one of `new-work`, `isolate-existing-ref`, `feature-gate`, `loop-run`, `capture-isolated-patch`. Default `new-work` when no ref is named and no gate, lifecycle, or patch capture is requested.