agentleFS
nuncaeslupusnuncaeslupus/doc-control/.claude/skills/queue-next/SKILL.md

queue-next

Skill0 starsChanged 11 days agoMITView on GitHub

Claims the next unblocked queue task and runs the worker loop, optionally scoped by tag, workspace or title. Use when the user asks for the next queue task. Not for adding tasks, or a plain "continue".

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    3. Check nobody else holds it: Read the task's issue and skip it if it is closed, assigned, or labelled arsenal:claimed.

    line 45
  2. Very specific:

    If two capability classes share a suffix, write the token in full as class:value.

    line 74
  3. Distinctive:

    Empty scoped selection: if the global queue still has tasks, report what blocks the scope and offer to fall back to the global queue.

    line 92

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

queue-next

Picks the next unblocked task from the repository's task graph, claims it so no other agent takes it, and runs the worker loop — optionally scoped by tags, a workspace, a capability or a fuzzy title.

CANARY: queue-next-loaded-2026-06-13-fb78d23e-b2c3d4e5f6a7b8c9

When to load

  • The user types /queue-next, asks for "the next queue task" or to "run the workers", or writes WORKSPACE: Continue (equivalent to /queue-next WORKSPACE).
  • A bare "continue" or "resume" is not a trigger: in an ordinary conversation it means carry on with the work in hand, and claiming a task is a remote write. Load only when the session has no work in flight and the user means the queue.

The loop

1. Fetch the task issues as claude-arsenal/bin/session_start.sh does, into the same ARSENAL_ISSUES_JSON file (no body). Add state_reason where the surface returns it: without it, a closed issue reads as done unless it carries arsenal:cancelled.

2. Ask for the next task. One call, one line of output:

task_select.py --tasks-dir arsenal/tasks --issues /tmp/issues.json \
               --capability surface:cli --workspace FRONTEND --tag DOCS

task_select.py (in claude-arsenal/scripts/) applies deps, priority, capabilities and scope. It reads arsenal/session/surface_profile.json itself; add --capability access:browser when a browser appears in this session's own tools — the probe sees the machine, not the session's connectors. gate: false in its output means the task has no runnable gate; fix the task file before working it, since a prose gate checks nothing.

3. Check nobody else holds it. Read the task's issue and skip it if it is closed, assigned, or labelled arsenal:claimed.

4. Claim it with claim_task.sh <task-id> and obey the result exactly as claude-arsenal/AGENTS.md § Claiming — the contract says (lost → take the next task; error: → stop and tell the user).

Load references/claim-gotchas.md when a claim is refused, looks stale, or a task needs a retry attempt. In short: lost is final, stale claims are released only by queue_hooks.py sweep-claims, and a retry needs ARSENAL_CLAIM_STALE_OK=1 once the first attempt is known stale.

5. Work the task, then open its PR with open_task_pr.sh (AGENTS.md § Completion). A session told to push only to one designated branch passes --branch <that-branch>.

6. Loop back to step 2.

Scoping

Bare-word tokens are order-independent and resolved by membership, in this order; a task qualifies only if it satisfies every token:

the token matchesit resolves to
the suffix of a known capability--capability filter (HUMAN → access:human, CLI → surface:cli)
a known workspace--workspace filter (at most one)
a known tag--tag filter (several are ANDed)
nothing abovefuzzy title search

If two capability classes share a suffix, write the token in full as class:value.

A capability token always filters; it also grants the capability only where nothing can check it:

token namesgranted by the token?because
surface:*, services:*no — the probe decidesa cloud session cannot run work that needs a real terminal
access:browserno — the session's tools decidewith no browser connected, say so and stop
access:human, access:secrets, access:deviceyesnothing can probe them, so the person typing the token is the evidence

Gotchas

  • A task on an unmerged branch is not in the queue yet — task files are read from the default branch.
  • A task with no issue handle is invisible. arsenal-queue.yml opens handles automatically where installed; otherwise run handle_sync.py (in claude-arsenal/scripts/) and create the ones it lists.
  • Empty scoped selection: if the global queue still has tasks, report what blocks the scope and offer to fall back to the global queue.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.