agent-worktree
Deprecated. Do not use by default in this repo; use .codex/skills/agent-branch/SKILL.md for non-trivial edits.
Install
mkdir -p .claude/skills/agent-worktree && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/13348" && unzip -o skill.zip -d .claude/skills/agent-worktree && rm skill.zipInstalls to .claude/skills/agent-worktree
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Deprecated. Do not use by default in this repo; use .codex/skills/agent-branch/SKILL.md for non-trivial edits.About this skill
Agent Worktree
Deprecated. The current project workflow uses shared-directory Git branches instead of worktrees. Use .codex/skills/agent-branch/SKILL.md.
Use a dedicated Git worktree for non-trivial edits. Keep the user's main workspace developer-owned.
Rules
- Do not edit the primary workspace directly for non-trivial work unless the user explicitly asks.
- Treat dirty files in the primary workspace as user-owned changes.
- Do not restore deleted content unless the user explicitly requests restoration.
- Work only inside the assigned worktree after it is created.
Workflow
- Inspect the main workspace:
git status --short
-
If the main workspace is dirty, ask the user to commit/stash if the worktree needs those changes. Use
--allow-dirtyonly when the user agrees to create from currentHEAD. -
Create a task worktree:
python .\tools\create_agent_worktree.py <task-slug>
- Move into the worktree and work there:
cd "..\Monkey vs Allen.worktrees\<task-slug>"
git status --short
- Run checks from the worktree. For documentation edits:
python .\tools\validate_docs_frontmatter.py --root .\Documentation
- Commit the agent's changes on the task branch:
git add <files>
git commit -m "<task summary>"
- Report branch, worktree path, changed files, and verification commands.
Cleanup
List worktrees:
python .\tools\list_agent_worktrees.py
Remove a merged/finished worktree:
python .\tools\cleanup_agent_worktree.py "<worktree-path>" --branch agent/<task-slug>
Discard an unmerged task:
python .\tools\cleanup_agent_worktree.py "<worktree-path>" --branch agent/<task-slug> --force
Detailed project plan: Documentation/plan/worktree-setup.md.