work-next

work-next is a command for Claude Code from blackpaw-studio/leo. It costs 27 tokens per session (1,917 once invoked), scanned C, original, MIT.

A command that takes the next Todo card from a GitHub Kanban board and moves the related coding task through questions, planning, implementation, and a pull request. A Kanban board is a visual list of work stages.

In plain words
What is it for?
Use it to repeatedly process queued issues in the Leo repository, create changes in a clean main checkout, and push each completed task as a pull request.
Why use it?
It removes the need to manually choose the next task and coordinate each development step. It also checks that the repository and required GitHub access are ready before starting.

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/blackpaw-studio/leo/work-next
Clone the repo
git clone --depth 1 https://github.com/blackpaw-studio/leo

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 work-next

README.md
[![agentmods](https://agentmods.dev/badge/commands/blackpaw-studio/leo/work-next.svg)](https://agentmods.dev/commands/blackpaw-studio/leo/work-next)
Your own site
<a href="https://agentmods.dev/commands/blackpaw-studio/leo/work-next"><img src="https://agentmods.dev/badge/commands/blackpaw-studio/leo/work-next.svg" alt="Measured on agentmods" height="20"></a>
Per session 27 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,917 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 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.00027 $0.01917
Opus 5 $0.00014 $0.00958
Sonnet 5 $0.00005 $0.00383
Haiku 4.5 $0.00003 $0.00192

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

Security

Grade C, and why

work-next scanned grade C 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 4d 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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

- `rm -rf` worktrees. Leave them for post-mortem; they GC when `git worktree prune` runs after the branch is deleted.
.claude/commands/work-next.md · 236 lines

How it starts

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

/work-next — one iteration of the Leo kanban dev loop

You are the builder agent. A separate reviewer agent runs on PRs — your job ends when you push a PR.

This command does one iteration against the Leo Kanban board (https://github.com/orgs/blackpaw-studio/projects/3). A second agent runs /loop Nm /work-next to repeat. Do not loop inside this command.

Prerequisites (verify silently, abort with a clear message if missing)

  • gh CLI authenticated with project + repo scopes
  • git configured with push access to blackpaw-studio/leo
  • Working directory is a checkout of blackpaw-studio/leo on a clean main

Run these checks first. If anything fails, print the problem and stop.

gh auth status
git rev-parse --show-toplevel
git status --porcelain

Constants

  • Project number: 3
  • Project owner: blackpaw-studio (org)
  • Repo: blackpaw-studio/leo
  • Worktree root: ~/.leo/worktrees/leo

Fetch the board

Use gh project item-list 3 --owner blackpaw-studio --format json --limit 50 to pull all items. Filter client-side for status == "Todo" (single-select field Status). Sort by issue number ascending — lowest number is top of queue.

If no Todo items: print no cards in Todo — nothing to do and exit 0.

Pick one card

Take the first (lowest-numbered) Todo item. Call it $ISSUE. Capture:

  • issue_number
  • title
  • body
  • existing labels
  • all comments (via gh issue view $ISSUE --repo blackpaw-studio/leo --json body,comments,labels)
  • the project item id (for status updates)

State machine — decide what this iteration does

Evaluate in order. Each branch ends the iteration (no fall-through).

1. Card has label agent-skip

Skip it. Move on to the next Todo card. If none, exit.

2. Card has label needs-info and no new user comments since the last agent [needs-info] comment

Still waiting on the user. Skip. Take next Todo card.

3. Card has label needs-info and the user has replied since your last [needs-info] comment

Read the full file on GitHub · 236 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. 4d ago First seen · 236 lines · 27 tokens per session scan C 7bd39ac0dbbf

Subscribe to this mod's changes

work-next is a command published in the GitHub repository blackpaw-studio/leo (5 stars, last pushed 9d ago), licensed MIT. It adds 27 tokens to every session and 1,917 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.