next-task

A workflow for claiming and implementing the next ready GitHub issue. It uses isolated worktrees, which are separate working folders, so task changes do not interfere with the main checkout.

In plain words
What is it for?
Use it to select or claim a ready issue, create its worktree, read the issue and style guide, implement the requirements, run the configured gate, and create a pull request.
Why use it?
It prevents multiple developers or agents from taking the same task or modifying the same module at once. It also applies the issue's acceptance criteria and project checks before opening a pull request.

Skill for Claude CodeCodex

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 skills/blakemartz/delivery-loop/next-task
Any agent
npx skills add blakemartz/delivery-loop --skill next-task
Clone the repo
git clone --depth 1 https://github.com/blakemartz/delivery-loop

Made for: Claude Code, Codex.

Per session 61 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 995 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.00061 $0.00995
Opus 5 $0.00030 $0.00498
Sonnet 5 $0.00012 $0.00199
Haiku 4.5 $0.00006 $0.00100

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

Security

Grade A, and why

next-task 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 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.

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.

plugins/delivery-loop/skills/next-task/SKILL.md · 37 lines

How it starts

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

next-task — claim → implement → gate → PR

You are the implementer role from the delivery spec (${CLAUDE_PLUGIN_ROOT}/docs/agentic_delivery_spec.md, §3.3, §6). Read .claude/delivery.conf for GATE_CMD (default bash scripts/check.sh), STYLEGUIDES_DIR, and BASE_BRANCH.

Protocol (in order; scripts own the mechanics — never re-derive them)

  1. Pick. bash "${CLAUDE_PLUGIN_ROOT}/scripts/task-queue.sh" — take the first line (or the issue number given as an argument, if it's in the ready set). Empty ready set → report and stop. Module cap: skip a task if another open PR or claimed task carries the same module: label.
  2. Claim. bash "${CLAUDE_PLUGIN_ROOT}/scripts/claim-task.sh" <n> agent-$(date +%s). Nonzero exit = you lost the race or it's not claimable: report and stop. Never work on an issue assigned to anyone else.
  3. Worktree. path=$(bash "${CLAUDE_PLUGIN_ROOT}/scripts/task-worktree.sh" <n>) — do ALL work inside $path. Never touch the main checkout.
  4. Read. gh issue view <n> — the Context and Acceptance criteria are the whole contract. Read the relevant styleguide in STYLEGUIDES_DIR before writing code. Match existing patterns.
  5. Implement to the acceptance criteria, and implement it well: among the solutions that satisfy the criteria, pick the best-practice, idiomatic one for the stack (spec §2.1). Nothing more — scope creep in an agent loop is a merge-conflict machine. If satisfying a criterion seems to require a non-best-practice solution (a workaround, an anti-pattern), don't silently ship it — comment on the issue and, if it blocks a clean solution, escalate per If blocked. Keep the gate honest: if your change introduces a linter, test suite, or build step, extend the gate (GATE_CMD / scripts/check.sh) to cover it — this is how "correct" grows with the repo.
  6. Verify. Run EVERY acceptance criterion literally, plus the gate (GATE_CMD). All must pass. Capture the passing output lines — they're your PR evidence.
  7. Re-verify claim. gh issue view <n> --json assignees — you must still be the sole assignee. If not, stop and report (someone reclaimed it).
  8. Commit & push from the worktree. If the repo installs git hooks, they fire — never bypass the gate (--no-verify). If a hook fails, fix the cause. Rebase onto origin/$BASE_BRANCH first if behind.
  9. PR. gh pr create --title "<task title> (#<n>)" --body ... following the repo's PR template if present: Closes #<n>, summary, acceptance-criteria checklist with evidence per criterion, gate status, Agent-authored (model: <your model>). Add label agent-authored.
  10. Labels. gh issue edit <n> --add-label status:in-review --remove-label status:claimed.
  11. Report the PR URL.

Read the full file on GitHub · 37 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 · 37 lines · 61 tokens per session scan A d40b7aeee78b

Subscribe to this mod's changes

next-task is a skill published in the GitHub repository blakemartz/delivery-loop (4 stars, last pushed 1mo ago), licensed MIT. It adds 61 tokens to every session and 995 once invoked, about $0.0003 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.

Related

Other skills, from other repositories

eliza-app-development

Use when building or changing an elizaOS-based application in this repository. Covers eliza app architecture, monorepo layout, local versus remote versus cloud routing, where to edit features, and non-negotiable runtime constraints. Eliza is the product name of this particular eliza app checkout.

elizaOS/eliza · 65 tokens

live-verify

Two-part gate for gflow-cli feature/fix work. Part 1 (Pre-flight): use when starting work on a gflow-cli feature or fix — confirms the checkout reflects current develop before investing effort. Part 2 (Live-verify): use before claiming gflow-cli work done, especially anything touching a generation code path…

ffroliva/gflow-cli · 100 tokens

generate-domain-model

Generate a complete Mendix domain model in MDL — entities, attributes, associations, enumerations — and validate it. Use when asked for a domain model for a business area (e-commerce, HR, CRM, …) rather than a single entity.

mendixlabs/mxcli · 55 tokens

business-context

Maps a business type the user mentions (coffee shop, restaurant, e-commerce, clinic, gym, hotel, school and more) to its industry-standard feature set — POS, inventory, orders, booking, reports, staff — and auto-includes those features with no questions asked. Fuels zero-question planning for /toh-vibe and /toh-plan…

wasintoh/toh-framework · 84 tokens

pr

Open a pull request from the current worktree — verify green, commit scoped, push, and write the PR from the actual diff. Trigger on "/pr", "open a PR", "make a pull request".

ra3orblade/swarm · 45 tokens

payram-checkout-integration

Integrate PayRam checkout flow into web applications. Generate payment links, embed payment pages, handle redirects, and process payment confirmations. Supports Express, Next.js, FastAPI, Laravel, Gin, Spring Boot. Use when adding crypto checkout to e-commerce, building payment forms, implementing deposit flows, or…

PayRam/payram-mcp · 75 tokens