
Loop
Create a loop that runs a prompt now and follows up either on a fixed schedule or...
Install
npx skills add QwenLM/qwen-code --skill loop -g -a claude-code -y- Repository
- QwenLM/qwen-code28.9k
- Category
- AI and agents
- Updated
- 3d ago
- License
- Apache-2.0
- Context cost
- Mediumabout 2,428 tokens
- Runs scripts
- Yes, review before use
What it does
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.
/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:

