isolated-worktree-testing
Skill1 starsChanged 37 days agoMITView on GitHub
Use when testing tracked local changes away from the source checkout. Capture before switching.
In this repository34 other files it gives its agents.
- agent-branch-integrationSkill
- agent-config-syncSkill
- blocked-page-recoverySkill
- brand-retrofitSkill
- clickable-concept-prototypeSkill
- codebase-inspectionSkill
- commit-workSkill
- contrastive-refactor-demoSkill
- custom-domain-emailSkill
- delegate-coding-taskSkill
- delegated-agent-supervisionSkill
- delivery-verificationSkill
- domain-dns-cutoverSkill
- first-run-onboardingSkill
- frontend-render-performanceSkill
- github-pages-deploySkill
- hermes-cron-jobsSkill
- hermes-messaging-channelsSkill
- hermes-on-oracle-free-tierSkill
- hermes-provider-credentialsSkill
- measurement-validitySkill
- multi-layout-previewSkill
- new-project-scaffoldingSkill
- parallel-agent-fanoutSkill
- premortemSkill
- recall-and-claim-verificationSkill
- single-source-training-materialsSkill
- stakeholder-decision-elicitationSkill
- static-site-vps-deploySkill
- supabase-auth-debuggingSkill
- windows-background-process-hygieneSkill
- windows-desktop-automationSkill
- windows-performance-tuningSkill
- worktree-analysisSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
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
- Distinctive: line 8
Use a detached worktree to test a captured revision without switching the source branch.
- Distinctive: line 31
Run project-specific tests in TARGET, with independent dependencies and disposable data.
- Very specific: line 39
Never share node_modules by symlink or junction, and never delete dependencies in an inherited linked directory.
≈ “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.
Files
Isolated worktree testing
Use a detached worktree to test a captured revision without switching the source branch. Git worktrees share repository metadata: this is checkout isolation, not a security sandbox. Untrusted commands need a separate security boundary.
Supported snapshot
python scripts/capture_worktree.py SOURCE TARGET resolves source HEAD and captures
git diff --binary HEAD in the source checkout before creating the worktree.
This combines staged and unstaged tracked content relative to HEAD; it does not preserve
index staging distinctions. TARGET must not exist. No fetch, checkout, merge or push occurs.
The helper refuses untracked nonignored files and submodules before creating anything. It does not silently omit new source files. If new files are required, stop and choose an explicit reviewed snapshot method; do not stage files merely to evade this restriction. Ignored files (including ignored new source files), local secrets and dependency installs are not copied. Review ignore rules and expected file coverage first. Do not edit the source concurrently: capture is not transactional. Compare source status before/after and repeat if another writer changed the intended snapshot.
Procedure
- Review source status including ignored/untracked files, intended base and acceptance.
- Capture using the helper. Record the printed base SHA and patch SHA-256.
- Run project-specific tests in TARGET, with independent dependencies and disposable data. Disable implicit package publishing. A smoke check is not full-suite coverage.
- Record commands, real exit codes, tested revision and failures. Apply/build failures leave the worktree available for inspection; a failed capture never means verified.
- Inspect TARGET status. Remove only the exact disposable worktree, via
git -C SOURCE worktree remove TARGET. Dirty trees require review and explicit cleanup authorization; never use blanket recursive deletion or automatic--force.
Never share node_modules by symlink or junction, and never delete dependencies in
an inherited linked directory. If a tool creates links/reparse points, stop and inspect
ownership and targets before cleanup. The helper performs no recursive cleanup.
Run tests: python -B -m unittest discover -s tests -v.
Tests create disposable local repositories under TMPDIR, with no remote or credentials.
Provenance
Rewritten from the supplied verification-workflow source, whose metadata declares
MIT licensing and machine-generated authorship (no named human author). Source notices
must be retained by the distributor where required; this summary does not replace a
license grant. This version removes the stale post-switch diff and shared-dependency advice.
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
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.

