Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add commands/muhimu/claude-plan-lifecycle/restackgit clone --depth 1 https://github.com/muhimu/claude-plan-lifecycleWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/commands/muhimu/claude-plan-lifecycle/restack)<a href="https://agentmods.dev/commands/muhimu/claude-plan-lifecycle/restack"><img src="https://agentmods.dev/badge/commands/muhimu/claude-plan-lifecycle/restack.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00053 | $0.03101 |
| Opus 5 | $0.00026 | $0.01550 |
| Sonnet 5 | $0.00011 | $0.00620 |
| Haiku 4.5 | $0.00005 | $0.00310 |
Grade A, and why
restack scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 218 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Restack
Run after one or more bottom PRs of a stack (created by /execute-plan
stacked mode) squash-merged to the default branch. Rebases every surviving
branch onto the new default-branch head (cascade), verifies the tip, and —
after a single confirmation — force-with-lease pushes the rebased branches
and retargets the new bottom PR to the default branch.
This command runs in the worktree holding the stack. It refuses to run in the main checkout.
Step 1 — Pre-flight checks
Run each check in order. On any failure, stop: print the message and end the turn.
- Inside a git worktree?
git rev-parse --is-inside-work-tree— if not, stop: "Not inside a git working tree." - Worktree, not main checkout?
git rev-parse --git-dir— if the output is.git(or an absolute path ending in/.git), stop: "This command refuses to run in the main checkout. Run it in the stack's worktree." - Not on the default branch? Resolve it once —
DEFAULT_BRANCH="$(git symbolic-ref --short refs/remotes/origin/HEAD 2>/dev/null | sed 's|^origin/||')", falling back togh repo view --json defaultBranchRef -q .defaultBranchRef.name; every later mention of$DEFAULT_BRANCHmeans this value. Thengit rev-parse --abbrev-ref HEAD— if it equals$DEFAULT_BRANCH(ormain/master), stop: "Worktree is on a protected branch. Check out a stack branch first." - Clean tree (tracked files).
git status --porcelain— ignore??(untracked) lines: whenlocal/is symlinked into the worktree,?? localis always present (the symlink isn't matched by thelocal/gitignore entry) and untracked files don't participate in a rebase. If any NON-??line exists, stop: "Worktree has uncommitted changes to tracked files. Commit or stash them first — restacking with a dirty tree is not supported." - Fetch.
git fetch origin --prune(prune so branches GitHub auto-deleted after merge disappear from remote-tracking refs).
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 4d ago First seen · 218 lines · 53 tokens per session scan A 8f21d2153e3f
restack is a command published in the GitHub repository muhimu/claude-plan-lifecycle (2 stars, last pushed 3d ago), licensed MIT. It adds 53 tokens to every session and 3,101 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other commands, from other repositories
create-pr
Rebase from the latest origin/main, squash the commits from it, and then create a PR on github with intelligent commit messages based on staged changes. Invoke with /create-pr.
push-and-release
Git pull, resolve conflicts, push, fix hook errors, then release.
release
Ship a stable cmux release built by CI: bump version, update changelog, open a PR, merge, tag, then GitHub Actions builds, signs, and publishes.
release
This compatibility command keeps /oh-my-claudecode:release available without loading the full release skill description in every Claude Code session.
release
Prepare a release by updating docs and bumping the version.
ship
Deliver the increment. Then go live with a rollback you have run.