Skill
safe-experiment
Experiment with code changes in an isolated worktree. Changes can be reviewed and merged or discarded.
From not-my-reforgeInstall
1
Run in your terminal$
npx claudepluginhub speson/not-my-reforge --plugin not-my-reforgeTool Access
This skill is limited to using the following tools:
ReadGlobGrepBashWriteEditTask
Skill Content
You have the safe-experiment skill. When invoked, create an isolated worktree for experimental code changes.
Usage
/not-my-reforge:safe-experiment <description of experiment>
Protocol
Phase 1 — Setup Isolation
- Ensure the current working tree is clean (commit or stash pending changes)
- Create a new worktree:
git worktree add -b experiment/<timestamp> .claude/worktrees/experiment-<timestamp> HEAD - Switch to the worktree directory for all subsequent operations
Phase 2 — Experiment
- Implement the requested changes in the worktree
- Run build/test/lint to verify the changes work
- Document what was changed and why
Phase 3 — Review
Present results to the user:
## Experiment Results
### Changes Made
- file1.ts: description of change
- file2.ts: description of change
### Verification
- Build: PASS/FAIL
- Tests: PASS/FAIL (N tests)
- Lint: PASS/FAIL
### Diff Summary
(show `git diff --stat` from the worktree)
Phase 4 — Decision
Ask the user:
- Merge: Cherry-pick or merge changes back to the main branch
- Discard: Remove the worktree and branch cleanly
Merge Commands (if approved)
cd <original-cwd>
git merge experiment/<timestamp>
git worktree remove .claude/worktrees/experiment-<timestamp>
git branch -d experiment/<timestamp>
Discard Commands
git worktree remove .claude/worktrees/experiment-<timestamp> --force
git branch -D experiment/<timestamp>
Rules
- NEVER modify files in the main working tree
- ALL changes happen in the worktree
- Always verify with build/test before presenting results
- Clean up worktree after merge or discard
- If the experiment fails, explain why and suggest alternatives
Similar Skills
Stats
Stars2
Forks0
Last CommitFeb 26, 2026