loops
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseLoops — find, install, run & build recurring agents
Loops — 查找、安装、运行并构建周期性Agent
The full lifecycle for agentic loops — the format behind agenticloops.dev.
LOOP.mdAn agentic loop is an installable, recurring AI agent defined in one file: a trigger, a set of skills, and a prompt. One file defines it; any harness (Claude Code, Cursor, Codex, GitHub Actions, a 5dive runtime) can install and run it on a schedule.
This one skill covers the whole lifecycle — the loop-level analogue of and in one:
find-skillsskill-creator- Find an existing loop in the directory
- Install / run it on your harness
- Author a new when nothing fits
LOOP.md
Always try 1–2 before 3. Search the directory and install an existing loop when one fits; only build a new one when nothing does. The authoritative format is spec v0.1 at github.com/5dive-ai/loops; when a field is ambiguous, defer to the spec.
The CLI for the whole flow is ( · · · · ). On a 5dive runtime, the native path is .
npx agenticloopsfindinstallrunlistupdate5dive loop find|show|installAgentic循环的完整生命周期——agenticloops.dev背后的格式。
LOOP.mdAgentic循环是一个可安装、定时运行的AI Agent,由一个文件定义:触发器、一组技能和一个提示词。一个文件即可完成定义;任何harness(Claude Code、Cursor、Codex、GitHub Actions、5dive运行时)都可安装并定时运行它。
这一项技能涵盖了整个生命周期——相当于循环级别的和二合一:
find-skillsskill-creator- 查找目录中的现有循环
- 安装/运行到你的harness中
- 编写新的(当没有合适的现有循环时)
LOOP.md
始终优先执行步骤1-2,再考虑步骤3。搜索目录并安装合适的现有循环;只有在没有合适循环时才构建新循环。权威格式为github.com/5dive-ai/loops上的v0.1规范;当字段存在歧义时,以规范为准。
整个流程的CLI命令为(包含····)。在5dive运行时上,原生命令为。
npx agenticloopsfindinstallrunlistupdate5dive loop find|show|installPart A — Find & install an existing loop
第一部分 — 查找并安装现有循环
Do this first whenever the user wants a recurring agent for a job.
当用户需要周期性Agent执行任务时,首先执行此步骤。
A1. Understand the job
A1. 明确任务
Identify the job (competitive intel, PR triage, security scan, news digest), the cadence (hourly, daily, on an event), and whether it's a single-agent job or a pipeline (gather → draft → publish = a multi-agent loop).
确定任务内容(竞品情报、PR分类、安全扫描、新闻摘要)、执行频率(每小时、每日、事件触发),以及它是单Agent任务还是流水线任务(收集→起草→发布 = 多Agent循环)。
A2. Search the directory
A2. 搜索目录
bash
npx agenticloops find <query> # searches agenticloops.devExamples: "watch our competitors" → ; "triage new PRs" → ; "daily security scan" → . Or browse agenticloops.dev directly (ci-analyst, intel-brief, autonomous-pr-loop, agentic-security-scanner, daily-news-radar, issue-triage-bot, …).
find competitive intelfind pr triagefind securitybash
npx agenticloops find <query> # 搜索agenticloops.dev示例:“监控我们的竞品” → ;“分类新PR” → ;“每日安全扫描” → 。或者直接浏览agenticloops.dev(包含ci-analyst、intel-brief、autonomous-pr-loop、agentic-security-scanner、daily-news-radar、issue-triage-bot等)。
find competitive intelfind pr triagefind securityA3. Vet before recommending
A3. 验证后再推荐
A loop runs unattended on a schedule, so vet it harder than a skill:
- Proof, not popularity. The directory ranks on verifiable, signed run receipts, not stars — prefer a loop that emits receipts (proof it actually did the job).
- Read the block — the trust surface: exactly which
requiresbinaries,cli(names),secretsservers, andmcpegress the loop touches, before it runs. Confirm the user is comfortable with all of it.network - Source reputation — official entries over an unknown author.
5dive-ai/loops - Can the harness honor the trigger? A loop needs scheduling — a run-only harness (an IDE) can run it once but can't fire it on time. Target a scheduler (5dive, GitHub Actions, cron); the installer warns otherwise.
循环会定时无人值守运行,因此要比验证技能更严格:
- 优先看验证记录,而非流行度。目录按可验证的签名运行记录排名,而非星标数——优先选择能生成运行记录(证明实际完成任务)的循环。
- 阅读块——信任范围:明确列出循环运行时会接触的
requires二进制文件、cli(名称)、secrets服务器和mcp出站请求,在运行前确认用户对所有内容都满意。network - 来源可信度——优先选择官方条目,而非未知作者的内容。
5dive-ai/loops - **harness是否支持触发器?**循环需要调度功能——仅支持单次运行的harness(如IDE)可以运行一次,但无法定时触发。请选择支持调度的工具(5dive、GitHub Actions、cron);安装程序会对此发出警告。
A4. Install (and test-run first)
A4. 安装(先进行测试运行)
bash
npx agenticloops install <owner/loop> --dry-run # validate + pre-flight, change nothing
npx agenticloops run <owner/loop> --harness=<id> # optional: one live run to see it work
npx agenticloops install <owner/loop> --yes # register the recurring jobbash
npx agenticloops install <owner/loop> --dry-run # 验证+预检查,不做任何更改
npx agenticloops run <owner/loop> --harness=<id> # 可选:单次实时运行以查看效果
npx agenticloops install <owner/loop> --yes # 注册周期性任务native on a 5dive box:
在5dive主机上的原生命令:
5dive loop install <slug> --onto=<agent> [--cron="…"]
`--harness` auto-detects. Supply any `requires.secrets` host-side at install (the installer prompts) — secrets are names in the file, never values. Manage installed loops with `npx agenticloops list` and `npx agenticloops update [<slug>]`.
If nothing in the directory fits → go to Part B and author one.
---5dive loop install <slug> --onto=<agent> [--cron="…"]
`--harness`会自动检测。安装时在主机端提供所有`requires.secrets`(安装程序会提示)——secrets仅为文件中的名称,绝不包含值。使用`npx agenticloops list`和`npx agenticloops update [<slug>]`管理已安装的循环。
如果目录中没有合适的循环 → 进入第二部分编写新循环。
---Part B — Author a new loop
第二部分 — 编写新循环
B1. Capture intent
B1. 捕捉需求
A loop is a recurring job, so pin down four things (mine the conversation first):
- The job — what one unit of work does this agent do each run? (one sentence; it becomes the prompt)
- The trigger — a (
schedule,every 4h,daily @ 07:00, or raw cron) or anweekdays @ 09:00(event,task-done,pr-opened). One is required.push - The skills — capabilities it leans on (e.g. ,
deep-research). Optional but common.compile-knowledge - The environment — any CLI binary, secret, MCP server, or network egress? These go in for install-time pre-flight.
requires
If the job is a pipeline (gather → draft → publish), it's a multi-agent loop — see the template below.
agents:循环是周期性任务,因此需要明确四点(先从对话中提取):
- 任务内容——Agent每次运行时完成的单个工作单元是什么?(一句话;将作为提示词)
- 触发器——(
schedule、every 4h、daily @ 07:00或原始cron表达式)或weekdays @ 09:00(event、task-done、pr-opened)。必须二选一。push - 技能——依赖的能力(如、
deep-research)。可选但常用。compile-knowledge - 环境要求——是否需要任何CLI二进制文件、密钥、MCP服务器或网络出站请求?这些将放在中供安装时预检查。
requires
如果任务是流水线(收集→起草→发布),则属于多Agent循环——请参阅下面的模板。
agents:B2. Write the LOOP.md
B2. 编写LOOP.md
A loop is a directory whose name is the loop id, containing one . Frontmatter = manifest; body = starter prompt.
LOOP.mdmarkdown
---
name: ci-analyst # kebab-case, ≤64 chars, matches the folder name
description: > # what it does + when to use it (drives discovery)
Competitive-intel analyst — watches every competitor and the field, catches
what changed, and writes a digest before it matters.
schedule: every 4h # or: event: pr-opened (one trigger is REQUIRED)
skills: # owner/repo/skill is explicit & recommended
- 5dive-ai/skills/deep-research
- 5dive-ai/skills/compile-knowledge
requires: # what must ALREADY be true in the env (declare-and-check)
cli: [gh] # binaries on PATH
secrets: [X_API_TOKEN] # env-var NAMES only — never values
mcp: [github] # optional MCP servers
network: [api.x.com] # optional egress allowlist
tier: frontier # capability hint: frontier | standard | fast (NEVER a vendor model)
effort: high # reasoning budget: high | medium | low
concurrency: skip # overlap policy: skip | queue | replace | allow
timeout: 30m # per-run wall-clock cap (optional)
budget: 200k # per-run spend cap: tokens (200k) or cost ($2.00) (optional)
tags: [research, market-intel]
license: MIT
---
Scan our competitor set and the field for the last interval — launches, pricing,
funding, notable chatter. Update the watchlist and, once a day, write a concise
sourced briefing of what changed and what it means for us, then post it to the team.Only , , and a trigger ( or ) are required. Start minimal; add fields as the job needs them.
namedescriptionscheduleeventMulti-agent (pipeline) template — an ordered chain replaces the single body. Roles run strictly in array order; each role's structured output is injected at in the next:
agents:{{previous_output}}markdown
---
name: intel-brief
description: Competitive-intel pipeline — a researcher gathers what changed, a writer turns it into a sourced briefing.
schedule: every 4h
tier: frontier
effort: high
agents:
- role: researcher # kebab id, unique in the loop
skills: [deep-research, compile-knowledge] # per-role, additive to top-level skills
prompt: |
Scan our competitor set and the field for the last interval. Return a
structured list of what changed, with sources. No prose, just findings.
- role: writer
skills: [copywriting]
prompt: |
From the findings below, write a concise sourced briefing of what changed
and what it means for us, then post it to the team.
Findings:
{{previous_output}}
tags: [research, multi-agent]
license: MIT
---Triggers, , , , , , , and stay top-level — they govern the whole run, not one role.
requirestiereffortconcurrencytimeoutbudgettags循环是一个目录,名称为循环ID,包含一个文件。前置元数据(Frontmatter)= 清单;正文=初始提示词。
LOOP.mdmarkdown
---
name: ci-analyst # kebab-case格式,≤64字符,与文件夹名称匹配
description: > # 功能及适用场景(用于搜索发现)
竞品情报分析师——监控所有竞品及行业动态,捕捉变化,并在产生影响前编写摘要。
schedule: every 4h # 或:event: pr-opened (必须指定一个触发器)
skills: # 推荐明确指定owner/repo/skill
- 5dive-ai/skills/deep-research
- 5dive-ai/skills/compile-knowledge
requires: # 环境中必须已具备的条件(声明并检查)
cli: [gh] # PATH中的二进制文件
secrets: [X_API_TOKEN] # 仅为环境变量名称——绝不包含值
mcp: [github] # 可选的MCP服务器
network: [api.x.com] # 可选的出站请求白名单
tier: frontier # 能力提示:frontier | standard | fast(绝不能指定厂商模型)
effort: high # 推理预算:high | medium | low
concurrency: skip # 重叠策略:skip | queue | replace | allow
timeout: 30m # 每次运行的最长时间限制(可选)
budget: 200k # 每次运行的花费上限:token数(200k)或金额($2.00)(可选)
tags: [research, market-intel]
license: MIT
---
扫描我们的竞品及行业在上一周期的动态——产品发布、定价、融资、重要讨论。更新监控列表,并且每天编写一份简洁的、带来源的简报,说明发生了什么变化以及对我们的影响,然后发布给团队。仅、和触发器(或)是必填项。从最简版本开始;根据任务需求添加字段。
namedescriptionscheduleevent多Agent(流水线)模板——有序的链替代单个正文。角色严格按数组顺序运行;每个角色的结构化输出会注入到下一个角色的中:
agents:{{previous_output}}markdown
---
name: intel-brief
description: 竞品情报流水线——研究员收集变化信息,撰稿人将其转化为带来源的简报。
schedule: every 4h
tier: frontier
effort: high
agents:
- role: researcher # kebab格式ID,在循环中唯一
skills: [deep-research, compile-knowledge] # 每个角色的技能,会添加到顶层技能中
prompt: |
扫描我们的竞品及行业在上一周期的动态。返回结构化的变化列表,并附上来源。无需散文,仅需结果。
- role: writer
skills: [copywriting]
prompt: |
根据以下结果,编写一份简洁的、带来源的简报,说明发生了什么变化以及对我们的影响,然后发布给团队。
结果:
{{previous_output}}
tags: [research, multi-agent]
license: MIT
---触发器、、、、、、和保持在顶层——它们控制整个运行过程,而非单个角色。
requirestiereffortconcurrencytimeoutbudgettagsB3. Validate
B3. 验证
There's no standalone command — validation is folded into and . Use a dry-run install to check the manifest against spec v0.1 and pre-flight without registering anything:
validateinstallrunrequiresbash
npx agenticloops install ./ci-analyst --dry-run --no-telemetryA line means the manifest parsed. Fix any schema errors; unknown fields are warnings, not errors. A missing secret/CLI shows up as a pre-flight — that's the check working, not a bad manifest.
✓ <name>✗没有独立的命令——验证已整合到和中。使用预安装试运行检查清单是否符合v0.1规范,并预检查,无需注册任何内容:
validateinstallrunrequiresbash
npx agenticloops install ./ci-analyst --dry-run --no-telemetry出现行表示清单解析成功。修复任何架构错误;未知字段会显示警告而非错误。缺少密钥/CLI会显示预检查——这是检查功能正常,而非清单错误。
✓ <name>✗B4. Test-run once, now
B4. 立即进行单次测试运行
bash
npx agenticloops run ./ci-analyst --harness=claude-code
npx agenticloops run ./ci-analyst --harness=claude-code --budget='$0.50' # hard cap via `claude --max-budget-usd`--harnessbash
npx agenticloops run ./ci-analyst --harness=claude-code
npx agenticloops run ./ci-analyst --harness=claude-code --budget='$0.50' # 通过`claude --max-budget-usd`设置硬性上限--harnessB5. Publish
B5. 发布
Publishing = pushing a conforming public repo, no curation step:
- Put the in a public GitHub repo (the folder name is the loop id).
LOOP.md - Add the GitHub topic .
agenticloops - The crawler finds it, validates it, and indexes it. Others install with .
npx agenticloops install <owner/repo>
Ranking is proof, not popularity — loops that emit verifiable signed run receipts outrank ones that just have stars.
发布即推送符合规范的公开仓库,无需审核步骤:
- 将放入公开GitHub仓库(文件夹名称为循环ID)。
LOOP.md - 添加GitHub主题。
agenticloops - 爬虫会发现它,进行验证并编入索引。其他人可使用进行安装。
npx agenticloops install <owner/repo>
排名依据验证记录,而非流行度——能生成可验证签名运行记录的循环排名高于仅有点赞的循环。
Golden rules (the ones that trip people up)
黄金规则(容易出错的要点)
- Model-agnostic: , never a vendor model. Write
tier; the harness maps it to its own lineup. Namingtier: frontier | standard | fast/opusin agpt-5breaks portability. A specific model is a host-side install override (LOOP.md), never in the file.--model=opus - Secrets are NAMES, never values. declares that the loop needs a token; the value is supplied host-side at install and never enters the file or repo.
secrets: [X_API_TOKEN] - is declare-and-check, not an installer. It lists what must already be true; the installer pre-flights and prompts for what's missing. Only
requiresare ever fetched.skills - A trigger is required. or
schedule. And it needs a scheduler — an IDE-only harness can run the agent but can't honor a recurring trigger.event - Multi-agent handoff is structured, not chat. Each role passes a defined artifact to , never transcript scraping — that's what makes an unattended run deterministic anywhere.
{{previous_output}} - Prefer explicit skill paths. is unambiguous; a bare name resolves against a default registry and can collide.
owner/repo/skill
- 模型无关:使用,而非厂商模型。请写
tier;harness会将其映射到自身的模型阵容。在tier: frontier | standard | fast中指定LOOP.md/opus会破坏可移植性。特定模型是主机端的安装覆盖项(gpt-5),绝不能写入文件。--model=opus - Secrets仅为名称,绝不包含值。声明循环需要一个令牌;值在安装时由主机端提供,绝不会进入文件或仓库。
secrets: [X_API_TOKEN] - 是声明并检查,而非安装程序。它列出必须已具备的条件;安装程序会预检查并提示缺少的内容。只有
requires会被获取。skills - 必须指定触发器。或
schedule。并且需要调度器——仅支持IDE的harness可以运行Agent,但无法执行周期性触发器。event - 多Agent交接是结构化的,而非聊天式。每个角色将定义好的工件传递给,绝不会抓取对话记录——这是确保无人值守运行在任何环境下都能确定执行的关键。
{{previous_output}} - 优先使用明确的技能路径。没有歧义;仅使用名称会解析到默认注册表,可能会产生冲突。
owner/repo/skill
Communicating with the user
与用户沟通
Loop users range from engineers to first-time terminal users. Match their level: explain "cron", "MCP", or "egress" briefly if there's any doubt, and lead with the plain-language job ("a bot that emails you a competitor digest every morning") before the YAML. Default to find-first — most people want a job done, not a file authored; reach for Part B only when the directory has nothing that fits.
循环用户涵盖工程师到首次使用终端的用户。匹配用户的技术水平:如果有疑问,简要解释“cron”、“MCP”或“egress”,先以通俗易懂的语言描述任务(“每天早上给你发竞品摘要的机器人”),再介绍配置内容。默认优先查找——大多数用户只想完成任务,而非编写文件;只有当目录中没有合适的循环时才使用第二部分。