loop

Runs prompts or skills on recurring local intervals using monitored background shell output.

Updated May 28, 2023
One-click install
npx skills add https://github.com/steveulrich/ProjectB --skill loop-steveulrich
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: loop
Source: https://github.com/steveulrich/ProjectB/tree/main/.cursor/skills/loop
Command: npx skills add https://github.com/steveulrich/ProjectB --skill loop-steveulrich

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Recurring tasks like polling deploy status, re-running checks, or waking an agent periodically require manual repetition; this Skill automates fixed-interval and self-paced loops through monitored background shell output. ## Core Features & Use Cases - Fixed-Schedule Loops: Arm a background shell loop that emits a unique sentinel on a set interval (e.g., 30s, 5m, 2h) to trigger a prompt on each tick. - Dynamic Self-Paced Loops: Let the agent decide the next delay after each run, optionally gating wakes on observable events like git ref changes, log lines, or CI completion. - Lifecycle Management: Detect duplicate loops, track PIDs, and cleanly stop loops and watchers on request. - Use Case: Ask the agent to check a deployment every 5 minutes; it arms a monitored loop, runs the check immediately, and reports status changes on each tick until you tell it to stop. ## Quick Start Ask the agent to run /loop 5m check deploy status to start a recurring deployment check every five minutes.

Frequently Asked Questions about loop

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run a prompt on a recurring interval with an AI agent?▼

Use the /loop command with an interval and prompt, such as /loop 5m check deploy status. The agent arms a background shell loop that emits a sentinel on each tick, triggering the prompt repeatedly until stopped.

How to make an agent self-pace recurring tasks dynamically?▼

Invoke /loop without an interval to enter dynamic mode. The agent runs the prompt immediately, then chooses the next delay itself, optionally arming an event watcher for conditions like git ref changes or CI completion.

Can I use /loop for one-off tasks?▼

No, /loop is designed only for recurring work and should not be used for one-off tasks. Run single tasks directly without arming a loop.

Does the loop skill work on Windows PowerShell?▼

Yes, loop syntax adapts to the user's shell. On Windows the agent uses PowerShell constructs like while ($true) with Start-Sleep instead of the bash examples.

How do I stop a running loop?▼

Ask the agent to stop the loop. It kills the tracked loop or sleeper PID, awaits the shell task so its completion notification is consumed, and does not schedule another dynamic wake.

Why does the loop use shell output instead of OS cron?▼

Monitored shell output keeps stdout attached to the monitored task, so the agent receives wake notifications directly. OS cron cannot deliver these in-context notifications to the agent.