From silver-bullet
Safely reverts SB phase/plan git commits with dependency checks, user confirmation, and automatic cleanup of STATE.md and plan artifacts.
How this skill is triggered — by the user, by Claude, or both
Slash command
/silver-bullet:silver-undo [--last N] [--phase NN] [--plan NN-MM] [--dry-run][--last N] [--phase NN] [--plan NN-MM] [--dry-run]The summary Claude sees in its skill listing — used to decide when to auto-load this skill
SB-owned undo workflow. Use when you need to roll back committed phase or plan
SB-owned undo workflow. Use when you need to roll back committed phase or plan
work while keeping .planning/ artifacts consistent with the codebase.
Do NOT use raw git revert or git reset on SB phase work — those operations
leave STATE.md and SUMMARY.md artifacts pointing to non-existent code. This
skill handles artifact cleanup atomically.
Produces a revert commit (or dry-run report) and updates:
STATE.md — resets phase status to pending or removes the plan from the
completed list.planning/phases/<phase>/ artifacts with a REVERTED: prefix in
the plan STATUS field so the history is traceableAfter completion:
SILVER BULLET > UNDO
Reverted: <scope description>
Commits reverted: <count>
Artifacts updated: STATE.md, <plan slugs>
Next: Phase <N> is now pending — re-run silver:execute when ready
| Flag | Behaviour |
|---|---|
--last N | Show the N most recent SB phase or plan commits and offer interactive selection |
--phase NN | Revert all commits associated with phase NN |
--plan NN-MM | Revert commits for plan MM within phase NN |
--dry-run | Show what would be reverted without making changes |
| (none) | Default to --last 10 interactive selection |
Before reverting, the skill checks:
Are any later phases or plans already executing? If a phase after the
target has commits, warn that reverting the earlier phase may break those
later phases. Require explicit --force acknowledgment.
Does the target phase have an open PR? If yes, warn that the revert will conflict with any open PR referencing this work. List the PR URL.
Are there uncommitted changes? Require a clean working tree before reverting (standard git requirement).
SILVER BULLET > UNDO.--last N or no flags: list the N most recent commits that match SB
phase/plan attribution patterns (commit messages with [phase:NN],
[plan:NN-MM], or authored by SB subagents). Present a numbered list.--dry-run, require the user to type yes or respond yes before
proceeding.STATE.md (or ROADMAP.md
when artifact cleanup requires it), create
${SB_RUNTIME_STATE_DIR}/roadmap-edit-override and remove it after updates.git revert --no-commit on each commit in reverse chronological order.
Create a single revert commit with a structured message:
revert(phase-NN): roll back <scope>
Reverts: <list of original commit SHAs>
Artifacts: STATE.md updated; SUMMARY.md files marked REVERTED
pending (or remove the
plan from the completed list).REVERTED: to the STATUS field in each affected SUMMARY.md.--force — these set up foundational artifacts.--dry-run.--force to
override and log the decision in the revert commit message.The skill is complete when:
git status).npx claudepluginhub alo-exp/silver-bullet --plugin silver-bulletGuides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.