loop

Runs a prompt or skill on a recurring or dynamic interval using monitored shell loops.

Updated Aug 6, 2026
One-click install
npx skills add https://github.com/ferrarifankid04/ai-skills-public --skill loop-ferrarifankid04
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: loop
Source: https://github.com/ferrarifankid04/ai-skills-public/tree/main/cursor/skills-cursor/loop
Command: npx skills add https://github.com/ferrarifankid04/ai-skills-public --skill loop-ferrarifankid04

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Repeating a task manually—checking a deploy, rerunning tests, polling a status page—wastes attention and is easy to forget. This Skill lets an agent run any prompt or skill on a fixed schedule or a self-paced dynamic schedule, waking itself via monitored shell output. ## Core Features & Use Cases - Fixed-interval loops: Parse commands like /loop 5m /foo or check deploy every 5m and arm a background shell loop that emits a unique sentinel on each tick. - Dynamic self-pacing: When no interval is given, the agent decides when the next run is worthwhile, arming event-based watchers (git ref changes, log lines, CI completion) plus a fallback heartbeat timer. - Lifecycle management: Tracks loop PIDs, avoids duplicate loops, runs the prompt once immediately, and cleanly stops loops and watchers on request. - Use Case: Tell the agent /loop 10m run tests during a debugging session; it reruns your test suite every ten minutes and reports what changed after each tick until you ask it to stop. ## Quick Start Ask the agent to run a specific prompt every five minutes using the loop command, for example by typing /loop 5m check deploy status.

Frequently Asked Questions about loop

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

FAQPage Schema
How do I run a command or prompt on a recurring interval in an agent session?

Use the loop syntax with an interval and prompt, such as /loop 5m /foo or "check deploy every 5m". The agent arms a background shell loop that emits a sentinel on each tick and reruns the prompt until you ask it to stop.

How do I make an agent repeat a task without a fixed schedule?

Omit the interval to enter dynamic mode, where the agent self-paces each iteration. It can arm an event-based watcher for conditions like a git ref advancing or a log line matching, plus a fallback sleep timer as a heartbeat.

What interval formats does the loop command support?

Intervals use short units like 30s, 5m, 2h, and 1d, and unit words such as "every 10 minutes" are converted automatically. The interval can appear before the prompt (/loop 5m /foo) or after it (run tests every 10 minutes).

Does the loop skill work on Windows PowerShell?

Yes, the 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 shown in the documentation.

How do I stop a running loop?

Ask the agent to stop, and it kills the tracked loop or sleeper PID and awaits the shell task so its completion notification does not wake the agent later. No further dynamic wake is scheduled after stopping.

Why does the loop use shell output instead of cron for scheduling?

Monitored shell output keeps stdout attached to the agent's task, so sentinel lines can wake the agent with notify_on_output. OS cron cannot deliver these in-session wake notifications, making it unsuitable for agent-driven recurring work.