Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/agentsope/skillalchemy/agentsop-bounded-loopnpx skills add agentsope/SkillAlchemy --skill agentsop-bounded-loopgit clone --depth 1 https://github.com/agentsope/SkillAlchemyWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00218 | $0.07389 |
| Opus 5 | $0.00109 | $0.03694 |
| Sonnet 5 | $0.00044 | $0.01478 |
| Haiku 4.5 | $0.00022 | $0.00739 |
Grade A, and why
agentsop-bounded-loop scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 606 lines — stays where its author put it; the contents beside it link to each section on GitHub.
bounded-loop · O7
Source posture: every load-bearing claim is cited inline with a short tag resolved against
references/R1-source-evidence.mdandreferences/R2-cross-framework.md. Examples cite the real GitHub issues they're distilled from.
1. 何时激活 (Activation Rules)
Activate this skill when any of the following is true:
- The task involves a workflow that contains a cycle — tool-call → reflect → retry, plan → act → observe → re-plan, draft → critique → revise, test → fix → re-test.
- The user is hitting a framework's "loop too deep" error:
GRAPH_RECURSION_LIMIT(LangGraph),MaxIterationsExceeded(LangChainAgentExecutor), "agent exceeded max_iter" (CrewAI),max_turns reached(OpenAI Agents SDK),stop_reason="max_tokens"mid-tool-use (Anthropic). - The user proposes "let's just raise the limit" / "set max_iter to 100" /
recursion_limit=200— this is the canonical anti-pattern this skill exists to prevent. - The user is building a multi-agent system with delegation, handoff,
or supervisor patterns — these are exposure-multipliers for unbounded
loops (see
[gh/crewai-330]). - The user is building an optimiser / evaluator loop (DSPy, AutoEval, RLHF, self-refining agent) where "stop when good enough" is the termination criterion — this is never sufficient on its own.
- The user wants a test-fix loop, self-healing code agent, or iterative refinement workflow — every code-agent in production (Cursor, Aider, Devin, Claude Code) ships with an explicit step budget.
Do not activate for: single LLM calls, one-shot RAG queries, stateless tool pipelines, or flows where the cycle is provably bounded by data (e.g., "iterate once per row in this fixed list").
2. 核心心智模型 (Core Mental Model)
Every loop body must produce a state change that proves progress — and the proof must be checkable without calling another LM.
Read that twice. It contains four claims:
- The body must change state. A no-op iteration (same input → same output) is the definition of a stuck loop. If your body might return the same value twice, the loop is already broken; the safety net just hasn't fired yet.
What ships with it
3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2d ago First seen · 606 lines · 218 tokens per session scan A 55ba9e3b096e
agentsop-bounded-loop is a skill published in the GitHub repository agentsope/SkillAlchemy (342 stars, last pushed 8d ago), licensed MIT. It adds 218 tokens to every session and 7,389 once invoked, about $0.0011 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
skills-vote-local
Use when retrieving the most relevant skills from a local or private skill library instead of relying on network-based skill discovery.
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).
research-deep
Read research outline, launch independent agent for each item for deep research. Disable task output.
yao-meta-skill
Create, improve, or evaluate an existing skill from workflows, prompts, SOPs, scripts. Use for migration/release/package, routing, evals/tests, install/trust checks, 优化已有 skill, 补 trigger 评测. Exclude summary/translation/docs, brainstorming, one-off prompts, copy-only edits, outline-only requests.
biomed-skill-creator
Create new biomedical skills or improve existing ones for the OpenBioMed toolkit. Use this skill when: (1) Creating a new skill from scratch, (2) Capturing a workflow as a reusable skill, (3) Automating a biomedical task, (4) Improving an existing skill. This skill guides through an interactive process: define intent…
collaborating-with-gemini
Use the Gemini CLI to consult Gemini and delegate coding tasks for prototyping, debugging, and code review. Supports multi-turn sessions via SESSIONID. Optimized for low-token, file/line-based handoff.