agentleFS
renathoazrenathoaz/arsyn/skills/isolating/SKILL.md

isolating

Skill2 starsChanged 8 months agoMITView on GitHub

Create isolated git worktrees for feature work.

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If NOT ignored: add to .gitignore, commit, then proceed.

    line 26
  2. Distinctive:

    If baseline tests fail: report failures and ask whether to proceed or investigate.

    line 46

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Isolating

Announce at start: "I'm applying the isolating skill to set up a separate workspace."

Directory Resolution

Resolve the worktree root in this order — stop at first match:

  1. Existing directory — check for .worktrees/ then worktrees/ in repo root
  2. CLAUDE.md directive — grep -i "worktree.*director" CLAUDE.md
  3. Prompt — offer .worktrees/ (project-local, hidden) or ~/.config/arsyn/worktrees/<project>/ (global)

Gitignore Gate

For project-local directories only:

git check-ignore -q .worktrees 2>/dev/null

If NOT ignored: add to .gitignore, commit, then proceed. Worktree contents tracked in git cause nested-repo confusion that is painful to untangle.

Global directories (~/.config/arsyn/worktrees/) skip this check entirely.

Worktree Lifecycle

# 1. Detect project
project=$(basename "$(git rev-parse --show-toplevel)")

# 2. Create worktree + branch
git worktree add "$WORKTREE_ROOT/$BRANCH_NAME" -b "$BRANCH_NAME"
cd "$WORKTREE_ROOT/$BRANCH_NAME"

# 3. Install dependencies (auto-detect)
# 4. Run test suite for clean baseline

See references/setup-commands.md for dependency installation and test commands by ecosystem.

If baseline tests fail: report failures and ask whether to proceed or investigate. Do not silently continue.

Report when ready:

Worktree ready at <full-path>
Tests passing (<N> tests, 0 failures)
Ready to implement <feature-name>

Quick Reference

SituationAction
.worktrees/ existsUse it (verify ignored)
worktrees/ existsUse it (verify ignored)
Both existUse .worktrees/
Neither existsCheck CLAUDE.md, then ask
Directory not ignoredAdd to .gitignore, commit
Tests fail at baselineReport + ask
No recognizable build fileSkip dependency install

Gotchas

  • Shared database state — Worktrees share git objects but not app state. A migration in one worktree affects every worktree hitting the same database. Coordinate or use separate databases.
  • Stale worktrees accumulate — Merged branches leave orphaned worktrees. git worktree list to audit; git worktree remove to clean.
  • Wrong base branch — Creating from a stale local ref instead of latest main/develop. Always git fetch and branch from the updated remote tip.
  • Forgetting ignore verification — The single most common mistake. Project-local worktree directories that aren't gitignored pollute git status and risk accidental commits.

Integration

Called by:

  • ideating (Phase 4) — when design is approved and implementation follows
  • orchestrating — before dispatching subagent tasks
  • executing — before running plan batches

Pairs with:

  • finalizing — cleans up the worktree after work completes

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.