loop

loop is a skill for Claude Code from QwenLM/qwen-code. It costs 66 tokens per session (2,444 once invoked), scanned A, original, Apache-2.0.

A scheduler for running a prompt immediately and repeating it at a fixed interval or through self-paced follow-ups.

In plain words
What is it for?
Use it to monitor builds, pull requests, or other tasks on a schedule, list active repeating jobs, or cancel them.
Why use it?
It removes the need to remember recurring checks or manually rerun the same request.

Skill for Claude Code ✓ vendor

Written for Claude Code: argument-hint in frontmatter.

Good fit Use it to monitor builds, pull requests, or other tasks on a schedule, list active repeating jobs, or cancel them.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/qwenlm/qwen-code/loop
About the project

Qwen Code is an open-source AI coding agent that runs in a terminal and helps developers work with code through language models. It supports multiple model providers and can also be used through IDEs, desktop software, SDKs, and messaging bots.

QwenLM/qwen-code · 28,528 stars · on GitHub · qwenlm.github.io

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.

Any agent
npx skills add QwenLM/qwen-code --skill loop
Clone the repo
git clone --depth 1 https://github.com/QwenLM/qwen-code

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for loop

README.md
[![agentmods](https://agentmods.dev/badge/skills/qwenlm/qwen-code/loop/github.svg)](https://agentmods.dev/skills/qwenlm/qwen-code/loop)
Your own site
<a href="https://agentmods.dev/skills/qwenlm/qwen-code/loop"><img src="https://agentmods.dev/badge/skills/qwenlm/qwen-code/loop/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for loop

Your own site · 80×15
<a href="https://agentmods.dev/skills/qwenlm/qwen-code/loop"><img src="https://agentmods.dev/badge/skills/qwenlm/qwen-code/loop.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 66 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,444 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Snyk pass 7 Sept 2026
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Rogue Agent · line 86
    Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
    Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
How audits are shown
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.1 $0.00066 $0.02444
Opus 5.5 $0.00026 $0.00978
Sonnet 5.5 $0.00013 $0.00489
Haiku 4.5 $0.00007 $0.00244

Measured 1mo ago against content hash fdccdc2f4de7, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

loop 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 1mo ago.

The scan reads SKILL.md. This mod also ships 7 executable files (autonomous-loop.test.ts, autonomous-loop.ts, loop-task-file.test.ts, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

packages/core/src/skills/bundled/loop/SKILL.md · 115 lines

How it starts

The opening of the file, as written. The whole thing — 115 lines — stays where its author put it; the contents beside it link to each section on 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:

  1. Empty input (no prompt, no interval): the autonomous path — run a self-paced autonomous loop. See the Autonomous mode section.
  2. 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.
  3. Trailing "every" clause: otherwise, if the input ends with every <N><unit> or every <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 PR has no interval.
  4. 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 interval 5m, prompt /babysit-prs (leading interval token)
  • check the deploy every 20m → fixed interval 20m, prompt check the deploy (trailing "every" clause)
  • run tests every 5 minutes → fixed interval 5m, prompt run tests (trailing "every" clause)
  • check every PR → prompt-only self-paced path, prompt check every PR ("every" is not followed by a time expression)
  • check the deploy → prompt-only self-paced path, prompt check the deploy
  • (empty) → self-paced autonomous loop (sentinel <<autonomous-loop-dynamic>>)
  • 5m → fixed-interval autonomous loop (interval 5m, sentinel <<autonomous-loop>>)

Read the full file on GitHub · 115 lines

Files

What ships with it

7 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 1mo ago First seen · 115 lines · 66 tokens per session scan A fdccdc2f4de7

Subscribe to this mod's changes

loop is a skill published in the GitHub repository QwenLM/qwen-code (28,528 stars, last pushed today), licensed Apache-2.0. It adds 66 tokens to every session and 2,444 once invoked, about $0.0003 per session on Opus 5.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-30.