BC agentsop-bounded-loop
Universal discipline for any LM-driven loop — agent retries, plan-act-observe, multi-agent handoffs, optimiser passes, test-fix cycles. Encodes the one rule every framework documents quietly and every team relearns expensively: the LM in the loop is NEVER a reliable terminator. Termination must be provided by an explicit counter + exit predicate + stagnation signal + escalation path that live OUTSIDE the LM's control. This is a tool- level, framework-agnostic skill. It maps onto LangGraph (recursion_limit + state counter + interrupt), CrewAI (max_iter + max_rpm + human_input), Claude / OpenAI SDKs (max_iterations + tool_use_budget), DSPy (declared evaluation budget), Aider (REPL + explicit retry cap), and AutoGen (max_consecutive_auto_reply). Search keywords: infinite loop, recursion limit, recursion_limit, GraphRecursionError, max iterations, max_iter, agent stuck, agent won't stop, runaway agent, ReAct loop not terminating, agent repeating itself.
Universal discipline for any LM-driven loop — agent retries, plan-act-observe, multi-agent handoffs, optimiser passes, test-fix cycles.
As a process C 51/100 · Has gaps — weak spots: result and completion, when it triggers, inputs and preconditions
How to improve
- Say in the description WHEN to use the skill ("use when…", example requests): that is the agent's main cue.
- The SKILL.md body is over 5,000 tokens: move reference detail into references/ and load it when needed.
- Your own cases (evals/evals.json, 4–6 real requests with expected answers): the full check would then run those instead of a model-drafted suite.
- A spec.yaml with trigger phrases and assertions — a behaviour contract for CI; `skilltest init` writes a template.
Guard findings · 0
✓ No critical or high findings
Files scanned: 5. Evidence is masked. Grey chips explain why severity was lowered.
Against the Agent Skills spec
- warning
description-no-whendescription does not say WHEN to use the skill (no "use when") - warning
body-longSKILL.md body ≈ 6861 tokens (recommended < 5000); move details to references/ - note
edit-residuethe text marks something as outdated (lines 74): check that old rules are not kept next to new ones — the full check reads the text for contradictions
Process rating: all ten parameters 51/100
- 0Result and completion. Does not say what the result is
- 0Inputs and preconditions. Does not say what the process needs to start
- 20When it triggers. No condition that starts the skill
- 30Running it twice. 3 mutating operations with no state check
- 60Tools and files. Uses tools (web, python, node) that frontmatter does not declare
- 70Execution cost. Instruction body is 6861 tokens
- 85Steps. 119 steps, 1 vague phrases
- 100Failures and branches. 3 branches, has a failure section
- 100Consistency. Name and required fields are in place
- 100Progress reporting. Reports progress
- medium Safety rules and hard prohibitions inside a skill: they belong in the system prompt, here they protect nothing
Everything here is measured from the skill text rather than judged by a model, so the numbers are checkable. A parameter weighs more when it is a more common reason for the process to stall.
Quality signals
- +5Description has no quoted example phrases that should trigger the skill
- +4Description does not say when NOT to use the skill (false activations)
- +3Description length 963: 120–800 characters recommended
- +3Output format is not stated: the model decides each time
- +1No license
- +2Single-language instructions
- +4Structure: 28 headings
- +3Step-by-step instructions: 119 items
- +4Has examples (4 code blocks)
- +4Reference files are cited in the instructions (2 of 2)
Quality base 70; lint remarks subtract, signals add up to 100. Result: 63.