loop-worker
它能做什么
这项技能在你工作时,按固定的时间表运行 Ruflo 后台工作者,例如安全和测试覆盖缺口检查。适合希望减少手动操作、让例行检查持续进行的人。
适用场景
- ✓当你希望在工作期间重复进行安全或测试覆盖率检查时。
- ✓当某个后台工作者正在运行,你想稍后再查看其进展时。
- ✓当没有新发现时,你希望重复检查停止时。
技能链接
https://github.com/ruvnet/ruflo/blob/main/plugins/ruflo-loop-workers/skills/loop-worker/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“我工作的时候,请每隔几分钟在后台持续运行审计工作者;如果它没有新发现,就停止。”
每周 5 个新技能,1 分钟读完。
工作原理
这项技能在后台启动一个工作者,检查其状态,并在短暂延迟后安排下一次运行。当工作者连续两次报告没有新发现时,循环停止。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Use /loop for in-session periodic workers. Pick the delay from what you are waiting for:
- With the 5-minute prompt-cache TTL,
min(270, cache_ttl * 0.9)= 270s keeps the cache warm (ruflo-autopilot ADR-0001 owns that heartbeat). - If the
ScheduleWakeuptool description says this session uses the 1-hour TTL, a 270s wake buys nothing; poll at 1200-1800s unless the worker finishes faster.
Dispatch a worker via MCP: mcp__plugin_ruflo-core_ruflo__hooks_worker-dispatch({ trigger: "WORKER_NAME" }). It runs in the background by default (background: true), so check on it with hooks_worker-status instead of waiting inline.
Then schedule the next iteration. ScheduleWakeup needs the loop prompt back so the next firing re-enters the loop:
ScheduleWakeup({ delaySeconds: 270, reason: "next WORKER_NAME iteration", prompt: "/loop <the same /loop input>", noop: false })
Stop the loop when the worker reports nothing new twice in a row: ScheduleWakeup({ stop: true }).
Available Workers (12, per ADR-0001 and /ruflo-loop)
| Worker | Priority | Interval | Description |
|---|---|---|---|
| audit | critical | 270s | Security analysis |
| optimize | high | 270s | Performance optimization |
| predict | normal | 270s | Predictive preloading |
| testgaps | normal | 270s | Test coverage analysis |
| ultralearn | normal | 600s | Deep knowledge acquisition |
| deepdive | normal | 600s | Deep code analysis |
| map | normal | 600s | Codebase mapping |
| document | normal | 600s | Auto-documentation |
| refactor | normal | 600s | Refactoring suggestions |
| benchmark | normal | 600s | Performance benchmarking |
| consolidate | low | 600s | Memory consolidation |
| preload | low | 270s | Resource preloading |
The intervals are suggested cadences, not enforced by the dispatcher: 270s keeps the prompt cache warm, and the heavier analysis workers run at 600s because one iteration rarely finishes sooner.
Work you start in the background (a build, a long job) finishes with its own completion notification. Do not poll it with short ScheduleWakeup calls; use a long fallback delay (1200s or more) so the loop survives a hung job.
MCP tool responses include [LOOP_SUGGESTION] and [CRON_SUGGESTION] hints -- follow them.
常见问题
它多久检查一次?
每个工作者都有建议的间隔,例如审计工作者约为 270 秒。如果会话使用较长的缓存窗口,则建议等待更久。
有哪些工作者可用?
这项技能列出了十二个工作者,涵盖安全分析、性能、预测性预加载和测试覆盖等领域。
关闭会话后,循环还会继续运行吗?
不会。它在当前会话中运行,因此会话结束时就会停止。
详情
热度
- GitHub 星标
- 81k
- 排名
- #1642
- 许可证
- MIT
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
agent-adaptive-coordinator
81k帮你的智能体在工作量变化时拆分和重新平衡一组 AI 智能体,并选择适合任务的分工方式。
agent-agent
81k教你的智能体把一个大目标拆成有顺序的行动计划,并在情况变化时重新规划。
agent-agentic-payments
81k帮你的智能体管理 AI 购物的消费授权,包括消费上限、时间窗口、商户规则和签名审批。
agent-analyze-code-quality
81k帮你的智能体检查代码质量,找出代码异味、技术债务和重构建议,且不改动文件。