create-loop
FreeNo executable scriptsNot checkedCreate a recurring Loop where an agent checks one thing and reports only when needed. Use for "create loop" or "every N hours, check X" requests.
by davidondrej★ 2,086 GitHub starsAbout this skill
Create loop
The user describes the job in a sentence. Fill in everything else from the defaults. Anything the user says overrides a default. Ask only when the job itself is unclear.
For flags, Cloud loops, and scripts:
- Local threads: read the
automationsskill. - Cloud threads: run
room-cli loop --help. Then read theroom-cliskill. Cloud steps differ: see "In a Cloud thread" below.
Defaults
- Schedule: every 4 hours in the user's timezone:
--cron "0 */4 * * *" --timezone <IANA zone>. - Agent: the same harness, model, and effort as this thread.
Locally, read them with
room-cli thread show --self --json. Cloud loops use them by default. - Where: a Local loop in the project's main checkout (first line of
git worktree list). No new worktrees. Use a Cloud loop when it must run with the user's computer off, and always from a Cloud thread. - One thread per run: every run is its own top-level thread. Never point a loop at one manager thread that re-prompts and spawns sub-agents: the runs pile up nested under it. Local loops and Cloud
--cronloops already start a fresh thread per run, so don't add--same-thread. A script that starts threads itself spawns them top-level: no--parent-selflocally,--top-levelin a Cloud thread, never--shared-sandbox. - Webhooks: a Cloud
--webhookloop's run reads only up to the first 16 KB of a request, less with a long prompt. Have bigger senders POST a link or split the report. - Access: read only. No edits, commits, or pushes until the user approves a fix.
- Secrets: a Cloud loop gets only the API keys its job needs:
--secrets KEY,.envor--secrets none. Any picked list, even.envornone, blocksroom-cli macin its runs, so a job that needs the Mac keeps all keys: make or widen it from a Cloud thread with all keys or the desktop CLI, since a thread with picked keys passes them on and can't widen a loop. - Safety: include the safety sentence below verbatim in every Local or Cloud loop prompt, including prompts embedded in scripts.
- Finish: all fine → 1-2 lines, then the thread archives itself. Something matters → a short verdict, thread left open for the user's Review tab.
- No repeats: skip anything the past runs' Loop notes already cover.
Steps
Read the area first. Find the real files, docs, and skills the job touches. The loop's agent starts cold, so put concrete paths in its prompt.
Write a short prompt from the template below. Simple and short beats thorough: a few lines, at most about 15, in calm, plain words. No long checklists, nothing adversarial. One job per loop. If the loop may push, delete, or flag a serious security issue, have it ask a subagent on another model to check first, in a few lines, like: "Branch X removes Y. Check it won't break anything. Only flag serious issues, not nitpicks. End with SHIP or HOLD: reason."
Create it. Write the prompt to
/tmp/<name>-prompt.txt, then:room-cli loop create --project "$ROOM_PROJECT_ID" --name "<Name> (every 4 hours)" \ --cron "0 */4 * * *" --timezone <zone> \ --provider <id> --model '<model>' --reasoning <level> \ --environment "<main checkout>" --prompt "$(cat /tmp/<name>-prompt.txt)" --jsonTest it once. In a Cloud thread, see "In a Cloud thread" below. Locally:
room-cli loop run ID --project "$ROOM_PROJECT_ID", thenroom-cli loop runs ID --project "$ROOM_PROJECT_ID" --limit 1 --jsongives its thread. Confirm it started and renamed itself.Tell the user the loop's name, schedule, and test thread, plus anything surprising from step 1.
In a Cloud thread
- Drop
--projectand--environment. Cloud uses this thread's project. room-cli loop run IDonly makes the loop due.- Within a minute or two, find the loop's ID in
room-cli loop list. - Check that
runsandlast_run_atwent up. Check thatlast_erroris empty. - Cloud can't see the run's thread or output.
- Ask the user to confirm its title and verdict in the app.
Prompt template
<Name>. Read only: do not edit, commit, or push anything.
Never test destructive edge cases on live services; mock the API and reject missing or empty IDs before delete requests.
1. Rename this thread: `room-cli thread update --self --title "<Name> · $(date '+%b-%d %H:%M')"`.
2. Read: <concrete files and docs>.
3. Check: <what to look for, in plain words>.
4. Skip anything the past runs' Loop notes already cover.
Finish:
- Nothing major: write 1-2 lines on what you checked, then run `room-cli thread archive --self --json`.
- Something worth fixing (<what counts as major for this job>): don't archive. Explain the single most important issue in 2-3 short, plain sentences, then one sentence on the safe fix. Then wait.
Keep paid calls cheap
For jobs that pay per item (scrapes, search, paid APIs):
- Fetch only what's new. Save the last run time in a file and fet
Install create-loop in Claude Code & Claude Desktop
Sign up to install this skill
Create a free account to reveal the install command and save the skill to your library.
- Reveal the one-line install command
- Save skills to your synced library
- Get notified when skills update
Allowed tools
Tools this skill is permitted to call.
No restriction — this skill can use any tool.
FAQ
What does the create-loop skill do?
Create a recurring Loop where an agent checks one thing and reports only when needed. Use for "create loop" or "every N hours, check X" requests.
How do I install the create-loop skill?
Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.
Does the create-loop skill run scripts?
No, this skill is instructions only (SKILL.md) with no executable scripts.
Related skills
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
by Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
by Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
by Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
by Anthropic