Run a prompt or slash command on a recurring interval (e.g. An agent skill from asgeirtj/system_prompts_leaks.

CC0-1.0Auto-check: warningsAgent Workflows

Install Loop

The automated check flagged lines worth reading first. See the safety section below.

skills CLI
$ npx skills add asgeirtj/system_prompts_leaks --skill loop -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install asgeirtj/system_prompts_leaks loop --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/asgeirtj/system_prompts_leaks.git skills-src && mkdir -p .claude/skills && cp -r skills-src/Anthropic/claude-code/skills/loop .claude/skills/loop && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
loop
GitHub stars
69k
Token cost
~2.2k tokens
SKILL.md length
1,275 words
Files
3
Skills in repo
121
Repo updated
First seen
Licence
CC0-1.0

At a glance

Run a prompt or slash command on a recurring interval (e.g. An agent skill from asgeirtj/system_prompts_leaks.

  • Works in 3 steps: Leading token: if the first… → Trailing "every" clause: otherwise, if… → No interval: otherwise, the entire input…
  • Tasks that involve Hooks and plugins
  • SKILL.md covers Parsing (in priority order), Offer cloud first, Fixed-interval mode (rules 1… and Dynamic mode (rule 3 — no…, plus 1 more section
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Loop is an agent skill from asgeirtj/system_prompts_leaks. Run a prompt or slash command on a recurring interval (e.g. /loop 5m /foo). Omit the interval to let the model self-pace.

Its SKILL.md is about 2.2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files (for example `autonomous-interval.md` and `autonomous.md`).

It sits in Agent Workflows, covering Hooks and plugins. The repository describes itself as: Documented system prompts from Anthropic - Claude Fable 5.1, Opus 5.5, Claude Design, Claude Code. OpenAI - ChatGPT GPT-6-Astra, Codex. Google - Gemini 3.8 Flash, 3.1 Pro… The licence is CC0-1.0.

When your agent uses it

  • Tasks that involve Hooks and plugins

Example prompts

  • “/loop”

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  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 or every (e.g. every 20m, every 5 minutes, every 2 hours), extract that…
  3. No interval: otherwise, the entire input is the prompt and you'll self-pace dynamically (see "Dynamic mode" below).

What it can do on your machine

Read from SKILL.md and the folder at commit f015440. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Loop loads about 2.2k tokens when it runs. Until then it costs about 32 tokens; SKILL.md has 1,275 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~32
When it runs · the whole SKILL.md, loaded when a task matches
~2.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: warnings

The automated check found patterns that need a careful read before installing.

  • WarningContains instruction-override wording (e.g. “without asking the user”)SKILL.md:40
    hat skill's instructions to completion. Do NOT tell the user to run /schedule themselves. **Then stop — do not continue

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from asgeirtj/system_prompts_leaks at commit f015440, republished under its CC0-1.0 licence (© asgeirtj). 1,275 words, ~2,176 tokens.

Download SKILL.mdSave it as .claude/skills/loop/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
loop
description
Run a prompt or slash command on a recurring interval (e.g. /loop 5m /foo). Omit the interval to let the model self-pace.
when_to_use
When the user wants to set up a recurring task, poll for status, or run something repeatedly on an interval (e.g. "check the deploy every 5 minutes", "keep…

/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

Offer cloud first

Before any scheduling step, check whether EITHER is true:

  • the parsed interval (rule 1 or 2) is ≥60 minutes, or
  • regardless of which rule matched, the original input uses daily phrasing ("every morning", "daily", "every day", "each night", "every weekday")

If either is true, call AskUserQuestion first:

  • question: "This loop stops when you close this session. Set it up as a cloud schedule instead so it keeps running?"
  • header: "Schedule"
  • options: [{label: "Cloud schedule (recommended)", description: "Runs in Anthropic's cloud even after you close this session"}, {label: "This session only", description: "Runs in this terminal until you exit"}]

If they pick Cloud schedule: do NOT call CronCreate. Invoke the schedule skill directly via the Skill tool with args set to their original input verbatim (e.g. Skill({skill: "schedule", args: "every morning tell me a joke"})), then follow that skill's instructions to completion. Do NOT tell the user to run /schedule themselves. Then stop — do not continue to any section below (no CronCreate, no ScheduleWakeup, no "execute the prompt now").
If they pick This session only:

  • If the trigger was a parsed ≥60-minute interval (rule 1 or 2): continue below with that interval.
  • If the trigger was daily phrasing only (rule 3, no parsed interval): do NOT call CronCreate. Explain that a daily-cadence loop won't fire before this session closes, so there's nothing useful to schedule locally — suggest they either pick Cloud schedule, or re-run /loop with an explicit shorter interval (e.g. /loop 1h <prompt>) if they want a session loop. Then stop.

If neither trigger condition was met: continue below.

Fixed-interval mode (rules 1 and 2)

Convert the interval to a cron expression:

Interval patternCron expressionNotes
Nm where N ≤ 59*/N * * * *every N minutes
Nm where N ≥ 600 */H * * *round to hours (H = N/60, must divide 24)
Nh where N ≤ 230 */N * * *every N hours
Nd0 0 */N * *every N days at midnight local
Nstreat as ceil(N/60)mcron minimum granularity is 1 minute

If the interval doesn't cleanly divide its unit (e.g. 7m → */7 * * * * gives uneven gaps at :56→:00; 90m → 1.5h which cron can't express), pick the nearest clean interval and tell the user what you rounded to before scheduling.

Then:

  1. Call CronCreate with: cron (the expression above), prompt (the parsed prompt verbatim), recurring: true.
  2. Briefly confirm: what's scheduled, the cron expression, the human-readable cadence, that recurring tasks auto-expire after 7 days, and that the user can cancel sooner with CronDelete (include the job ID). Only if you did NOT show the cloud-offer AskUserQuestion above (i.e., neither trigger condition applied), end the confirmation with this exact line on its own, italicized: _Runs until you close this session · For durable cloud-based loops, use /schedule_. If the user already answered that question, omit this line.
  3. Then immediately execute the parsed prompt now — don't wait for the first cron fire. If it's a slash command, invoke it via the Skill tool; otherwise act on it directly.
Show full SKILL.md (586 more words)Show less

Dynamic mode (rule 3 — no interval)

The user wants you to self-pace. Decide what makes the next iteration worth running — a passage of time, or an observable event.

  1. Run the parsed prompt now. If it's a slash command, invoke it via the Skill tool; otherwise act on it directly.
  2. If the next run is gated on an event (CI finishing, a log line matching, a file changing, a PR comment) and no Monitor is already running for it: arm one now with timeout_ms: 1800000. Its events arrive as <task-notification> messages and wake this loop immediately — you do not wait for the ScheduleWakeup deadline. A monitor expires after at most 30 minutes and tells you; on later iterations call TaskList first and re-arm only if no monitor for it is still running.
  3. Briefly confirm: that you're self-pacing, whether a Monitor is the primary wake signal, that you ran the task now, and what fallback delay you're about to pick. This must be ordinary visible response text — the user cannot see your thinking/reasoning, so an update written only there is invisible to them. Write it immediately BEFORE calling ScheduleWakeup — on this model the turn ends as soon as that tool returns, so an update after the call never goes out.
  4. Then, as the last action of this turn, decide whether the loop continues. If the task needs another iteration, call ScheduleWakeup with:
    • delaySeconds: with a Monitor armed this is the fallback heartbeat — how long to wait if no event fires (lean 1200–1800s; idle ticks more frequent than the task needs are pure overhead). Without a Monitor this is the cadence — pick based on what you observed. Read the tool's own description for cache-aware delay guidance.
    • reason: one short sentence on why you picked that delay.
    • prompt: the full original /loop input verbatim, prefixed with /loop so the next firing re-enters this skill and continues the loop. For example, if the user typed /loop check the deploy, pass /loop check the deploy as the prompt.
    • noop: true if this tick changed nothing ("still waiting", "quiet hold"); false if it did something worth keeping. Consecutive noop: true ticks collapse in the terminal.
      If it doesn't need another iteration, stop instead (step 6) — re-arming is a per-turn choice, not a default.
  5. If you were woken by a <task-notification> rather than this prompt: handle the event in the context of the loop task, then make the same decision. If the loop should continue, write the same brief update as visible text, then call ScheduleWakeup again with the same prompt and the same 1200–1800s delaySeconds from the schedule step above (the Monitor remains the wake signal; the new wakeup is only the fallback heartbeat). If the event means the work is finished, stop (step 6).
  6. To stop the loop — the task is complete, further iterations can't make progress, or the user asked you to stop — call ScheduleWakeup with stop: true (no other fields) and TaskStop any Monitor you armed (use TaskList to find the task ID if it is no longer in context). Then write the loop's outcome for the user as ordinary visible response text — a stopped loop has no next tick to surface it. Stopping is the loop's normal ending — the user can restart it anytime with /loop. Before you stop, send a one-line outcome via PushNotification — the user may be away and waiting to hear it's done. Skip this if you're stopping because the user just told you to; they're already here.

Input

$ARGUMENTS

© asgeirtj, CC0-1.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files in Anthropic/claude-code/skills/loop of asgeirtj/system_prompts_leaks.

  • SKILL.md
  • autonomous-interval.md
  • autonomous.md

Open the folder on GitHubat commit f015440

Compare with similar skills

Loop next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Loop compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Loop this skillasgeirtj/system_prompts_leaks69k—~2.2kAutomated safety check: WarnCC0-1.0
Hook Development for Claude Code Pluginsanthropics/claude-plugins-official37k11 repos~4.1kAutomated safety check: NotesApache-2.0
Claude Code Agent Developmentanthropics/claude-plugins-official37k8 repos~2.8kAutomated safety check: PassApache-2.0
Claude Code Skill Developer Guidediet103/claude-code-infrastructure-showcase10k10 repos~3.5kAutomated safety check: PassMIT
Plugin Settings Patternanthropics/claude-plugins-official37k7 repos~3kAutomated safety check: PassApache-2.0
MCP Integration for Pluginsanthropics/claude-plugins-official37k11 repos~3.1kAutomated safety check: PassApache-2.0

Similar skills

  • Hook Development for Claude Code Plugins

    anthropics/claude-plugins-official

    Official

    Explains how to write Claude Code plugin hooks, both prompt-based checks and bash commands, for events such as PreToolUse, Stop and SessionStart.

    37k GitHub starsUsed in 11 repos~4.1k tokens
    Agent WorkflowsAuto-check: notes
  • Claude Code Agent Development

    anthropics/claude-plugins-official

    Official

    Explains how to write agents for Claude Code plugins: the markdown file with YAML frontmatter, trigger descriptions, model and color settings, and system prompt design.

    37k GitHub starsUsed in 8 repos~2.8k tokens
    Agent WorkflowsAuto-check passed
  • Claude Code Skill Developer Guide

    diet103/claude-code-infrastructure-showcase

    A guide to creating and managing Claude Code skills with auto-activation: skill-rules.json triggers, hooks, enforcement levels, YAML frontmatter and progressive disclosure.

    10k GitHub starsUsed in 10 repos~3.5k tokens
    Agent WorkflowsAuto-check passed
  • Plugin Settings Pattern

    anthropics/claude-plugins-official

    Official

    Shows how Claude Code plugins keep per-project settings and state in .claude/plugin-name.local.md files with YAML frontmatter and a markdown body.

    37k GitHub starsUsed in 7 repos~3k tokens
    Agent WorkflowsAuto-check passed
  • MCP Integration for Plugins

    anthropics/claude-plugins-official

    Official

    Explains how to bundle Model Context Protocol servers in a Claude Code plugin, covering config files, stdio, SSE, HTTP and WebSocket server types, and authentication.

    37k GitHub starsUsed in 11 repos~3.1k tokens
    Agent WorkflowsAuto-check passed
  • Claude Code Command Development

    anthropics/claude-plugins-official

    Official

    Explains how to write Claude Code slash commands: Markdown files with YAML frontmatter, arguments, file references, bash context and interactive prompts.

    37k GitHub starsUsed in 10 repos~4.8k tokens
    Agent WorkflowsAuto-check passed

More from asgeirtj/system_prompts_leaks

All 121 skills in this repo
  • Fleet Manager for Agent Sessions

    asgeirtj/system_prompts_leaks

    Shows one digest of coding-agent sessions across your connected machines and lets you open, read, steer, approve, stop and close them, over Herdr, tmux or MSP.

    69k GitHub stars~2.5k tokensUpdated yesterday
    Auto-check passed
  • Muse Code Product Doctor

    asgeirtj/system_prompts_leaks

    Diagnoses a Muse Code installation's own failures from binary and session evidence, instead of treating the report as an ordinary repository bug.

    69k GitHub stars~3.5k tokensUpdated yesterday
    Auto-check passed
  • Agents Project Coordinator

    asgeirtj/system_prompts_leaks

    Runs a goal as a project in which the agent coordinates separate agent threads, judging when to split the work, and interviews you first when nothing can be verified.

    69k GitHub stars~2.9k tokensUpdated yesterday
    Auto-check passed
  • Muse Plugin Creator

    asgeirtj/system_prompts_leaks

    Creates and validates a new native Muse plugin package in the current workspace, limited to five capability families, and leaves installation to you.

    69k GitHub stars~1.8k tokensUpdated yesterday
    Auto-check passed
  • Figma Design Inspector

    asgeirtj/system_prompts_leaks

    Inspects Figma designs through the figma CLI and Figma's MCP server to read variants, spacing, tokens and layouts and to extract assets for implementation.

    69k GitHub stars~936 tokensUpdated yesterday
    Auto-check passed
  • Morning Brief Renderer

    asgeirtj/system_prompts_leaks

    Renders a calm, single-page HTML morning brief from your connected calendar, email and chat, or sets it up to run automatically on weekdays.

    69k GitHub stars~4.5k tokensUpdated yesterday
    Auto-check passed

Categories

Questions about Loop

What does Loop do?

Run a prompt or slash command on a recurring interval (e.g. An agent skill from asgeirtj/system_prompts_leaks. Loop is an agent skill from asgeirtj/system_prompts_leaks.g.

When should I use Loop?

Loop fits situations like: tasks that involve Hooks and plugins.

How do I install Loop in Claude Code?

Run `npx skills add asgeirtj/system_prompts_leaks --skill loop -a claude-code`. Or copy the skill folder (Anthropic/claude-code/skills/loop in asgeirtj/system_prompts_leaks) into .claude/skills/loop in your project. Claude Code loads it when a task matches its description.

How do I install Loop in Codex?

Run `npx skills add asgeirtj/system_prompts_leaks --skill loop -a codex`. Or copy the skill folder (Anthropic/claude-code/skills/loop in asgeirtj/system_prompts_leaks) into .agents/skills/loop in your project. Codex loads it when a task matches its description.

Can I use Loop in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add asgeirtj/system_prompts_leaks --skill loop -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/loop, .gemini/skills/loop, .github/skills/loop and .opencode/skills/loop in your project.

What does Loop need to run?

SKILL.md names no scripts, command-line tools or credentials: Loop is instructions for the agent only.

Does Loop access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Loop safe to install?

Our automated static check of SKILL.md flagged 1 warning(s): contains instruction-override wording (e.g. “without asking the user”). Read the flagged lines before installing; the check is not a guarantee either way.

What licence does Loop use?

Loop is published under the CC0-1.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Loop use?

About 2.2k tokens (SKILL.md is roughly 8.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Loop?

Skills that share tags, products or a category with Loop: Hook Development for Claude Code Plugins (anthropics/claude-plugins-official, 37k stars), Claude Code Agent Development (anthropics/claude-plugins-official, 37k stars), Claude Code Skill Developer Guide (diet103/claude-code-infrastructure-showcase, 10k stars) and Plugin Settings Pattern (anthropics/claude-plugins-official, 37k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Loop?

asgeirtj (a GitHub user) maintains it in asgeirtj/system_prompts_leaks, which has 69,041 GitHub stars. The repository holds 121 skills in this directory. The repository was last updated on October 6, 2026.

Source: asgeirtj/system_prompts_leaks on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.