/superpowers:finishing-experiment-branchfrom superpowers
Handles the keep/discard/pause decision for an experiment branch: merge locally, push and create PR, pause, or discard with worktree cleanup.
Ships in superpowers. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Execute the keep/discard/pause decision for an experiment branch and clean up the worktree.
Announce at start: "I'm using the finishing-experiment-branch skill to handle the experiment branch."
experiment-closeout must have already:
docs/experiments/results/YYYY-MM-DD-<topic>.md.This skill handles git mechanics. It does NOT duplicate the documentation or decision-asking from experiment-closeout.
Check that docs/experiments/results/YYYY-MM-DD-<topic>.md exists and can survive cleanup. If it exists only in the experiment worktree or experiment branch, copy it into the main working tree on the base branch before any destructive cleanup. If no experiment note exists anywhere, refuse to proceed and redirect to experiment-closeout.
.worktrees/<topic>/.experiment-metadata.json if available.<original-repo-root>), worktree path, base branch, experiment branch, and note path.[ "$(git rev-parse --git-common-dir)" != "$(git rev-parse --git-dir)" ]
experiment-worktree was not used).If the decision was already made by experiment-closeout, execute it directly. If invoked standalone, present exactly these options:
Experiment complete. What would you like to do?
1. Merge experiment branch into <base-branch> locally
2. Push and create a Pull Request
3. Keep the branch as-is (pause, handle later)
4. Discard this work
pytest or project-specific command).git merge exp/<YYYY-MM-DD>-<topic>
git worktree remove .worktrees/<topic>
git branch -d exp/<YYYY-MM-DD>-<topic>
<base-branch> at commit <hash>."git push -u origin exp/<YYYY-MM-DD>-<topic>
gh pr create --title "exp: <topic>" --body "$(cat <<'EOF'
## Experiment
See docs/experiments/results/YYYY-MM-DD-<topic>.md
## Summary
<hypothesis and outcome from experiment note>
## Test Plan
- [ ] Verify metrics match experiment note
- [ ] Reproducibility check passed
EOF
)"
Branch exp/<YYYY-MM-DD>-<topic> preserved.
Worktree at .worktrees/<topic>.
Resume with finishing-experiment-branch when ready.
This will permanently delete:
- Branch: exp/<YYYY-MM-DD>-<topic>
- All commits since <base-commit>
- Worktree at .worktrees/<topic>
Type 'discard' to confirm.
<original-repo-root> and switch to <base-branch>.docs/experiments/results/YYYY-MM-DD-<topic>.md exists there.<original-repo-root>.<original-repo-root> with: "Code discarded. Branch deleted."<original-repo-root> with git status --short docs/experiments/results/YYYY-MM-DD-<topic>.md.<original-repo-root>, remove the worktree and branch:
cd <original-repo-root>
git worktree remove .worktrees/<topic> --force
git branch -D exp/<YYYY-MM-DD>-<topic>
git status, confirm on base branch.If no worktree is active (experiment ran directly on a branch without experiment-worktree):
Report three things:
.experiment-metadata.json for symlinked_data. Verify that listed paths are symlinks ([ -L <path> ]), not real directories. git worktree remove deletes symlinks safely (targets are untouched), but never rm -rf a worktree directory manually — use git worktree remove to avoid accidentally following symlinks into real data.Called by: experiment-closeout (steps 5 and 6)
Pairs with: experiment-worktree (cleans up what that skill created)
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
experiment-branch, worktree, merge, pr-creation, branch-cleanup
npx claudepluginhub shunyangliu/superpowers_dl --plugin superpowers11 skills in this plugin
/experiment-closeoutUse when an experiment run has finished and you need to decide whether to keep the code changes, revert them safely, and archive the outcome to avoid repeating the same failed experiment/experiment-designUse before changing a model, loss, optimizer, dataset pipeline, augmentation, or evaluation protocol for deep learning research work/experiment-executionUse when carrying out a written deep learning experiment plan, implementing experiment scaffolding, or running batches of research experiments/experiment-planningUse when an approved deep learning experiment design needs a concrete multi-step plan covering code changes, sanity checks, runs, and artifact capture/experiment-worktreeUse when an experiment plan is about to be executed and code changes need git isolation - creates an isolated git worktree with DL environment verification so failed experiments can be cleanly discarded/paper-to-implementationUse when translating a paper idea into code, deciding whether a paper is worth reproducing, or planning a faithful paper-based experimentOther plugins' skills for the same job