agentleFS
willianbswillianbs/skills/loop-engineer/SKILL.md

loop-engineer

Skill0 starsChanged 4 months agoMITView on GitHub

Runs recurring agent loops: fixed or dynamic intervals, CI/PR babysitting, and re-invoking prompts/skills until stop criteria. Use for watch-until-done work. Emits LOOP_PLAN / LOOP_STATUS. Never starts unbounded loops without stop conditions or spam-notifies without signal.

5 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

8 rules. 0 are common, 6 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 4 edited versions we read keep these.

  • 6

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Very specific:

    Every loop needs stop criteria (success/fail/timeout/max ticks).

    line 37
  2. Distinctive:

    Prefer signal-based wakes (CI status, log sentinel) over blind sleep when possible.

    line 38
  3. Distinctive:

    Stop cleanly and report why.

    line 43
  4. Distinctive:

    Check for existing matching loop.

    line 49
  5. Very specific:

    Run body once immediately.

    line 51
  6. Distinctive:

    Never arm infinite loops without max ticks/timeout.

    line 100
  7. Distinctive:

    Never force-push or prod-mutate on a timer without explicit scope.

    line 101
  8. Distinctive:

    Never spam full reports every tick — delta only.

    line 102

“Common” is measured: kept by at least 6 in 10 of the 4 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Purpose

Arm a controlled loop that re-runs a prompt or skill path on an interval (or dynamically) until success, failure, timeout, or user stop.

When to Use / When NOT to Use

Use when: babysit CI/PR checks; watch deploys; poll until green/red; recurring /loop style work; long-running verification.

Do not use when: one-shot tasks; tight interactive coding sessions where a loop adds noise; production mutate-on-timer without explicit approval.

Preconditions

Clear work unit (prompt or skill + args) and stop criteria. If interval omitted, use dynamic mode with rationale.

Inputs / Outputs

Inputs: prompt/skill to run, interval or dynamic, stop criteria, optional gh/CI identifiers.

Outputs: LOOP_PLAN then recurring LOOP_STATUS updates.

Upstream / Downstream

Upstream: engineering-os, quality-gate, user.

Downstream: any skill named in the loop body; pr-generator; incident-commander if loop detects sev.

Core Principles

  1. Every loop needs stop criteria (success/fail/timeout/max ticks).
  2. Prefer signal-based wakes (CI status, log sentinel) over blind sleep when possible.
  3. One loop per purpose; do not duplicate existing loops.
  4. First run immediate; then interval — avoid double-fire on start.
  5. Status updates are short; full work only on tick.
  6. Destructive actions require explicit user approval each time (or pre-approval scope).
  7. Stop cleanly and report why.

Process

  1. Parse: interval (30s/5m/2h) or dynamic; body prompt/skills; stop criteria.
  2. Emit LOOP_PLAN — purpose, interval, stop, max ticks, sentinel.
  3. Check for existing matching loop; reuse or stop duplicates.
  4. Arm background waiter / poller as environment allows; or instruct host loop tool.
  5. Run body once immediately; record LOOP_STATUS.
  6. On each tick: run body; evaluate stop; update LOOP_STATUS.
  7. On stop: final status, summary of changes, artifacts produced.

Presets

  • babysit-pr — poll checks until success/fail
  • babysit-ci — watch workflow run
  • until-qg-pass — re-run quality-gate path
  • custom — user prompt

Evidence Requirements

Tick times, commands, CI URLs, stop reason. No fake “still running” without checking.

Stop Conditions / Failure Modes

ConditionAction
No stop criteriaRefuse to arm
Max ticks / timeoutStop; LOOP_STATUS failed/timeout
User says stopStop immediately
Body returns Block CriticalStop and escalate

Severity + Confidence

Escalate to incident-commander if loop observes prod SEV signals.

Output Contract

## LOOP_PLAN
Purpose: ...
Interval: ... | dynamic
Body: skill/prompt
Stop criteria: ...
Max ticks: ...
## LOOP_STATUS
Tick: N
Observed: ...
Decision: continue | stop
Stop reason: ...

Handoffs

engineering-os, quality-gate, pr-generator, incident-commander.

Never

  • Never arm infinite loops without max ticks/timeout.
  • Never force-push or prod-mutate on a timer without explicit scope.
  • Never spam full reports every tick — delta only.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.