agentsclimarketplace

Loop design

Skill manastalukdar/ai-devstudio/skills/loop-design

Pre-flight readiness checklist for a new loop before enabling unattended execution — verifies maker/checker split, state file, budget caps, denylist, kill switch, attempt cap, and human escalation pathsFrom its SKILL.md

Install
npx -y skills add manastalukdar/ai-devstudio --skill loop-design

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

6.1 KB, ~1.5k tokens by cl100k_base, as published. Nobody here has run it

Loop Design Checklist

Score a loop design before enabling it for unattended runs. A loop missing key safety controls is not production-ready — this skill helps you find what's missing before it causes problems.

Usage

/loop-design "<loop name or description>"   # score a loop you're about to enable
/loop-design --pattern <name>               # check a named pattern (pr-babysitter, ci-sweep, etc.)
/loop-design --audit                        # audit all currently configured loops

Behavior

Step 1 — Establish the loop under review

If $ARGUMENTS names a pattern (pr-babysitter, ci-sweep, dep-sweep, issue-triage, post-merge, daily-triage), load its known structure. Otherwise, ask:

  1. What does this loop do? (one sentence)
  2. What is the cadence? (every N minutes/hours/days)
  3. What actions can it take? (report-only / propose fix / apply fix / open PR / merge)
  4. What external systems does it touch? (GitHub, Linear, Slack, database, etc.)

Step 2 — Score against the readiness checklist

Work through each section and mark PASS / FAIL / MISSING:

Purpose & Scope

  • Single clear goal (one sentence)
  • Explicit non-goals documented
  • Target scope defined (which repos, branches, labels, or queues)
  • Phase rollout planned (report-only first, then act)

Scheduling

  • Cadence chosen and justified (urgency matches interval)
  • Off-hours behavior defined (pause, slow down, or continue)
  • Self-cleanup on empty watchlist (no pointless runs)

Maker / Checker Split

  • Implementer and verifier are separate agents or models
  • Implementer cannot mark its own work "done"
  • Verifier runs tests independently before approving
  • If no verifier: loop is report-only or escalates all actions to human

State / Memory

  • State file or board schema defined
  • Loop reads prior state at start of every run
  • Loop writes outcomes and timestamps at end of every run
  • Resolved/closed items are pruned on each run
  • Human overrides are recorded in state

Human Escalation

  • Attempt cap defined (e.g. max 3 fix attempts per issue)
  • Escalation triggers explicit (cap exhausted, high-risk path, ambiguity)
  • Denylist paths configured (auth, payments, secrets, infra)
  • Notification channel defined (where does escalation land?)

Cost & Safety

  • Token budget estimated per run
  • Daily cap defined in loop-budget.md or equivalent
  • Kill switch documented (label, flag, or loop-pause-all)
  • Run log configured (loop-run-log.md or equivalent)

Connectors (if any)

  • Minimum permissions for each connector (read vs write)
  • Bot identity clear on any auto-posted comments/PRs
  • Write-scope connectors require verifier or human gate

Step 3 — Calculate readiness score

SectionMax pointsScoring
Purpose & Scope205 per item
Scheduling155 per item
Maker/Checker Split25pass/fail per item
State / Memory255 per item
Human Escalation205 per item
Cost & Safety205 per item
Connectors15conditional

Readiness levels:

  • L1 (≥ 60): Safe for report-only runs
  • L2 (≥ 80): Safe for supervised fix-proposal runs
  • L3 (≥ 95): Safe for unattended fix-apply runs

Step 4 — Surface critical blockers

Flag any FAIL in these items as blockers regardless of score:

  • No kill switch → loop can run indefinitely, no way to stop quickly
  • No attempt cap → infinite fix loops and token burn possible
  • Same agent implements and verifies → confirmation bias, weak tests get approved
  • Denylist not configured → loop may touch auth/payments/secrets
  • No state file → loop acts on stale or ghost items from prior runs

Step 5 — Output report

LOOP DESIGN REVIEW — PR Babysitter

Readiness Score: 78/100 → L2 (supervised fix-proposal)

PASS (15/20 items)

BLOCKERS (fix before enabling)
  ✗ No attempt cap — CI fix loop could run forever on a hard regression
    Fix: set max_attempts = 3 per PR in state file

GAPS (improve before L3)
  ✗ No run log — token spend is invisible
    Fix: append JSON entry to loop-run-log.md after each sweep
  ✗ Verifier not configured — fixes are self-approved
    Fix: invoke /loop-verify after each /minimal-fix attempt

RECOMMENDATIONS
  → Start in report-only mode (--dry-run) for 3 days
  → Review STATE.md after first week; prune ghost items
  → Add loop-budget.md with daily cap before enabling L2 actions

Suggested first command:
  /loop 10m /pr-babysitter --dry-run

Anti-Patterns Flagged

The checklist specifically surfaces these known failure modes:

Anti-patternDetected when
Self-verificationSame skill listed as both implementer and verifier
No attempt capNo max_attempts field in state schema
Vague triage outputNo structured output format defined
L3 before L1 qualityActions enabled before report-only phase completed
MCP with broad write scopeConnector has merge/delete/post permissions from day one
No kill switchNo label, flag, or loop-pause-all mechanism defined
Shared state without schemaMultiple loops writing same STATE.md without section ownership

Edge Cases

  • Pattern name not recognized: Ask for the loop description and score from scratch.
  • Existing loop audit (--audit): Find all configured loops by scanning LOOP.md, .github/workflows/, and session schedules, then score each.
  • Score exactly at a tier boundary: Recommend the lower tier until blockers are resolved.

Token Optimization

Expected range: 300–800 tokens

Patterns used: Progressive disclosure (score first, blockers second, full checklist on request), early exit (if loop is report-only with no actions, many safety checks are N/A)

No caching needed: Each loop design is unique; scores are not reusable across sessions.

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 326,679. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.