ai-loop-engineering
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "ai-loop-engineering" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-ba33abe739844ab6c6acde9d4c4889ddcddbb00b94d2eea3e73ed5fb5e1b647e. Verify the upstream source and version against https://skillhub.cn/skills/user_638e256a/ai-loop-engineering before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
skillhub.cn
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
AI autonomous-runner skill: give the AI a goal and it completes the full process autonomously. Use when you need the AI to self-execute tasks, form automated closed-loops, and persistently retry until success. Five-step loop: intent setting → context collection → action execution → result observation → dynamic adjustment.
Introduction source: third_party · user_638e256a · 1.0.0 Reference
SkillPi interpretation
- Tasks
- Translation pending; see source documentation.
- Testing
- Not tested
Browse files
Frontmatter
name: ai-loop-engineering
description: AI自动跑腿 — 给AI一个目标,它自己跑完全程。当你需要AI自主执行任务、自动化闭环、持续重试直到成功时使用此技能。五步闭环:意图设定→上下文采集→行动执行→结果观察→动态调整,让AI从被提示进化为自己跑。AI自动跑腿
概述
基于Loop Engineering理念,设计Agent自主执行循环系统。核心五步闭环:意图设定 -> 上下文采集 -> 行动执行 -> 结果观察 -> 动态调整。让Agent从"被提示"进化为"自己跑完全程",实现目标驱动的自动化任务闭环。
核心架构
1. 循环状态机
PENDING -> COLLECTING -> EXECUTING -> OBSERVING -> ADJUSTING -> COMPLETED/FAILED
状态定义:
- PENDING: 任务已接收,待解析意图
- COLLECTING: 正在采集上下文信息
- EXECUTING: 正在执行操作
- OBSERVING: 正在观察验证结果
- ADJUSTING: 根据观察结果动态调整策略
- COMPLETED: 任务成功完成
- FAILED: 任务失败(达到最大循环次数或超时)
2. 意图解析器
- 将高层目标拆解为可验证的子任务
- 生成明确的成功标准和验收条件
- 识别循环终止条件
3. 上下文管理器
- 自动采集相关项目文件
- 收集日志和文档
- 维护上下文摘要
- 支持上下文窗口管理
4. 执行引擎
- 调用工具执行操作
- 支持代码修改、文件操作、命令执行
- 记录执行轨迹
5. 结果验证器
- 对比实际输出与预期输出
- 判断成功/失败/需要调整
- 提供详细的验证报告
6. 动态调整器
- 失败时自动分析原因
- 生成调整策略
- 实现智能重试
循环模式
简单循环
适用于单目标单路径任务:
意图 -> 采集 -> 执行 -> 观察 -> 完成
嵌套循环
适用于多层级子任务:
外层循环(目标A)
-> 内层循环(子任务1)
-> 内层循环(子任务2)
-> 完成
并行循环
适用于可并行执行的多任务:
[任务1] -> 执行
[任务2] -> 执行 -> 结果聚合 -> 完成
[任务3] -> 执行
保护机制
最大循环次数
- 默认:10次
- 可配置
- 超过阈值强制终止
超时保护
- 单次循环超时:300秒
- 任务总超时:3600秒
- 可自定义
人工介入点
- 关键决策点暂停
- 危险操作确认
- 异常状态上报
使用方式
CLI命令
python main.py --action start --input "目标描述"
python main.py --action status --input "任务ID"
python main.py --action abort --input "任务ID"
参数说明
--action: start/status/abort/report--input: 目标描述或任务ID--max-loops: 最大循环次数--timeout: 超时时间(秒)--mode: simple/nested/parallel
输出格式
状态报告
{
"task_id": "xxx",
"status": "EXECUTING",
"loop_count": 3,
"current_phase": "OBSERVING",
"progress": 0.65,
"findings": [...],
"next_action": "调整策略重试"
}
完成报告
{
"task_id": "xxx",
"status": "COMPLETED",
"total_loops": 5,
"duration": 120,
"result": "成功",
"summary": "...",
"artifacts": [...]
}
应用场景
- 自动化代码重构任务
- 持续集成测试循环
- 数据处理流水线
- 文档自动生成
- 系统配置自动化
输出质量约束(强制)
执行此技能时,输出必须满足以下要求,否则视为无效:
- 最低字数:每次输出不少于500字(中文字符),禁止仅输出框架标签或模板化摘要
- 必须包含具体内容:
- 意图解析:必须将目标拆解为至少3个可验证的子任务,每个包含具体输入、预期输出和成功标准
- 上下文采集:必须列出采集到的具体文件、数据或环境信息,不能只写"已采集"
- 执行步骤:必须给出每一步的具体操作描述和执行结果,不能只写"执行成功"
- 结果观察:必须对比实际输出与预期输出的差异,给出具体判断
- 调整策略:失败时必须分析具体原因并提出具体调整方案
- 完成报告:必须包含总循环次数、每轮的关键发现、最终成果摘要
- 禁止空话:不允许出现"建议查找资料"等回避性回答
- 进度必须真实:COMPLETED状态progress=1.0,不能用固定比例
输出示例(start模式)
目标:将项目中的JavaScript代码从CommonJS转为ESM
意图解析:
- 子任务1:扫描所有.js文件,识别require/module.exports用法
- 子任务2:将require改为import,module.exports改为export
- 子任务3:更新package.json添加"type":"module"
- 子任务4:运行测试验证转换正确性
成功标准:所有文件无require/module.exports,测试全部通过
循环1 - COLLECTING:
- 扫描到src/目录下12个.js文件
- 其中8个使用require,5个使用module.exports
- 发现2个文件使用动态require(需特殊处理)
循环2 - EXECUTING:
- 转换utils.js:require('fs') → import fs from 'fs'
- 转换config.js:module.exports = {...} → export default {...}
- 动态require改用import()异步加载
循环3 - OBSERVING:
- 运行npm test → 3个测试失败
- 原因:__dirname和__filename在ESM中不可用
- 需要用import.meta.url替代
循环4 - ADJUSTING → EXECUTING:
- 替换所有__dirname为fileURLToPath(import.meta.url)
- 替换所有__filename为类似方式
循环5 - OBSERVING:
- npm test → 全部通过 ✓
- 状态:COMPLETED
最终报告:
- 总循环:5次
- 转换文件:12个
- 关键发现:动态require和__dirname是主要难点
- 总耗时:约120秒Current listing version
1.0.0
Safety and assessment details
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 提供AI自主执行循环系统,解决自动化任务闭环的实际痛点
- 适用于代码重构、数据处理、文档生成等多种高频场景
- 五步闭环设计完整,从意图设定到动态调整形成完整工作流
Highlights
- description清晰定义了使用场景和目标用户
- 触发词完整覆盖AI自主执行、自动化闭环等核心概念
- 边界清晰,不易与其他Skill混淆
Areas to improve
-
缺少When to Use章节 Reported severity: Minor
文档中缺少明确的When to Use使用场景说明章节
Recommendation: 建议添加When to Use章节,明确说明在什么情况下使用此Skill
-
缺少端到端完整示例 Reported severity: Minor
虽然有输出示例,但缺少一个完整的端到端执行流程示例
Recommendation: 建议添加一个完整的从start到COMPLETED的端到端示例
-
文档结构可优化 Reported severity: Minor
核心架构和使用方式之间可以增加更多过渡说明
Recommendation: 建议在核心架构和使用方式之间添加实现原理说明
Highlights
- 文档结构基本完整,包含状态机、循环模式、保护机制等关键信息
- 提供了CLI命令和参数说明,便于用户快速上手
- 输出格式定义清晰,包含状态报告和完成报告
Areas to improve
-
工具来源说明不足 Reported severity: Minor
CLI命令中使用的python main.py缺少工具来源说明
Recommendation: 建议说明main.py的来源或提供获取方式
-
异常处理细节不足 Reported severity: Minor
虽然提到了保护机制,但缺少具体的异常处理流程说明
Recommendation: 建议补充各种异常情况下的具体处理策略
Highlights
- 提供了完善的保护机制,包括最大循环次数和超时保护
- 支持人工介入点,确保关键操作的安全性
- 参数配置灵活,支持多种循环模式
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
These common operations were not identified in the main document. This does not mean no permissions or risks exist.
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.