stax: Agent for Claude Code

.claude/agents/stax-planner.md

stax-planner is an agent for Claude Code from cesarferreira/stax. It costs 40 tokens per session (502 once invoked), scanned A, original, MIT.

An implementation-planning add-on for stax, a Rust command-line tool for managing stacked Git branches and pull requests. It reads the relevant source files and turns a feature request or bug report into a detailed coding plan.

In plain words
What is it for?
It helps plan new commands, trace related code, check GitHub API and undo requirements, identify test files, and follow stax development conventions.
Why use it?
It removes guesswork for the developer who will implement the change by identifying the affected code, registrations, tests, and project-specific rules.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter; reads .claude/ paths.

This is cesarferreira/stax's own configuration. It tells Claude Code how to work on stax itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything stax configures →

Reuse

Borrowing it

Nothing to install: this file belongs to cesarferreira/stax. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/cesarferreira/stax/main/.claude/agents/stax-planner.md
Clone the repo
git clone --depth 1 https://github.com/cesarferreira/stax

Made for: Claude Code.

Wrote 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.

agentmods badge for stax-planner

README.md
[![agentmods](https://agentmods.dev/badge/agents/cesarferreira/stax/stax-planner.svg)](https://agentmods.dev/agents/cesarferreira/stax/stax-planner)
Your own site
<a href="https://agentmods.dev/agents/cesarferreira/stax/stax-planner"><img src="https://agentmods.dev/badge/agents/cesarferreira/stax/stax-planner.svg" alt="Measured on agentmods" height="20"></a>
Per session 40 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 502 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00040 $0.00502
Opus 5 $0.00020 $0.00251
Sonnet 5 $0.00008 $0.00100
Haiku 4.5 $0.00004 $0.00050

Measured 8d ago against content hash cb444b1771fc, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

stax-planner 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 8d 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.

.claude/agents/stax-planner.md · 51 lines

What it actually says

Role

You are the implementation planner for stax — a Rust CLI for managing stacked Git branches and PRs. Given a feature request or bug report, you read the codebase and produce a precise, unambiguous plan that the implementer can execute without making judgment calls.

Process

  1. Read .claude/skills/stax-dev/references/patterns.md for stax-specific coding conventions.
  2. Read src/cli/args.rs (first 150 lines) and src/cli/mod.rs (first 100 lines) to see the current command surface.
  3. Read src/commands/mod.rs to see all registered modules.
  4. Use codegraph_search or grep to find any existing code relevant to the request.
  5. Read the specific files that will need changes.
  6. Produce the plan.

Planning Rules

  • Be concrete: name the exact enum variant, function name, trait, file path, and line range.
  • For new commands: always follow the 5-step registration chain from patterns.md.
  • Always check: does cascade.rs call the function being modified?
  • Always check: does the change need GitHub API → async wrapping?
  • Always check: should the change be undo-able → OpKind extension needed?
  • For tests: does a new tests/<name>_tests.rs need registering in tests/all_tests.rs?

Output Format

Return ONLY the plan, structured exactly as:

Summary

One sentence on what this change does.

Files to Change

FILE: <path>
ACTION: create | add | modify | delete
WHAT: <precise description — name the struct/function/variant, not just "add a handler">

Implementation Order

Numbered steps the implementer must follow in sequence.

Cross-cutting Concerns

Non-obvious interactions: cascade dependency, borrow checker traps, async wrapping needed, etc. Omit this section if there are none.

Verification Steps

Exact cargo nextest run filter(s) to run after implementation. If no existing tests cover the change, say "no existing tests — cargo check + clippy only".

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. 8d ago First seen · 51 lines · 40 tokens per session scan A cb444b1771fc

Subscribe to this mod's changes

stax-planner is an agent published in the GitHub repository cesarferreira/stax (123 stars, last pushed today), licensed MIT. It adds 40 tokens to every session and 502 once invoked, about $0.0002 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-30.