work-queue
Drains the ready and changes-requested issue queue unattended, running implement then work-review on each eligible issue under a single-flight lock, up to a per-run cap. Use when asked to drain the qu
Files1
View on GitHubSKILL.mdskills/work/work-queue/SKILL.md
GitHubwork-queue
Drain the ready and changes-requested issues unattended, one at a time, under a lock.
When to use
- Asked to batch-process, drain or auto-run the work loop.
- A single named issue: use
implementorwork-reviewdirectly instead.
Steps
- Config
workisfalse: stop, tell the user the work loop is disabled for this repository. - Acquire the single-flight lock:
mkdirat$(git rev-parse --git-common-dir)/agent-skills/work.lock. Held: stop, report the lock as held. - Stamp the owner file inside the lock directory with host and a
refreshedepoch timestamp, written through a temp file and renamed into place. - Build the queue: every issue
readyorchanges requested, withoutneeds triage, ordered by configpriority. needs triagenext toreadyorchanges requested: skip the issue, name the contradiction in the report, do not label or touch it.- Nothing eligible: release the lock, report an empty run.
- Loop up to config
work.capissues: runimplementon the issue, thenwork-reviewon the same issue once it reachesreview requestedand CI on its head commit has finished. A reviewer that reportsboundary: run the review again asreviewer-boundary. Small issues with no overlap in files may share oneimplementer, seeagents. - Re-stamp the owner file's
refreshedtimestamp once per iteration. - Continue on
blocked,changes requestedorneeds human. Stop the whole run only on a hard error. - After the cap, or when nothing eligible remains: release the lock with
rm -rf, explicitly, not on a trap. - Report a table: issue, outcome, pull request.
- Any open question that would need a human: comment it on the issue, never ask the user.
Guardrails
disallowed-tools: AskUserQuestion. This skill never asks, it comments on the issue instead.- The queue is built from
readyandchanges requestedonly. An issue parked atneeds humanorblockedis never in it, so a non-independent review's terminal state stops the loop for real instead of spinning on the same issue. - One lock per checkout. A held lock stops the run, it is never broken.
- A
refreshedtimestamp older than three hours marks the lock stale:rm -rfit and retake. Younger: the run is live, stop and report. - The cap is a hard limit on the run, applied after ordering.
- Contradictory labels are reported, never resolved by picking one.
- This skill never sets
ai: readyand never removesneeds triage. The rule that lets a request naming the work do so, seeimplementstep 1, never applies here.
Config
Reads .agent-skills.json through the snippet in ~/.claude/skills/README.md.
work:falsedisables the work loop entirely.work.cap: maximum issues one run works. Default5.priority: ordering for the queue.labels.needsTriage,labels.ready,labels.changesRequested: defaults in~/.claude/skills/README.md.
References
- Claim, implement and push:
implementskill. - Review and verdict:
work-reviewskill.