loop
Skill4 starsChanged 4 months agoMITView on GitHub
Bounded foreground repetition for the current session. Creates a loop contract, runs or coordinates an action plus verifier up to a declared attempt limit, and records evidence under .planning/loops/. Use for repeat-until-pass work that is too small for daemon and not time-based scheduling.
55 other projects use a version of this, 1 of them edited.
Adopted by
Most recently taken up by
- Eclipter/agentstheir own version, first seen Nov 8, 2026
- SethGammon/Citadeledited, first seen Nov 4, 2026
- drevendev/HungryCrabtheir own version, first seen Nov 1, 2026
- Railly/skillstheir own version, first seen Nov 1, 2026
- HeshamFS/swarmweavertheir own version, first seen Nov 1, 2026
- jtaroreh/agystacktheir own version, first seen Oct 29, 2026
Used with
Projects with it also use review-bugbot, origin and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
0mlkrizzz655335vSkillreview-bugbot
缺陷导向代码审查。用 Bugbot 子代理找 bug。
Also in 4 projects that use this
0mlkrizzz655335vSkillorigin
origin CLI 管理。安装、登录、更新、修复 origin.cursor.com 的 CLI。"disabled-environments:
Also in 3 projects that use this
PandelisZSkillupdate-cli-config
View and modify Cursor CLI configuration settings in ~/.cursor/cli-config.json. Use when the user wants to change CLI settings, configure permissions, switch approval mode, enable vim mode, toggle display options, configure sandbox, or manage any CLI preferences.
Also in 4 projects that use this
32103210Skillmigrate-to-skills
Convert 'Applied intelligently' Cursor rules (.cursor/rules/*.mdc) and slash commands (.cursor/commands/*.md) to Agent Skills format (.cursor/skills/). Use when you want to migrate rules or commands to skills, convert .mdc rules to SKILL.md format, or consolidate commands into the skills directory.
Also in 4 projects that use this
32103210Skillupdate-cursor-settings
Modify Cursor/VSCode user settings in settings.json. Use when you want to change editor settings, preferences, configuration, themes, font size, tab size, format on save, auto save, keybindings, or any settings.json values.
Also in 4 projects that use this
MicrosoftSkillautomate
Propose an automation from a completed task or a new idea, then create it after approval. Use when the user asks to create an automation or wants scheduled local or cloud agent work.
Also in 4 projects that use this
- +3 more from 0mlkrizzz655335v
- +1 more from 32103210
Other versions55 projects use a version of this.
Word for word · 0
None found.
Edited · 1
- SethGammon/Citadel★ 92788% same
Wrote their own version · 54
- breezewish/CodexPotter★ 629same name
- jtaroreh/agystack★ 128same name
- dannys-code-corner/incan★ 73same name
- ww-w-ai/bkit-gemini★ 66same name
- IsuruMaduranga/one-code★ 50same name
- unclejobs-ai/second-claude-code★ 41same name
- BULDEE/ai-craftsman-superpowers★ 35same name
- Hassaan146/claude-skills★ 18same name
- woxiangyangzhimao/skills★ 14same name
- Railly/skills★ 11same name
44 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository50 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- architectSkill
- archonSkill
- ascii-diagramSkill
- autopilotSkill
- costSkill
- create-appSkill
- create-skillSkill
- daemonSkill
- dashboardSkill
- decision-mapSkill
- deploy-stewardSkill
- designSkill
- doc-genSkill
- doSkill
- evolveSkill
- experimentSkill
- fleetSkill
- grillSkill
- housecleanSkill
- improveSkill
- infra-auditSkill
- learnSkill
- live-previewSkill
- mapSkill
- marshalSkill
- merge-reviewSkill
- organizeSkill
- postmortemSkill
- prdSkill
- pr-watchSkill
- qaSkill
- refactorSkill
- research-fleetSkill
- researchSkill
- reviewSkill
- scaffoldSkill
- scheduleSkill
- session-handoffSkill
- setupSkill
- systematic-debuggingSkill
- telemetrySkill
- test-genSkill
- triageSkill
- unharnessSkill
- verifySkill
- watchSkill
- wikiSkill
- workspaceSkill
The file
We split this skill into the rules it gives an agent
10 rules. 0 are common, 5 are distinctive, and 5 are very specific to this project.
0
Common
Most of the 50 edited versions we read keep these.
5
Distinctive
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 59
If another route is clearly better, say so and route there.
- Very specific: line 65
Do not infer a verifier from words like "lint", "test", "until it works", or "fix until passing." If the verifier is missing, ask for it …
- Distinctive: line 77
If missing, respond in this shape:
- Very specific: line 106
If .citadel/scripts/ is not present and this is the Citadel harness repo itself, use node scripts/loops.js or node scripts/loop-runner.js …
- Distinctive: line 114
Stop when any of these are true:
- Distinctive: line 122
Never silently continue beyond the declared attempt limit.
- Very specific: line 138
If
.planning/does not exist: create .planning/loops/ before writing loop state. - Distinctive: line 142
No verifier: ask for one. Do not infer a destructive or expensive verifier.
- Very specific: line 144
Action is an agent command, not a shell command: run the action manually as the agent for each attempt, then record the loop with node …
- Very specific: line 149
Verifier keeps failing with the same cause: stop at the attempt limit and report attempt-limit with the latest evidence.
“Common” is measured: kept by at least 6 in 10 of the 50 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
/loop -- Bounded Foreground Loop
Orientation
Use when: the user wants a visible repeat-until-pass cycle inside the current session, such as "loop until lint passes" or "try this up to three times and stop if tests still fail."
Don't use when: the work should run unattended across sessions (/daemon),
on a clock (/schedule), on file changes (/watch), or as a metric-driven
optimization experiment (/experiment).
Commands
| Command | Behavior |
/loop status | Show all known Citadel loops with active/stopped grouping. |
/loop inspect {id} | Show one loop's contract, verifier, budget, runs, and stop reason. |
/loop templates | List built-in loop templates. |
/loop plan --template {name} | Create a loop contract from a template. |
/loop run "{action}" --verify "{command}" --max {N} | Run a bounded foreground loop. |
/loop stop {id} | Mark a loop stopped. |
Protocol
Step 1: Classify the loop
Determine which kind of loop the user requested:
| User intent | Route |
| Repeat within this active session | /loop |
| Continue campaign across sessions | /daemon |
| Run on a schedule | /schedule |
| Watch PR checks/reviews | /pr-watch |
| Watch files or marker comments | /watch |
| Optimize a numeric metric | /experiment |
If another route is clearly better, say so and route there.
Step 2: Require a verifier
A /loop run must have an explicit verifier. Explicit means the user supplied
--verify "<command>" or an equally concrete verifier command in plain language.
Do not infer a verifier from words like "lint", "test", "until it works", or
"fix until passing." If the verifier is missing, ask for it before executing and
do not run loop-runner.js, shell commands, or manual repair steps.
Accept examples like:
--verify "npm run lint"
--verify "npm run test"
--verify "node scripts/operating-proof.js --write"If missing, respond in this shape:
/loop needs an explicit verifier before it can run. Please provide one, for example:
--verify "npm run lint"
I will not run the loop until the verifier is explicit.Step 3: Create the contract
For status, inspect, templates, and stop commands, run:
node .citadel/scripts/loops.js <command>For template planning:
node .citadel/scripts/loops.js plan --template <name> --writeFor foreground execution:
node .citadel/scripts/loop-runner.js --action "<action>" --verify "<verifier>" --max-attempts <N> --writeIf .citadel/scripts/ is not present and this is the Citadel harness repo
itself, use node scripts/loops.js or node scripts/loop-runner.js instead.
The runner writes a contract under .planning/loops/{id}.json, appends each
attempt, and stops with a shared stop status.
Step 4: Stop on the first terminal condition
Stop when any of these are true:
- verifier passes
- attempt limit is reached
- the action fails in a way that needs human review
- the requested action would cross a safety or approval boundary
- the user asks to stop
Never silently continue beyond the declared attempt limit.
Step 5: Report the outcome
Summarize:
- loop id
- status
- attempts used
- verifier
- runner command, including
--verifyand--max-attempts - state path
- next action if stopped before success
Fringe Cases
If .planning/ does not exist: create .planning/loops/ before writing
loop state. If writing fails, output the contract inline and tell the user
setup is needed.
No verifier: ask for one. Do not infer a destructive or expensive verifier.
Action is an agent command, not a shell command: run the action manually as
the agent for each attempt, then record the loop with node scripts/loops.js
register or use the loop contract as the state artifact. Do not pass slash
commands to the shell runner.
Verifier keeps failing with the same cause: stop at the attempt limit and
report attempt-limit with the latest evidence.
User asks for unattended looping: route to /daemon or /schedule, not
/loop.
Contextual Gates
Disclosure: "Running foreground loop: action {action}, verifier
{verifier}, max attempts {N}."
Reversibility: amber -- the loop may run user-provided shell commands and modify files; inspect the diff or loop-owned artifacts to revert.
Trust gates:
- Any: require verifier and attempt cap.
- Familiar: may execute shell action/verifier after disclosing the contract.
- Risky commands: require normal tool approval boundaries before running.
Quality Gates
- A loop contract exists under
.planning/loops/unless the filesystem blocks it. - The verifier is explicit.
- The attempt limit is explicit and >= 1.
- The final status uses the shared loop vocabulary from
docs/LOOP_CONTRACT.md. - The final answer includes the loop id and state path.
Exit Protocol
---HANDOFF---
- Loop: {id}
- Status: {status}
- Attempts: {used}/{max}
- Verifier: {command}
- Runner: node .citadel/scripts/loop-runner.js --action "{action}" --verify "{command}" --max-attempts {max} --write
- State: .planning/loops/{id}.json
- Next: {next action or "none"}
---Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

