Install any skill in seconds. Free to start, no credit card required.
Get Started Free →huytieu/loop-engineering
Shared loop-engineering reference for COG skills - the agent loop, deterministic verifiers, termination conditions, in-loop context management, and named patterns.
Passed 19 of 20 test cases with the skill, and 9 of 20 without it.
and 15 more in the full report
11 fixed10 passed either way1 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 9 test cases the skill fixed. Same model, same prompt, with and without the skill.
For an automated vault consolidation task, we want the process to keep scanning notes repeatedly until zero new themes are identified across consecutive passes. Which standard pattern models this behavior?
| Checked | Without skill | With skill |
|---|---|---|
| Selects the Loop-until-dry pattern. | Missed | Passed |
The instructions your model reads when the skill loads.
TL;DR: Some COG skills are not one-shot prompts. They are loops: act, observe, verify, decide whether to continue. This skill is the shared vocabulary those skills use. The iron rule: trust deterministic checks, never the agent's own "looks done" self-report. Every loop must declare its verifier, its stopping conditions, and which pattern it follows.
This is a reference and design aid, not a content-generating workflow. Skills that loop (daily-brief, knowledge-consolidation, url-dump, weekly-checkin, and research/triage skills like auto-research and scout) link here instead of restating the rules. Invoke it directly when you are building or fixing an iterative skill.
A chain runs fixed steps: A then B then C. A loop is dynamic: the agent takes an action, reads real feedback (a fetched page, a date stamp, a file count), reasons about it, and repeats until a goal is met or a stop condition fires. Most knowledge-work that "keeps going until good enough" is a loop, and COG benefits from naming the loop explicitly rather than hoping a single prompt nails it.
┌──────────────────────────────────────────────┐
│ 1. Gather pull context (vault + sources) │
│ 2. Act one step: search / fetch / scan │
│ 3. Observe read the real result │
│ 4. Verify run the deterministic check │
│ 5. Update write progress to a vault file │
│ 6. Decide continue? → loop │
│ stop? → finish + report │
└──────────────────────────────────────────────┘
Step 4 is the load-bearing one. A loop without a verifier is just a chain that repeats.
A robust loop needs several exits so it always halts:
| Exit | What it is | Example |
|---|---|---|
| Deterministic verifier | A mechanical pass/fail that confirms the goal | "Publication date is within 7 days" |
| Hard iteration cap | Max passes, no matter what | "Stop after 5 searches per topic" |
| Budget guard | Max time / tool calls / tokens | "Stop after 20 fetches total" |
| No-progress detection | Recent passes changed nothing | "2 searches in a row found nothing new" |
| Human escalation | Hand a stuck loop back to the user | "Asked twice, still unclear: ask the user" |
Pick the verifier plus at least one safety exit (cap or budget) for every loop. No-progress detection is what stops the quiet infinite loops that a cap alone misses.
test cases passed, vs 9 / 20 without
More skills from the same source and nearby in the registry, with their headline benchmark lift.