loop-engineeringlisted
Install: claude install-skill JZKK720/cubecloud-skills-bundle-kit
# Loop Engineering
Build and operate the infrastructure that runs autonomous agent loops — the
mechanism layer that schedules, monitors, scores, and recovers loops. This is
the engineering counterpart to loopy (which designs loop content and
boundaries).
## When to use
- Building a new autonomous agent loop from scratch
- Adding scheduling, monitoring, or recovery to an existing loop
- Auditing loop infrastructure for reliability gaps
- Setting up loop governance (rate limits, budgets, approval gates)
- Debugging a loop that stalls, spins, or silently fails
## Core concepts
### Loop anatomy
Every loop has:
- **Trigger**: What starts it (cron, webhook, event, manual)
- **Body**: The work it does (triage → act → verify)
- **Gate**: What stops it (budget, time, approval, success signal)
- **Recovery**: What happens on failure (retry, escalate, pause, alert)
### Loop health scoring
Score loops on:
- **Completion rate**: % of runs that reach a terminal state
- **Budget adherence**: % of runs within token/cost budget
- **Action rate**: % of runs that produce a meaningful action (not just "no-op")
- **Recovery rate**: % of failures that self-recover without human intervention
### Governance patterns
- **Budget caps**: Hard limits on tokens, cost, or wall-clock time per run
- **Approval gates**: Human-in-the-loop for high-impact actions
- **Rate limits**: Max runs per hour/day, cooldown between runs
- **Audit trail**: Every run logs its trigger, actions, and outcome
## MCP