Borrowing it
Nothing to install: this file belongs to cbmono/ai-setup. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/cbmono/ai-setup/main/.claude/commands/stack.mdgit clone --depth 1 https://github.com/cbmono/ai-setupWrote 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/cbmono/ai-setup/stack)<a href="https://agentmods.dev/commands/cbmono/ai-setup/stack"><img src="https://agentmods.dev/badge/commands/cbmono/ai-setup/stack/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/commands/cbmono/ai-setup/stack"><img src="https://agentmods.dev/badge/commands/cbmono/ai-setup/stack.svg" alt="Reviewed on agentmods" width="80" 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.1 | $0.00000 | $0.00764 |
| Opus 5.5 | $0.00000 | $0.00306 |
| Sonnet 5.5 | $0.00000 | $0.00153 |
| Haiku 4.5 | $0.00000 | $0.00076 |
Grade A, and why
stack 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 2mo 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 — 29 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Manage a stacked-PR workflow using GitHub's gh stack extension.
Usage
/stack— no args → dispatch thestack-navigatoragent for a summary + recommended next action/stack <action> [args]— run the specific action below
Actions
Each maps to a real gh stack subcommand (run gh stack --help to see the full surface).
view(alias:status) —gh stack view, then summarize: current branch, position in stack, PR numbers and CI state. If not in a stack, say so and suggestinit.init <branch>—gh stack init <branch>. Confirm the stack root was created.add <branch>—gh stack add <branch>. Remind the user to commit before the nextsubmit.submit—gh stack viewfirst (show what will be pushed), thengh stack submit. Report PR URLs.sync—gh stack sync(fetch + rebase + push + sync PR state). On rebase conflict, stop and hand back to the user with a clear summary. Do not resolve conflicts silently.rebase—gh stack rebase. Same conflict rule as sync.merge— confirm the bottom PR is green, thengh stack merge. After it merges, rungh stack syncso the rest rebases onto the new base. If the stack is now empty (or only the base branch remains), list any files in.claude/plans/and ask the user which (if any) to delete — the merged stack may have produced one. Where possible, highlight the likely candidate by matching plan filenames against Jira keys / branch names from the merged commits.up [n]/down [n]/top/bottom— navigate viagh stack up/down/top/bottom. Confirm the new branch.unstack— confirm with the user before runninggh stack unstack— it removes the stack locally and on GitHub.
Guardrails
- Never pass
--force-style flags that aren't already the default.gh stack pushalready builds an explicit per-branch--force-with-leaserefspec, so there is nothing to add. gh stack pushis not atomic — a multi-branch push can partially succeed. It pushes without--atomic(upstreamcmd/push.go; recentgh stack push --helpstates it outright: "a branch may update even if another branch is rejected"). So when a push comes back non-zero, don't report it as "the push failed": say that some branches may already be updated on the remote, name the ones the output shows as pushed and the one that was rejected, and rerun only after the rejection is resolved — a blind rerun re-pushes what already landed and buries which lease actually failed. Don't generalise fromgh stack sync, which does push atomically (--force-with-lease --atomic).- If
ghisn't authenticated (gh auth statusnon-zero), tell the user to rungh auth loginand stop. - If the extension isn't installed (
gh extension listdoesn't includegithub/gh-stack), tell the user to rungh extension install github/gh-stackand stop. - For
submit/sync, always show the stack view first so the user sees what's about to happen.
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.
- 2mo ago First seen · 29 lines · 0 tokens per session scan A 2402eee81e31
stack is a command published in the GitHub repository cbmono/ai-setup (2 stars, last pushed 10d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 764 tokens. 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
merge-conflict-analysis
You are analyzing merge conflicts for PR #${{ pr-number }}.
release-notes
Generate consistent, well-structured release notes from git history. Triggered on release tags following semver patterns (v..) to produce categorized changelog with breaking changes, features, fixes, and contributor attribution.
commit
A command that examines staged Git changes and proposes a commit message using the Conventional Commits format, such as feat, fix, or docs. Git is a tool for tracking changes to code.
repo-audit
Audit a codebase (local or remote GitHub/GitLab) against architecture principles and requirements, surfacing drift, risk, and missing decisions.
pr
Handle the full workflow from current branch state to an open, CI-monitored pull request.
codex-review
Use when asked to check, turn on, turn off, or switch this repo's Codex review mode (local, github, or off), or to report the effective mode and Codex sandbox status.