Skills

Loop

Bounded foreground repetition for the current session.

Install

npx skills add SethGammon/Citadel --skill loop -g -a claude-code -y
Repository
SethGammon/Citadel927
Category
Business
Updated
5d ago
License
MIT
Context cost
Lightabout 1,300 tokens
Runs scripts
No, instructions only

What it does

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.

/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

CommandBehavior
/loop statusShow all known Citadel loops with active/stopped grouping.
/loop inspect {id}Show one loop's contract, verifier, budget, runs, and stop reason.
/loop templatesList 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 intentRoute
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:

Read the whole SKILL.md on GitHub

More in Business