next

A command that selects and runs the next unblocked task from one of two approved work plans: portfolio work or setup work. It then updates the plan’s progress record and stops.

In plain words
What is it for?
Use it to continue a planned development or configuration project one phase at a time, either by choosing a track or naming a specific task.
Why use it?
It avoids guessing which task should come next and prevents work from starting when required earlier tasks or safety checks are incomplete.

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/w2ur/claude-code-setup/next
Clone the repo
git clone --depth 1 https://github.com/w2ur/claude-code-setup
Per session 20 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,423 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00020 $0.01423
Opus 5 $0.00010 $0.00711
Sonnet 5 $0.00004 $0.00285
Haiku 4.5 $0.00002 $0.00142

Measured yesterday against content hash 8cb03d17cd1a, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

next scanned grade A with 1 finding 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 yesterday.

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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- **Verify against reality, not against the diff.** Where a done-when names a `curl`, run it after deploy. A fix that was never confirmed live is not a fix.
commands/next.md · 68 lines

How it starts

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

You are executing an approved multi-phase plan. Work one phase, verify it, update the ledger, stop.

Which track

$0 selects the track: A = portfolio (~/Dev), B = setup (~/.claude). A task id like A1.2 or B0 selects that track and that task. If $0 is empty, ask which track — do not guess.

  • Track A ledger: ~/.claude/plans/2026-07-25-progress-A.md
  • Track B ledger: ~/.claude/plans/2026-07-25-progress-B.md

Before doing anything, read your ledger's Cross-track rules section and obey it. In particular: a Track B task marked EXCLUSIVE mutates the tooling a Track A session would be using — agents, skills, hooks, plugins, memory. Before starting one, check whether a Track A session is open (ask the owner if you cannot tell). If one is, pick a non-EXCLUSIVE task instead, or stop and say so.

Read in this order — and stop reading when you have what you need

  1. Your track's ledger. Check the Gates and Cross-track rules, then find the first task that is todo and not gated. If $0 named a task id, do that one — but still check its gates and refuse if one is unmet.
  2. ~/.claude/plans/2026-07-25-portfolio-and-setup-master-plan.mdonly the section for that one task. The file is ~700 lines; reading it whole wastes the context you need for the work.
  3. Nothing else, unless a task explicitly points you at a file.

If a task says "execute the fresh-eyes plan", read that plan's phase — not all of it.

Context discipline — this is the actual job

The plan is far larger than one context window. Treat context as the scarce resource:

  • Do the work in subagents, not in your own context. Dispatch each atomic task to the implementer agent with the spec and its done-when criteria. Read the subagent's summary; do not pull its full output or the files it touched into your reasoning.
  • Never read a whole repo. Every task names its files. Go to them.
  • Never read Track C. It is a backlog, deliberately unscheduled. Pulling from it is the failure mode this plan exists to prevent.
  • Stop early rather than late. End the session when the phase is verified, or when context is roughly two-thirds consumed, or when you hit an owner-only blocker. A clean handover beats a half-finished phase.

Read the full file on GitHub · 68 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. yesterday First seen · 68 lines · 20 tokens per session scan A 8cb03d17cd1a

Subscribe to this mod's changes

next is a command published in the GitHub repository w2ur/claude-code-setup (2 stars, last pushed 9d ago), licensed MIT. It adds 20 tokens to every session and 1,423 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.