Agent skill

loop

Create a recurring loop that runs a prompt on a schedule. Usage - /loop 5m check the build, /loop check the PR every 30m, /loop run tests (defaults to 10m). /loop list to show jobs, /loop clear to cancel all.

Stars 22,768
Forks 2,110

Install this agent skill to your Project

npx add-skill https://github.com/QwenLM/qwen-code/tree/main/packages/core/src/skills/bundled/loop

SKILL.md

/loop — schedule a recurring prompt

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.

Otherwise, parse the input below into [interval] <prompt…> and schedule it with CronCreate.

Parsing (in priority order)

  1. Leading token: if the first whitespace-delimited token matches ^\d+[smhd]$ (e.g. 5m, 2h), that's the interval; the rest is the prompt.
  2. 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), extract that as the interval and strip it from the prompt. Only match when what follows "every" is a time expression — check every PR has no interval.
  3. Default: otherwise, interval is 10m and the entire input is the prompt.

If the resulting prompt is empty, show usage /loop [interval] <prompt> and stop — do not call CronCreate.

Examples:

  • 5m /babysit-prs → interval 5m, prompt /babysit-prs (rule 1)
  • check the deploy every 20m → interval 20m, prompt check the deploy (rule 2)
  • run tests every 5 minutes → interval 5m, prompt run tests (rule 2)
  • check the deploy → interval 10m, prompt check the deploy (rule 3)
  • check every PR → interval 10m, prompt check every PR (rule 3 — "every" not followed by time)
  • 5m → empty prompt → show usage

Interval → cron

Supported suffixes: s (seconds, rounded up to nearest minute, min 1), m (minutes), h (hours), d (days). Convert:

Interval pattern Cron expression Notes
Nm where N ≤ 59 */N * * * * every N minutes
Nm where N ≥ 60 0 */H * * * round to hours (H = N/60, must divide 24)
Nh where N ≤ 23 0 */N * * * every N hours
Nd 0 0 */N * * every N days at midnight local
Ns treat as ceil(N/60)m cron minimum granularity is 1 minute

If the interval doesn't cleanly divide its unit (e.g. 7m*/7 * * * * gives uneven gaps at :56→:00; 90m → 1.5h which cron can't express), pick the nearest clean interval and tell the user what you rounded to before scheduling.

Action

  1. Call CronCreate with:
    • cron: the expression from the table above
    • prompt: the parsed prompt from above, verbatim (slash commands are passed through unchanged)
    • recurring: true
  2. Briefly confirm: what's scheduled, the cron expression, the human-readable cadence, that recurring tasks auto-expire after 3 days, and that they can cancel sooner with CronDelete (include the job ID).
  3. Then immediately execute the parsed prompt now — don't wait for the first cron fire. If it's a slash command, invoke it via the Skill tool; otherwise act on it directly.

Input

Expand your agent's capabilities with these related and highly-rated skills.

QwenLM/qwen-code

e2e-testing

Guide for running end-to-end tests of the Qwen Code CLI, including headless mode, MCP server testing, and API traffic inspection. Use this skill whenever you need to verify CLI behavior with real model calls, reproduce user-reported bugs end-to-end, test MCP tool integrations, or inspect raw API request/response payloads. Trigger on mentions of E2E testing, headless testing, MCP tool testing, or reproducing issues.

22,768 2,110
Explore
QwenLM/qwen-code

terminal-capture

Automates terminal UI screenshot testing for CLI commands. Applies when reviewing PRs that affect CLI output, testing slash commands (/about, /context, /auth, /export), generating visual documentation, or when 'terminal screenshot', 'CLI test', 'visual test', or 'terminal-capture' is mentioned.

22,768 2,110
Explore
QwenLM/qwen-code

structured-debugging

Hypothesis-driven debugging methodology for hard bugs. Use this skill whenever you're investigating non-trivial bugs, unexpected behavior, flaky tests, or tracing issues through complex systems. Activate proactively when debugging requires more than a quick glance — especially when the first attempt at a fix didn't work, when behavior seems "impossible", or when you're tempted to blame an external system (model, API, library) without evidence.

22,768 2,110
Explore
QwenLM/qwen-code

docs-audit-and-refresh

Audit the repository's docs/ content against the current codebase, find missing, incorrect, or stale documentation, and refresh the affected pages. Use when the user asks to review docs coverage, find outdated docs, compare docs with the current repo, or fix documentation drift across features, settings, tools, or integrations.

22,768 2,110
Explore
QwenLM/qwen-code

qwen-code-claw

Use Qwen Code as a Code Agent for code understanding, project generation, features, bug fixes, refactoring, and various programming tasks

22,768 2,110
Explore
QwenLM/qwen-code

docs-update-from-diff

Review local code changes with git diff and update the official docs under docs/ to match. Use when the user asks to document current uncommitted work, sync docs with local changes, update docs after a feature or refactor, or when phrases like "git diff", "local changes", "update docs", or "official docs" appear.

22,768 2,110
Explore

Didn't find tool you were looking for?

Be as detailed as possible for better results