next

A command that inspects the current repository and identifies the next step in a development workflow. A repository is the project’s files together with its Git history and related work records.

In plain words
What is it for?
Use it to check branches, uncommitted changes, task records, OpenSpec changes, and available pull or merge requests.
Why use it?
It saves time when you are unsure whether to create requirements, generate tasks, implement a change, open a review, or archive completed work.

Command for Claude Code

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/iolairus/borderlint/next
Clone the repo
git clone --depth 1 https://github.com/iolairus/borderlint

Made for: Claude Code.

Per session 12 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 555 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.00012 $0.00555
Opus 5 $0.00006 $0.00278
Sonnet 5 $0.00002 $0.00111
Haiku 4.5 $0.00001 $0.00056

Measured 2d ago against content hash 56dd9e638742, 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 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.

.claude/commands/next.md · 33 lines

What it actually says

Inspect the repository state and tell the user exactly where they are in the pipeline and what to do next. $ARGUMENTS may name a change or task to focus on; otherwise infer from the current branch, then from the most recently modified artifacts.

State inspection (run all, fast):

  • git branch --show-current, git status --short, unpushed commits (git log @{u}.. if upstream exists)
  • backlog/tasks/*.md frontmatter: status, change, draft IDs (-Dnn)
  • openspec/changes/: in-flight changes; for the focused one, openspec status --change <name> --json and unchecked items in tasks.md
  • Open PR if a platform CLI exists (gh pr status / glab mr list)

Decision table (first match wins):

State Suggest
Nothing in backlog, no in-flight change /start — guided entry: existing Jira ticket (/task-import), direct proposal (/opsx:propose), or create the task first (/task-new, /req-capture)
Discovery doc without tasks /task-generate <topic>
Tasks with status: draft /task-enrich <id> (list them)
Enriched tasks not exported and no change: /task-jira <id> (optional) and/or /opsx:propose
Change with incomplete artifacts continue /opsx:propose / /opsx:continue
Change complete but not reviewed /review-change <name>
Reviewed, but still on main/integration with no work branch gate: create the feature branch, then /opsx:apply
Unchecked steps in tasks.md /opsx:apply (list remaining steps)
Uncommitted working-tree changes /git-commit
All steps done, on feature branch, no PR /pr-open
PR open / work pushed on integration branch /ship
Change archived but task not done finish /ship close-out (task status, Jira transition)
Everything closed list pending tasks from the backlog, suggest the highest-priority one

Output format: three short sections — Where you are (one line), Next step (one command with why), Also possible (0–2 alternatives, e.g. optional Jira export). Be terse; no walls of text.

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 · 33 lines · 12 tokens per session scan A 56dd9e638742

Subscribe to this mod's changes

next is a command published in the GitHub repository iolairus/borderlint (7 stars, last pushed 9d ago), licensed MIT. It adds 12 tokens to every session and 555 once invoked, about $0.0001 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.