loop
Ce qu’il fait
Elle met en place une invite répétée, par exemple la vérification d'un build ou d'une demande de fusion, à intervalle régulier ou à rythme libre. Elle s'adresse aux personnes qui veulent qu'une tâche soit surveillée ou répétée sans la relancer à la main à chaque fois.
Quand l’utiliser
- ✓Quand vous voulez qu'une tâche, comme la vérification d'un build, soit répétée toutes les quelques minutes.
- ✓Quand vous voulez qu'une demande de fusion ou un déploiement soit contrôlé à nouveau selon un calendrier précis.
- ✓Quand vous voulez lister ou annuler les boucles répétées qui tournent.
Lien du skill
https://github.com/QwenLM/qwen-code/blob/main/packages/core/src/skills/bundled/loop/SKILL.mdCopiez-le et collez-le dans votre IA (Claude, ChatGPT ou Cursor) en lui demandant de suivre les instructions.
Comment l’utiliser
Le plus simple : copiez le message et collez-le dans votre IA. Elle lit le skill et suit les instructions.
Message prêt à coller
Pour Claude Code, Codex ou Cursor : lancez-la dans le dossier du projet et le skill est installé.
Téléchargez le SKILL.md et placez-le dans le dossier de skills de votre agent.
Exemple de demande à votre IA
“Je voudrais que le build soit vérifié toutes les 10 minutes, et être prévenu dès qu'il échoue.”
5 nouveaux skills par semaine. 1 minute de lecture.
Comment ça marche
L'agent analyse l'intervalle et l'invite, l'exécute une première fois tout de suite, puis planifie les relances. Les sous-commandes de liste et d'effacement affichent ou annulent les tâches en cours.
Contenu technique (SKILL.md original)
Texte original de l’auteur, en anglais, directement depuis GitHub.
/loop — run a prompt repeatedly
Subcommands
If the input (after stripping the /loop prefix) is exactly one of these keywords, run the subcommand instead of scheduling:
list— call CronList and display the results. Done.clear— call CronList, then call CronDelete for every job returned. Confirm how many were cancelled. Done.
Parsing
Parse the input after removing the /loop prefix:
- Empty input (no prompt, no interval): the autonomous path — run a self-paced autonomous loop. See the Autonomous mode section.
- Leading interval token: if the first whitespace-delimited token matches
^\d+[smhd]$(e.g.5m,2h), this is the fixed-interval recurring path. The rest is the prompt. - Trailing "every" clause: otherwise, if the input ends with
every <N><unit>orevery <N> <unit-word>(e.g.every 20m,every 5 minutes,every 2 hours), this is the fixed-interval recurring path. Extract that interval and strip it from the prompt. Only match when what follows "every" is a time expression —check every PRhas no interval. - Prompt-only input: otherwise, the entire input is the prompt and this is the prompt-only self-paced path.
If an interval was given but the prompt is empty (e.g. /loop 5m), this is a fixed-interval autonomous loop — see the Autonomous mode section.
Examples:
5m /babysit-prs→ fixed interval5m, prompt/babysit-prs(leading interval token)check the deploy every 20m→ fixed interval20m, promptcheck the deploy(trailing "every" clause)run tests every 5 minutes→ fixed interval5m, promptrun tests(trailing "every" clause)check every PR→ prompt-only self-paced path, promptcheck every PR("every" is not followed by a time expression)check the deploy→ prompt-only self-paced path, promptcheck the deploy- (empty) → self-paced autonomous loop (sentinel
<<autonomous-loop-dynamic>>) 5m→ fixed-interval autonomous loop (interval5m, sentinel<<autonomous-loop>>)
Prompt-only self-paced path
Use this path only when the user supplied a prompt and no interval.
- Do not call CronCreate for this path.
- If this tick opens with a
<task-notification>block (a monitor or background event re-invoked you, not a bare/loopwakeup prompt), handle that event before re-running the prompt.- If the notification says the watched condition was met, cancel any pending fallback LoopWakeup with CronDelete if you still have its ID, then finish the loop.
- If a monitor auto-stopped on idle or max-events, restart it once if the watch is still useful, re-arm the fallback, report the restart count to the user, and include that count in the LoopWakeup prompt or reason (for example,
monitor restarted 1/1 time) so it survives context compaction. If it auto-stops again on the next tick, end the loop and report the repeated auto-stop to the user. - If the signal is ambiguous, re-arm a shorter follow-up and investigate on the next tick. If the signal remains ambiguous for three consecutive ticks, end the loop and report that the watch could not reach a clear conclusion.
- Run the parsed prompt immediately now.
- If it is a slash command, invoke it via the Skill tool.
- Otherwise, act on it directly.
- Before ending the turn, decide whether another check is useful.
- Call LoopWakeup only if continued follow-up is useful.
- Do not call LoopWakeup if the task is complete.
- Do not call LoopWakeup if the task is blocked on user input or external state that cannot be checked later.
- Do not call LoopWakeup just to keep polling when no useful next check exists.
- If you started a background agent or a Monitor, it wakes you via a terminal
<task-notification>on exit, failure, cancellation, or monitor auto-stop — so set LoopWakeup as a long fallback rather than a short poll. Do not omit it just because something is watching: the work may hang, or a Monitor may auto-stop on idle or max-events (and one owned by another agent routes its notification only to that agent). Omit LoopWakeup only on the terminal conditions above (complete, blocked, or repeated monitor auto-stop).
- When scheduling a continuation, call LoopWakeup with:
delaySeconds: the next useful delay in seconds. The runtime clamps to 60–3600 (1–60 min); follow the tool's own guidance on picking a value — it accounts for the prompt-cache window and for the fallback-heartbeat case when a background task will wake
Questions fréquentes
Comment voir mes boucles en cours ?
Utilisez la sous-commande de liste, qui affiche les tâches planifiées.
Comment toutes les arrêter ?
Utilisez la sous-commande d'effacement, qui annule toutes les tâches planifiées.
Et si je ne donne pas d'intervalle ?
L'agent lance une boucle à rythme libre et choisit lui-même le moment de chaque relance.
Détails
Description originale de l’auteur
Create a loop that runs a prompt now and follows up either on a fixed schedule or through self-paced wakeups. Usage - /loop check the build, /loop 5m check the build, /loop check the PR every 30m. /loop list to show jobs, /loop clear to cancel all.
repo: QwenLM/qwen-code
Popularité
- Étoiles GitHub
- 29k
- Position au classement
- #9782
- Licence
- Apache-2.0
- Mis à jour
- 02/11/2026
Commentaires
- …
Autres skills de ce dépôt
codegraph
29kAide votre agent à analyser une base de code indexée à travers son graphe d'appels, ses dépendances, son code mort, ses points chauds et une recherche sémantique.
qwen-code-claw
29kAide votre agent à confier des tâches de programmation à Qwen Code, comme comprendre une base de code, corriger des bogues, refactoriser du code ou générer un nouveau projet.
structured-debugging
29kEnseigne à votre agent une méthode pas à pas pour déboguer les bogues difficiles : formuler une hypothèse, ajouter des contrôles ciblés, la tester et trouver la vraie cause avant de corriger.
tmux-real-user-testing
29kAide votre agent à tester une application de terminal comme un vrai utilisateur dans tmux, en enregistrant un journal lisible pas à pas avec une capture d'écran de chaque action.
Skills similaires
knowledge-automation
394kAide votre agent à configurer une tâche récurrente qui ajoute du nouveau contenu à votre coffre Knowledge selon un calendrier, puis vérifie qu'elle fonctionne.
knowledge-source-ingest
394kAide votre agent à tenir un coffre Knowledge à jour avec les nouveaux éléments de canaux de discussion, de flux ou de boîtes mail, sans rajouter ce qui existe déjà.
benchmark
280kAide votre agent à mesurer la vitesse et les performances du code. Utile pour s'assurer que tout est rapide et repérer les lenteurs.