reference

A complete reference for the commands provided by a stack-management tool. A stack is a group of related Git branches or pull requests arranged in dependency order.

In plain words
What is it for?
Use it to look up commands for managing stacked changes, Git branches, pull requests, remote stacks, and diagnostic tracing.
Why use it?
It makes the tool’s full command set available in one place, including options for viewing, submitting, synchronizing, merging, and linking stacks.

Command

Install

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.

agentmods
npx agentmods add commands/cesarferreira/stax/reference
Clone the repo
git clone --depth 1 https://github.com/cesarferreira/stax
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 10,824 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.10824
Opus 5 $0.00000 $0.05412
Sonnet 5 $0.00000 $0.02165
Haiku 4.5 $0.00000 $0.01082

Measured 2d ago against content hash 76e965ca4468, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

reference 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 2d 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.

docs/commands/reference.md · 549 lines

How it starts

The opening of the file, as written. The whole thing — 549 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Full command reference

The complete command surface. For day-to-day commands only, see Core commands. For navigation specifically, see Navigation.

Global diagnostics

Add --trace before or after any subcommand to print instrumented Git subprocess timings, the summed Git time, and command wall time. URL- and token-shaped arguments are redacted.

st --trace status --json >/dev/null

Stack operations

Command Alias Description
st status ls Show stack
st ll Show stack with PR URLs and full details
st log l Show stack with commits and PR info
st submit ss Submit full current stack
st stack link Register the current PR stack as a native GitHub Stack via gh stack link
st stack unlink [<stack-number>] Unstack a remote native Stack by number, or the active locally tracked stack when omitted
st merge Cascade-merge from bottom to current (see flags below)
st merge-when-ready mwr Backward-compatible alias for st merge --when-ready
st sync rs Pull trunk, delete merged branches (incl. squash merges), reparent children
st sync --restack rs --restack sync plus rebase current stack onto updated parents
st sync --delete-upstream-gone Also delete local branches whose upstream tracking ref is gone
st sync --stash rs --stash Stash the current working tree before sync starts without prompting; works with --quiet and --json; does NOT auto-confirm branch deletions; conflicts with --no-stash at parse time
st sync --no-stash rs --no-stash Fail if the working tree is dirty; overrides --force; conflicts with --stash at parse time
st sync --dry-run / st sync --plan Preview what sync would do — ls-remote only, no fetch/stash/ref-writes/push/metadata writes; always exits 0; composes with --restack, --delete-upstream-gone, --safe; --force, --auto-stash-pop, --full, --stash, --no-stash, and --verbose emit a warning and are otherwise ignored; --continue is rejected
st sync --dry-run --json Same as --dry-run but emits a single JSON document (kind: "sync_plan", schema_version: 1, dry_run: true) instead of human text
st sync --json Emit the sync result as a single JSON document (kind: "sync", schema_version: 1); implies non-interactive; failures emit JSON + non-zero exit; conflicts with --continue
st sweep Classify all local branches as merged / upstream-gone / stale / active (read-only by default)
st sweep --delete Delete merged branches (including tracked merged PRs) and upstream-gone branches with no unique work after confirmation
st sweep --delete --include-stale Also delete stale branches (older than --stale-days / branch.stale_days config key)
st sweep --delete --force Skip confirmation prompt
st sweep --stale-days <N> Override stale threshold in days (default: 30)
st sweep --json Machine-readable branch classification (conflicts with --delete)
st refresh r Sync trunk without merged-branch cleanup, restack, then push and create/update PRs for the current stack
st refresh --force --yes --no-prompt Run the full refresh flow without sync or submit prompts
st refresh --verbose Same as st refresh, with detailed sync/restack/submit timing
st refresh --all-stacks Refresh every stack in the repo (fetch/trunk sync once, then restack + submit each stack); stops at the first conflict
st restack Rebase current stack locally — auto-normalizes missing/merged parents; --stop-here limits scope
st cascade Restack the stack and submit updates, without fetching trunk (offline-friendly)
st diff Show per-branch diffs vs parent
st range-diff Show range-diff for branches needing restack
st stack s Stack command namespace for submit and restack (st stack submit, st stack restack)

Read the full file on GitHub · 549 lines

Changes

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.

  1. 2d ago First seen · 549 lines · 0 tokens per session scan A 76e965ca4468

Subscribe to this mod's changes

reference is a command published in the GitHub repository cesarferreira/stax (123 stars, last pushed 2d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 10,824 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-30.