loop

Runs a prompt or skill on recurring or dynamic intervals via timers or monitored shell output.

Updated Oct 15, 2019
One-click install
npx skills add https://github.com/kkkaoru/dotfiles --skill loop-kkkaoru
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: loop
Source: https://github.com/kkkaoru/dotfiles/tree/main/.cursor/skills-cursor/loop
Command: npx skills add https://github.com/kkkaoru/dotfiles --skill loop-kkkaoru

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? It automates recurring agent tasks—like checking deploy status or running reports—without requiring you to manually re-issue the same prompt each time. ## Core Features & Use Cases - Fixed-interval loops: Schedule prompts with intervals like 30s, 5m, 2h, or 1d, using either a cloud subscription timer or a local monitored shell loop. - Dynamic self-pacing: Let the agent decide when the next run is worthwhile, gating on events like git ref changes, log lines, or CI completion. - Lifecycle management: Change, stop, and deduplicate timers safely, including the unsubscribe-first rule for updating cloud timers. - Use Case: Run /loop 5m check deploy status to have the agent poll a deployment every five minutes and report changes until you tell it to stop. ## Quick Start Ask the agent to run /loop 5m followed by any prompt, such as checking your deployment status 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 in an agent session?

Use /loop followed by an interval and prompt, such as /loop 5m check deploy status. The agent picks the right mechanism—cloud subscription timer or local monitored shell loop—and runs the prompt immediately, then on each tick.

How do I stop a running loop timer?

In cloud, list subscriptions with cursor-subscriptions-list_subscriptions, find the matching loop name, and unsubscribe by its subscriptionId. Locally, kill the tracked loop or sleeper PID and await the shell task so no further wake notifications fire.

Why does changing an existing subscription timer not apply my new interval?

The subscribe_timer call dedupes by name and silently keeps the old configuration, dropping your new prompt, cron, or delaySeconds. You must unsubscribe the existing subscriptionId first, then subscribe again with the updated values.

Can a loop wake the agent when a file changes or a log line appears?

Yes, in local dynamic mode a background watcher emits a sentinel only when the event fires, with a long fallback heartbeat as backup. Cloud subscriptions have no event watcher for arbitrary signals, so only time intervals are available there.

Does a local sleep loop work for cloud agents?

No, local sleep loops and background shell wakes do not work in cloud environments. Cloud agents must use the cursor-subscriptions-subscribe_timer MCP tool, which fires follow-up prompts server-side until unsubscribed.