work-beads

A workflow for completing tasks from a project’s Beads queue, an issue list where work items can be claimed and tracked through completion.

In plain words
What is it for?
Use it to pick up one or more backlog tasks, build them in separate worktrees, verify the changes, send them through review, and enqueue them for merging.
Why use it?
It coordinates claiming, isolated development, checking, review, merging, and closing tasks so work does not overlap or get left unfinished.

Skill for Claude CodeCodex

Part of the scaffold plugin — 5 skills, 1 agent, 1 hook shipped together

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/zigrivers/scaffold/work-beads
Any agent
npx skills add zigrivers/scaffold --skill work-beads
Clone the repo
git clone --depth 1 https://github.com/zigrivers/scaffold

Made for: Claude Code, Codex.

Or install scaffold, the plugin that ships this one along with the rest of its 5 skills, 1 agent, 1 hook.

Per session 106 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 8,399 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.00106 $0.08399
Opus 5 $0.00053 $0.04200
Sonnet 5 $0.00021 $0.01680
Haiku 4.5 $0.00011 $0.00840

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

Security

Grade A, and why

work-beads 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 3d 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.

content/agent-skills/work-beads/SKILL.md · 505 lines

How it starts

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

Work Beads

Work the Beads queue with the ship loop. Multiple agents run this concurrently with no memory of each other — the loop is self-contained on purpose; do not skip steps.

The loop contract (memorize this):

set identity once, then repeat up to N times (one bead in flight per agent):
  refresh view -> select ONE bead -> claim atomically, then validate (lost the
  claim? next candidate; dup/conflict? cooldown-release + next) -> worktree
  -> build (draft PR on first push; renew lease on each push)
  -> verify (make check-affected) -> review (mmr, 3-round cap)
  -> enqueue (make mq-enqueue) and move on -> daemon lands + closes the bead
batch end (budget spent, queue drained, or P0/blocker): report in the slots

The agent's finish line is a green gate + passing review + the PR ENQUEUED — the merge-queue daemon batches, lands, and closes the bead; do not wait for the merge or bd close an enqueued bead yourself. (No merge queue installed? Land via the serialized merge slot instead — same finish line, you just do the merge.) Standing authorization: run the whole loop without asking permission. Do not end your turn after opening a draft PR with a list of "next steps" — that is the #1 observed agent failure. The only mid-loop stops: a verified, still-reproducing P0, or a blocker you can name.

Invocation: /work-beads (1 bead) · /work-beads N (up to N beads, selected one at a time at claim time — N is a budget, not a reservation; never pre-pick a list) · /work-beads N <label> (same, scoped to a label) · /work-beads <id> [<id>...] (explicit IDs, worked in dependency order).

Step 0 — Orient (once per batch, read-only, from the primary checkout)

The primary checkout is the first entry of git worktree list. Run:

bd ready && bd stats
gh pr list --state open        # open + draft PRs = live registry of what others build
git worktree list
make doctor                    # wedged home base? make doctor-fix (unattended-safe)

Read the full file on GitHub · 505 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. 3d ago First seen · 505 lines · 106 tokens per session scan A d0a81b05f94b

Subscribe to this mod's changes

work-beads is a skill published in the GitHub repository zigrivers/scaffold (5 stars, last pushed 3d ago), licensed MIT. It adds 106 tokens to every session and 8,399 once invoked, about $0.0005 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.