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 skills add ApexIQ/skillsmith --skill loop_operatorgit clone --depth 1 https://github.com/ApexIQ/skillsmithWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/apexiq/skillsmith/loop_operator)<a href="https://agentmods.dev/skills/apexiq/skillsmith/loop_operator"><img src="https://agentmods.dev/badge/skills/apexiq/skillsmith/loop_operator/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/apexiq/skillsmith/loop_operator"><img src="https://agentmods.dev/badge/skills/apexiq/skillsmith/loop_operator.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What 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.1 | $0.00040 | $0.02374 |
| Opus 5.5 | $0.00016 | $0.00950 |
| Sonnet 5.5 | $0.00008 | $0.00475 |
| Haiku 4.5 | $0.00004 | $0.00237 |
Grade A, and why
loop-operator 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 3mo 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 — 305 lines — stays where its author put it; the contents beside it link to each section on GitHub.
🔄 Loop Operator — Autonomous Execution with Safety
Philosophy: Autonomous loops are powerful but dangerous. Every loop must have a clear exit condition, a safety budget, and a checkpoint mechanism. Unbounded loops are bugs, not features.
1. When to Use This Skill
- Running multi-step agentic workflows autonomously
- Processing batches of tasks (files, tests, migrations)
- Implementing retry logic with exponential backoff
- Building CI/CD pipeline stages
- Any iterative process that needs bounded execution
2. The Autonomous Loop Contract
Every autonomous loop MUST have these 5 properties:
| Property | Description | Example |
|---|---|---|
| Exit Condition | When does the loop stop successfully? | All tests pass, all files processed |
| Max Iterations | Hard cap on loop cycles | max_iterations=50 |
| Max Duration | Hard cap on wall-clock time | max_hours=2 |
| Failure Budget | How many consecutive failures before abort | early_stop_fails=3 |
| Checkpoint | State saved after each iteration for resume | checkpoint_dir=.agent/loops/ |
The Bounded Loop Template
import time
import json
from pathlib import Path
class BoundedLoop:
def __init__(
self,
max_iterations: int = 50,
max_duration_seconds: int = 7200,
early_stop_fails: int = 3,
checkpoint_dir: str = ".agent/loops",
):
self.max_iterations = max_iterations
self.max_duration_seconds = max_duration_seconds
self.early_stop_fails = early_stop_fails
self.checkpoint_dir = Path(checkpoint_dir)
self.checkpoint_dir.mkdir(parents=True, exist_ok=True)
self.iteration = 0
self.consecutive_failures = 0
self.start_time = time.time()
self.results = []
def should_continue(self) -> bool:
"""Check all exit conditions."""
if self.iteration >= self.max_iterations:
print(f"⛔ Max iterations reached ({self.max_iterations})")
return False
elapsed = time.time() - self.start_time
if elapsed >= self.max_duration_seconds:
print(f"⛔ Max duration reached ({self.max_duration_seconds}s)")
return False
if self.consecutive_failures >= self.early_stop_fails:
print(f"⛔ Too many consecutive failures ({self.early_stop_fails})")
return False
return True
def checkpoint(self, state: dict):
"""Save state for resume capability."""
checkpoint = {
"iteration": self.iteration,
"elapsed_seconds": time.time() - self.start_time,
"consecutive_failures": self.consecutive_failures,
"state": state,
"results": self.results,
}
path = self.checkpoint_dir / "latest.json"
path.write_text(json.dumps(checkpoint, indent=2))
def record_result(self, success: bool, details: dict):
"""Track iteration outcomes."""
if success:
self.consecutive_failures = 0
else:
self.consecutive_failures += 1
self.results.append({
"iteration": self.iteration,
"success": success,
"details": details,
})
self.iteration += 1
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.
- 3mo ago First seen · 305 lines · 40 tokens per session scan A 83dc5375d190
loop-operator is a skill published in the GitHub repository ApexIQ/skillsmith (5 stars, last pushed 8mo ago), licensed MIT. It adds 40 tokens to every session and 2,374 once invoked, about $0.0002 per session on Opus 5.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-31.
loop-operator compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| loop-operatorApexIQ/skillsmith | Skill | 5 | 8mo ago | MIT | A | 40 | Claude Code, Codex |
| pptxaxoviq-ai/synthadoc | Skill | 2.0k | today | AGPL-3.0 | A | 10 | Claude Code, Codex |
| xlsxaxoviq-ai/synthadoc | Skill | 2.0k | today | AGPL-3.0 | A | 9 | Claude Code, Codex |
| agentic-sql23blocks-OS/ai-maestro-plugins | Skill | 11 | yesterday | MIT | A | 98 | Claude Code |
| agent-devices23blocks-OS/ai-maestro-plugins | Skill | 11 | yesterday | MIT | A | 91 | Claude Code |
| pdfsmith-network-solutions/threadknot | Skill | 9 | 11d ago | Apache-2.0 | A | 88 | Claude Code, Codex |
| memory-searchevoelsewhere/evoflux | Skill | 13 | 26d ago | Apache-2.0 | A | 112 | Claude Code |