File d'attente AFK

VérifiéPrudence

Traite une file d'issues prêtes de façon autonome, chaque issue dans un sous-agent isolé avec contexte propre, sur une branche unique de commits locaux.

Spar Skills Guide Bot
DeveloppementIntermédiaire
08/08/2026
Claude Code
#afk#subagents#issue-tracker#batch-processing#git-branches

Recommandé pour

Synthèse automatique

Parcourt une file de tickets prêts pour un agent de façon autonome, en lançant un sous-agent à contexte vierge par ticket afin que la session d'orchestration ne conserve jamais plus d'un ticket d'historique.

Points forts

  • Contexte vierge par ticket : rien d'un ticket ne fuit vers le suivant et l'historique de l'orchestrateur reste minimal.
  • Création automatique d'une branche de lot (afk/1-3_7_20) avec échec bruyant si elle ne peut pas être créée, ce qui évite d'empiler les tickets sur main.
  • Une seule confirmation en amont pour tout le lot, au lieu d'une validation par ticket.
  • Mode parallèle optionnel via des worktrees, chaque worktree étant déjà isolé.

Limites

  • Suppose un tracker déjà configuré (docs/agents/issue-tracker.md) et les skills /start-issue et /commit ; aucun mode sans tracker.
  • Chaque ticket se termine par un commit local uniquement : pas de push, pas de PR.
  • Dépend de scripts et fichiers internes (ensure-branch.sh, BRIEF.md), donc peu portable hors de cet écosystème.
Quand l'utiliser

À utiliser quand plusieurs tickets sont en état ready-for-agent et que vous voulez les faire implémenter sans surveillance, l'un après l'autre ou en parallèle via des worktrees.

Quand l'éviter

À éviter si le tracker n'est pas configuré, si les tickets ne sont pas triés en ready-for-agent, ou si vous attendez un push ou une PR automatique.

Analyse de sécurité

Prudence
Score qualité88/100

The skill orchestrates code-modifying subagents and runs git/bash commands, but all actions are legitimate, user-confirmed upfront, and non-destructive; it does not exfiltrate data or disable safety.

Points d'attention
  • •Runs bash scripts (ensure-branch.sh) and git commands to create branches, stash, and commit changes.
  • •Spawns unattended subagents that implement code changes based on issue content, which could include arbitrary instructions from issue bodies.
  • •Offers to push and open a PR after the queue drains, but only with explicit user confirmation.
Comment cette analyse est faite

Exemples

Explicit issue list
Implement these 4 issues: #12, #13, #14 and #15
Ready-for-agent queue
Work through the ready-for-agent queue
Batch by issue references
Run the AFK queue on #20 #21 #22, sequentially

name: afk-queue description: Work through a queue of AFK-ready issues unattended, implementing each one in an isolated subagent that starts with a clean context — so nothing from one issue leaks into the next and the orchestrating session never accumulates unrelated history. Use when the user has several issues ready to implement and wants them worked through one at a time (or in parallel via worktrees), e.g. "implement these 4 issues", "work through the ready-for-agent queue".

AFK Queue

Runs a batch of issues to completion, one clean-context subagent per issue, so the orchestrating session's history never grows past a single issue's worth of work.

The issue tracker must already be configured (docs/agents/issue-tracker.md) — if it isn't, stop and tell the user to run /setup-matt-pocock-skills. Every issue is driven through the issue-based skills (/start-issue, /commit), so there is no trackerless mode.

1. Resolve the queue

  • If the user passed issue references (numbers, URLs, or #id) as arguments, use exactly those, in the given order.
  • Otherwise, query the tracker for open issues in the ready-for-agent state (see docs/agents/triage-labels.md), oldest first. If none exist, say so and stop — don't invent work.

2. Confirm before starting

This kicks off multiple unattended implementation runs — confirm once, up front, not per issue. Show the resolved queue (issue #, title), the execution mode (sequential by default — see Parallel mode below), the branch the batch will land on (see step 3), and that each issue ends in a local commit only (no push, no PR, nothing force/amended). Wait for a go-ahead.

3. Put the batch on its own branch

Only after the go-ahead, and only in sequential mode (in parallel mode each worktree is already isolated — see Parallel mode):

bash .claude/scripts/ensure-branch.sh afk <issue numbers, space-separated>

The script creates afk/<numbers> off the current branch only if that branch is a trunk (main, master, dev, develop, development, or the repo's default branch). Consecutive numbers collapse into ranges — 1 2 3 7 20 becomes afk/1-3_7_20, where - means "through" and _ separates items. Off a trunk it does nothing and the batch lands on the current branch, which is how you stack a queue onto a branch you already prepared.

Print the resulting branch name in the confirmation output so the user knows where the batch went. Unlike board-move.sh, this script fails loudly (exit ≠ 0) if it can't create the branch — stop the whole queue and report it. Aborting before the first subagent is far better than discovering N issues piled onto main.

Each subagent runs /start-issue, which calls the same script — but by then the session is already off the trunk, so it's a no-op and every issue in the batch stacks onto this one branch. That is what makes the batch a single multi-issue PR.

Toggle: AUTO_BRANCH=off in the env block of .claude/settings.json restores the old behavior (batch lands on whatever branch is checked out; create it yourself).

4. Work the queue

For each issue, in order:

  1. Fetch its full body, comments, and any existing "Agent Brief" comment (posted by /triage).
  2. Build a self-contained prompt from the template in BRIEF.md — fill in the issue content directly; the subagent has no access to this conversation. The brief has the subagent implement by driving /start-issue → /tdd → /commit, the same pipeline used interactively, with an explicit override for their "wait for confirmation" checkpoints (see BRIEF.md for exactly which checkpoints auto-approve vs. which are real blockers).
  3. Spawn it with the Agent tool, subagent_type: general-purpose.
    • Sequential (default): run_in_background: false — wait for it to finish before starting the next issue, since they share a working tree.
    • Parallel (opt-in): see Parallel mode.
  4. Take only the subagent's final report as output — do not pull its transcript or intermediate tool calls into your own context. That report is the handoff; there is nothing else to compact or clear.
  5. If the report says blocked, record why and move on to the next issue. Never spend your own context trying to unblock it — that judgment call belongs to the user.
  6. Sequential only — leave a clean tree before the next issue. Run git status; if it isn't clean (a blocked or partial subagent left uncommitted work), git stash push -u -m "afk-queue: #<N> <status>" and record the stash ref in that issue's row of the report. Never start an issue on a dirty tree — that is how one issue's changes leak into the next one's commit.

5. Report

After the queue drains, present one table: issue, status (done / blocked / partial), commit hash(es) or stash ref, one-line notes. Call out every blocked/partial issue by name so the user can triage them.

Then — and only then — offer to run /open-pr, which pushes the branch, opens one PR for the whole batch (its Closes #N footers are already in the commits) and moves those issues to In review. You ask this, once, after the queue drains: the subagents run unattended and have no one to ask, which is why they never push. If the user declines, stop; the commits stay local.

Parallel mode

Only when the user confirms the queued issues touch disjoint parts of the codebase (no shared files, no ordering dependency). Spawn each subagent with isolation: "worktree" and run_in_background: true, all in one message; each gets its own branch and working copy. Skip step 3 entirely — the worktree branches are the isolation, and an afk/ branch on top would never receive a commit. Each subagent's /start-issue is likewise a no-op there, since its worktree branch is already off the trunk. The brief pins every subagent to its own working tree; the first time you use this mode in a repo, run a single issue through it to confirm the worktree isolation holds before trusting a batch of N. When all finish, list the resulting branches/worktree paths instead of commit hashes — the user reviews and merges each independently.

Out of scope

  • No auto-push, no auto-PR, no auto-merge — always a human decision. Subagents never do any of it; the orchestrator only offers /open-pr at the end (step 5), and only after the user says yes.
  • Creates one branch for the whole batch (step 3), and only when starting from a trunk. It never creates a branch per issue in sequential mode — all issues stacking onto one branch is what makes a batch become a single multi-issue PR. Start from a non-trunk branch (or set AUTO_BRANCH=off) to pick the branch yourself.
  • No cross-issue resumability state file — if the batch is interrupted, re-invoke with the remaining issue numbers explicitly; recovery of any partial work is manual (check git log and git stash list).
  • Doesn't decide ready-for-agent vs ready-for-human — that's /triage's job. If an issue turns out not to be AFK-safe, the subagent should report blocked, not guess.

Du fichier au premier essai

Le téléchargement contient exactement le contenu affiché sur cette fiche. Cette copie peut différer de la dernière version du dépôt source.

Consulter la source et ses fichiers annexes

Ce téléchargement contient uniquement SKILL.md. Les scripts, références, modèles et dépendances éventuels ne sont pas inclus. Récupérez les fichiers nécessaires depuis la source en conservant leur arborescence avant de poursuivre.

1. Télécharger le fichier

Télécharger SKILL.md

Depuis la racine d’un projet de test, enregistrez le fichier sous .skill-downloads/afk-issue-queue-msjwk5qc/SKILL.md, ou utilisez la commande suivante. Ce dossier sert à examiner la skill avant son installation.

Commande pour macOS/Linux ou WSL : un shell POSIX et curl sont nécessaires. Sous Windows sans WSL, utilisez le bouton de téléchargement et créez le dossier manuellement.

mkdir -p '.skill-downloads/afk-issue-queue-msjwk5qc' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/afk-issue-queue-msjwk5qc/download' --output '.skill-downloads/afk-issue-queue-msjwk5qc/SKILL.md.part' && mv '.skill-downloads/afk-issue-queue-msjwk5qc/SKILL.md.part' '.skill-downloads/afk-issue-queue-msjwk5qc/SKILL.md'

2. Vérifier les prérequis

Lisez SKILL.md avant de l’utiliser. Si le fichier cite des scripts ou services externes, examinez-les et préparez les accès nécessaires dans votre environnement de test.

Aucune section de prérequis reconnue dans ce fichier. Cela ne signifie pas qu’il est autonome : les bibliothèques, outils et accès peuvent être cités ailleurs dans le contenu ou dans le dépôt source.

Les plateformes de la fiche sont des indications du catalogue. Les chemins ci-dessous suivent la documentation des outils ; ils ne prouvent pas que cette skill y a été exécutée. Aucune version minimale de ces outils n’est attestée pour cette fiche.

3. Charger la skill

Après vérification, copiez le dossier complet dans le projet avec l’une des commandes ci-dessous, puis ouvrez une nouvelle session de l’outil. La commande s’arrête si un dossier du même nom existe déjà : comparez les fichiers avant de le remplacer.

Claude Code
test -f '.skill-downloads/afk-issue-queue-msjwk5qc/SKILL.md' && test -s '.skill-downloads/afk-issue-queue-msjwk5qc/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/afk-queue' && cp -R '.skill-downloads/afk-issue-queue-msjwk5qc' '.claude/skills/afk-queue'

OpenSkills

OpenSkills doit déjà être installé. La procédure locale install/read est contrôlée avec OpenSkills 1.5.0, qui exige Node.js ≥ 20.6.0. Aucun slug du catalogue n’est résolu automatiquement.

Installation officielle d’OpenSkills
openskills install './.skill-downloads/afk-issue-queue-msjwk5qc'

openskills read 'afk-issue-queue-msjwk5qc'

La lecture doit afficher le contenu du fichier installé et son dossier de base. Elle ne lance ni la skill ni ses dépendances.

Pour un agent qui lit AGENTS.md, synchronisez ensuite l’index. Cette commande modifie AGENTS.md : relisez le diff avant de l’utiliser.

openskills sync

Mode manuel ou autre outil : joignez SKILL.md à une conversation, ou ouvrez-le dans un agent capable de lire les fichiers. Ajoutez les ressources annexes nécessaires. Il n’existe pas de dossier universel reconnu par tous les outils.

4. Faire un premier essai

Utilisez une entrée courte et fictive : un endpoint d’API, un petit document ou un brief d’interface. Dans une nouvelle conversation, joignez le fichier ou donnez son chemin à l’agent, puis adaptez cette demande :

Lis .skill-downloads/afk-issue-queue-msjwk5qc/SKILL.md et applique ses instructions à cet exemple : [décrire une entrée de test]. Indique les fichiers, dépendances ou accès qui manquent. Produis le résultat demandé par la skill sans inventer de données ni exécuter de script non examiné.

Résultat attendu : une sortie correspondant aux instructions de la skill, ou une liste précise des prérequis manquants. Une simple confirmation de lecture ne valide pas le premier usage. Si une ressource externe est indisponible, ce parcours reste à tester.

Skills similaires