# Skill: /loop slash command (dynamic mode)

> Parses user input into an interval and prompt for scheduling recurring or dynamically self-paced loop executions

- Skill: `lord1egypt/skill-loop-slash-command-dynamic-mode` (Agent Skill)
- Install (CLI): `npx skillmds@latest add lord1egypt/skill-loop-slash-command-dynamic-mode`
- Raw SKILL.md: https://api.skillmd.com/api/skills/lord1egypt/skill-loop-slash-command-dynamic-mode/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- License: BSD-3-Clause license
- Author: Lord1Egypt (https://skillmd.com/u/lord1egypt)
- Updated: 2026-09-10
- Page: https://skillmd.com/skills/lord1egypt/skill-loop-slash-command-dynamic-mode

---


# /loop — schedule a recurring or self-paced prompt

Parse the input below into `[interval] <prompt…>` and schedule it.

## 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. **No interval**: otherwise, the entire input is the prompt and you'll self-pace dynamically (see "Dynamic mode" below).

If the resulting prompt is empty, show usage `/loop [interval] <prompt>` and stop.

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` → no interval → dynamic mode, prompt `check the deploy` (rule 3)
- `check every PR` → no interval → dynamic mode, prompt `check every PR` (rule 3 — "every" not followed by time)
- `5m` → empty prompt → show usage
${ADDITIONAL_PARSING_NOTES_FN()}
## Fixed-interval mode (rules 1 and 2)

Convert the interval to a cron expression:

${CRON_CONVERSION_RULES}

Then:
${SCHEDULE_FIXED_INTERVAL_FN()}

## Dynamic mode (rule 3 — no interval)

${DYNAMIC_MODE_INSTRUCTIONS}

## Input

${USER_INPUT}
