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/haidrrrry/loop-engineering-skills/loop-engineeringnpx skills add haidrrrry/loop-engineering-skills --skill loop-engineeringgit clone --depth 1 https://github.com/haidrrrry/loop-engineering-skillsWrote 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/haidrrrry/loop-engineering-skills/loop-engineering)<a href="https://agentmods.dev/skills/haidrrrry/loop-engineering-skills/loop-engineering"><img src="https://agentmods.dev/badge/skills/haidrrrry/loop-engineering-skills/loop-engineering.svg" alt="Measured on agentmods" 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 | $0.00131 | $0.01731 |
| Opus 5 | $0.00066 | $0.00865 |
| Sonnet 5 | $0.00026 | $0.00346 |
| Haiku 4.5 | $0.00013 | $0.00173 |
Grade A, and why
loop-engineering 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 3d 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 — 152 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Loop Engineering
Turn one-shot answers into iterated, verified answers. This skill encodes five correction loops, the rules for choosing between them, and — critically — the rules for when NOT to loop.
The core principle: never loop without an anchor
Research on LLM self-correction is blunt: asking a model to "review your answer and fix mistakes" with no external reference degrades accuracy as often as it improves it. Models exhibit self-bias (they favor their own output), are poorly calibrated (confident in wrong answers), and have a self-correction blind spot (they fix errors in other people's text but not their own).
What works is looping against an anchor — something outside the raw answer:
- an executable test or check
- a rubric written before the answer
- a decomposed spec the answer must satisfy
- a persona/context shift that breaks self-bias
- real error messages, tool output, or user-provided ground truth
Every loop below has a built-in anchor. If you find yourself about to revise with no anchor ("hmm, let me just look at this again"), stop — either pick a loop or ship the answer as-is.
Choosing a loop
| Task type | Loop | Anchor |
|---|---|---|
| Code, math, data, anything executable/checkable | Verify Loop | Tests / checks derived before or independently of the answer |
| Writing, explanations, creative work | Stranger Review Loop | Persona + context shift |
| Complex or vague multi-part tasks | Decompose Loop | Explicit spec / requirement list |
| Quality-critical deliverables (reports, designs, plans) | Rubric Loop | Rubric written before answering |
| Decisions, strategies, arguments | Red Team Loop | Adversarial role with a defined attack surface |
Maximum 2 revision iterations per loop unless an executable check is still failing. Gains past iteration 2 are marginal and the risk of revising a correct answer into a wrong one rises.
The five loops
1. Verify Loop (strongest — use whenever output is checkable)
What ships with it
1 file 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.
- 3d ago First seen · 152 lines · 131 tokens per session scan A e4c5beb9b00d
loop-engineering is a skill published in the GitHub repository haidrrrry/loop-engineering-skills (2 stars, last pushed 2mo ago), licensed MIT. It adds 131 tokens to every session and 1,731 once invoked, about $0.0007 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-31.
Other skills, from other repositories
security-observability
只读查询 agent-sec-cli 已落盘的历史安全事件记录,并据此生成会话级安全复盘。仅当用户显式要求查看或审计已发生的安全事件、安全告警、安全审计记录,或要求按 session/run/trace/时间/类别筛选与统计已有安全事件,或要求复盘某次会话的安全判定时使用。不用于扫描新内容:检查代码安全性用 code-scanner,检测 prompt 注入用 prompt-scanner,审查 Skill 安全状态用 skill-ledger。不要因为对话中出现“安全”“工具调用”等字样、或为了主动自查而触发。.
skill-ledger
Skill 安全状态查看、风险暴露审查、用户决策、快速扫描认证与可选深度扫描。支持用户主动查看或扫描单个/全部 Skill;当用户要求 agent 安装 Skill 且安装成功后,必须自动对最终本地目录执行快速扫描认证。.
regex-mastery
Use this skill when writing regular expressions, debugging pattern matching,optimizing regex performance, or implementing text validation. Triggers on regex, regular expressions, pattern matching, lookahead, lookbehind, named groups, capture groups, backreferences, and any task requiring text pattern matching.
install-openclaw
Install and configure OpenClaw non-interactively with Alibaba Cloud Model Studio. Use when the user asks to install OpenClaw, configure Aliyun Bailian/Model Studio/DashScope credentials, choose pay-as-you-go, Coding Plan, or Token Plan billing, set Base URL/model config, optionally configure DingTalk, start the local…
prompt-scanner
使用 agent-sec-cli 扫描 prompt 文本中的注入攻击和越狱尝试,返回结构化 JSON 扫描结果。当用户提到 prompt 安全、prompt 注入检测、越狱检测、提示词攻击检测,或者需要判断一段文本是否包含恶意 prompt 注入时,都应使用此技能。即使用户没有明确说"扫描",只要涉及评估 prompt 文本的安全性,也应触发此技能。.
ws-ckpt
工作区快照管理。用户说"保存一下"、"存个快照"时创建 checkpoint,仅限 Linux; 说"回滚"、"撤销"、"恢复到之前"时 rollback;说"删掉快照"时 delete; 说"对比快照"、"快照改了什么"时 diff; 说"看看快照"、"有哪些快照"时 list;说"查看快照状态"、"查看快照剩余空间"时 status。.