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 kangarooking/loop-engineering-skill --skill loop-three-elementsgit clone --depth 1 https://github.com/kangarooking/loop-engineering-skillWrote 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/kangarooking/loop-engineering-skill/loop-three-elements)<a href="https://agentmods.dev/skills/kangarooking/loop-engineering-skill/loop-three-elements"><img src="https://agentmods.dev/badge/skills/kangarooking/loop-engineering-skill/loop-three-elements/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/kangarooking/loop-engineering-skill/loop-three-elements"><img src="https://agentmods.dev/badge/skills/kangarooking/loop-engineering-skill/loop-three-elements.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.00122 | $0.01633 |
| Opus 5.5 | $0.00049 | $0.00653 |
| Sonnet 5.5 | $0.00024 | $0.00327 |
| Haiku 4.5 | $0.00012 | $0.00163 |
Grade A, and why
loop-three-elements 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 2mo 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 — 109 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Source Metadata
Original cangjie-skill frontmatter from the distillation run:
name: loop-three-elements
description: |
设计或审计任何循环系统的起点: 将循环拆解为 Trigger(触发器)、Action(动作)、Stop Condition(停止条件) 三要素。
当用户需要设计一个新循环、诊断一个失效循环、或向他人解释"什么是 Loop"时使用。
不适用于: 单次任务执行、非循环的自动化脚本、或已经稳定运行无需重新设计的系统。
关键 trigger: "设计一个 loop"、"这个循环为什么不停止"、"什么是 loop 的最小结构"。
source_book: "Loop Engineering 视频合集 (Gillock/Cherny/Steinberger/Idoos Money/小木头)"
source_chapter: 视频1/3/4
tags: [loop-design, core-concept, trigger, action, stop-condition]
related_skills: [loop-worthiness-test, goal-verification, loop-build-path]
Loop 三要素 — 任何循环的最小可工作结构
R — Reading (原文)
"A loop is three things: a trigger, an action, and a stop condition." — Adam Gillock (视频1)
"第一块心跳,它用来自动触发... 第二块工作树... 第三块skill... 第四块连接器... 第五块子智能体... 最后就是那根脊柱——记忆。" — 小木头 (视频3)
I — Interpretation (自述)
任何循环系统,无论多复杂,都可以拆解为三个基本要素:
- Trigger (触发器): 什么条件下启动循环? 可以是定时 (cron)、事件 (新邮件到达)、或状态变化 (CI 失败)。
- Action (动作): 循环启动后执行什么操作? 这是循环的主体逻辑。
- Stop Condition (停止条件): 何时判定任务完成并退出循环? 可以是目标达成 (凑够 5 条)、次数上限 (最多 8 轮)、或状态判断 (无新任务)。
三要素缺一不可: 没有 trigger 的循环不知道何时开始; 没有 action 的循环是空壳; 没有 stop condition 的循环会无限运行直到资源耗尽。
A1 — Past Application (书中案例)
案例1: Boris Cherny 的 Support Loop (视频2)
- Trigger: 每 30 分钟定时启动
- Action: 读取新 support ticket → AI 分类+回复 → 记录摩擦/想法到 signals 文件夹
- Stop Condition: 无新 ticket 或达到最大处理数
案例2: 小木头的选题 Loop (视频3)
- Trigger: 每天早上 8 点 (cron)
- Action: 拉取过去 24h AI 资讯 → 用 topic-score 子智能体评级 → 追加到 inbox.md
- Stop Condition: 无新资讯或 inbox 达到上限
A2 — Future Trigger (未来触发)
用户会在以下情境下需要这个 skill:
- 设计新循环时: "我想让 AI 每天自动做 X" → 先问: trigger 是什么? action 是什么? 何时停止?
- 诊断失效循环时: "我的 loop 跑了 3 天还没停" → 检查 stop condition 是否缺失或过主观
- 向团队解释 Loop 时: 用三要素作为教学框架,让非技术人员理解循环系统的结构
- 比较不同 Loop 实现时: 用三要素作为分析框架,对比不同方案的触发策略和停止逻辑
语言信号: "设计一个 loop"、"这个循环怎么停"、"什么是 loop 的最小结构"、"帮我看看这个 loop 缺什么"
与相邻 skill 的区别:
loop-worthiness-test: 判断"要不要做 loop" (本 skill 假设已决定要做,关注"怎么做")goal-verification: 关注 stop condition 的设计 (本 skill 是三要素的整体框架)loop-build-path: 关注构建步骤 (本 skill 是静态结构分析)
What ships with it
2 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.
- 2mo ago First seen · 109 lines · 122 tokens per session scan A 8fcd65e1387b
loop-three-elements is a skill published in the GitHub repository kangarooking/loop-engineering-skill (28 stars, last pushed 4mo ago), licensed MIT. It adds 122 tokens to every session and 1,633 once invoked, about $0.0005 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-30.
loop-three-elements compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| loop-three-elementskangarooking/loop-engineering-skill | Skill | 28 | 4mo ago | MIT | A | 122 | Claude Code, Codex |
| imagegenopenai/codex | Skill | 135k | today | Apache-2.0 | A | 113 | Codex |
| playwright-climicrosoft/playwright | Skill | 100k | today | Apache-2.0 | A | 19 | Claude Code |
| browser-automationopenclaw/openclaw | Skill | 394k | today | MIT | A | 36 | Claude Code |
| local-ai-agentsmicrosoft/ai-agents-for-beginners | Skill | 80k | 6d ago | MIT | A | 200 | Claude Code, Codex |
| next-cache-components-adoptionvercel/next.js | Skill | 143k | today | MIT | A | 95 | Claude Code |
| systematic-debuggingobra/superpowers | Skill | 317k | 9d ago | MIT | A | 21 | Claude Code |