Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Loopx — Agent Loop 工程设计引导 Skill / Interactive Agent Loop Engineering Guide Skill

交互式引导完成 Agent Loop(智能体循环)工程设计的 AI 技能:每个关键环节由 AI 分析上下文并生成 1~5 个候选方案,通过多 IDE 兼容的交互式提问引导用户逐项决策,最终输出完整 Loop 设计产物。

An AI skill that interactively guides you through Agent Loop engineering design: at every key station, the AI analyzes your context and generates 1–5 candidate options, walking you through decisions via cross-IDE interactive prompts, and finally producing a complete Loop design document.

中文 README | English README


简介 / Overview

Loopx 蒸馏自《Agent Loop 工程手册》(中英文双版),将 Observe → Think → Act → Observe … 闭环的工程规范封装为可交互的技能流程。无论是设计新 Loop、评审现有实现,还是排查循环震荡、上下文膨胀等线上问题,Loopx 都会按六个站点逐步引导,并在每站给出带推荐标记(⭐)与权衡说明的候选方案,让设计决策显式化、可追溯。

Loopx distills the bilingual Agent Loop Engineering Handbooks into an interactive skill built around the Observe → Think → Act → Observe … closed cycle. Whether you are designing a new loop, reviewing an existing implementation, or debugging production issues such as oscillation or context bloat, Loopx guides you through six stations, presenting candidate options with a recommendation marker (⭐) and trade-off notes at each stop — making every design decision explicit and traceable.


核心特性 / Key Features

  • 六站交互工作流 / Six-station interactive workflow:意图识别 → 任务分型 → 架构选型(含 Prompt 工程)→ 终止策略 → 基建选型(记忆/工具/反思/安全护栏/性能优化)→ 自检与产物 / Intent Recognition → Task Classification → Architecture Selection (+ Prompt Engineering) → Termination Policy → Infrastructure Selection (Memory / Tools / Reflection / Safety Guardrails / Performance Optimization) → Checklist & Deliverable
  • 动态选项生成 / Dynamic option generation:每站由 AI 基于上下文生成 1~5 个差异化候选方案,含适用条件、权衡代价与 ⭐ 推荐依据;上下文不足时先澄清再生成 / 1–5 differentiated candidates per station, each with applicability, trade-offs, and a reasoned ⭐ recommendation; clarifying questions are asked first when context is insufficient
  • 英文为主 + 语境自动切换 / English-primary with auto language switching:Skill 基础内容为英文;第 0 章语言检测根据用户最新消息自动切换交互产物语言——中文用户走中文交互 + core-spec-zh.md,英文用户走英文交互 + core-spec-en.md / the skill's base content is in English; Section 0 (Language Detection) auto-switches the interaction and deliverable language based on the user's latest message — Chinese users get Chinese interaction + core-spec-zh.md, English users get English interaction + core-spec-en.md
  • 八 IDE 兼容 / Eight-IDE compatibility:统一编号选项块 + 各环境原生提问组件映射与降级规则 / a universal numbered-option block plus per-environment mapping and fallback rules for native question UIs
  • 结构化产物 / Structured deliverables:决策汇总表、状态机草图、终止条件配置表、可观测埋点字段表、落地自检清单(14 项:基础 8 + Prompt 工程 1 + 安全护栏 3 + 性能优化 2)/ decision summary table, state machine sketch, termination config table, telemetry field table, and production checklist (14 items: 8 basics + 1 prompt engineering + 3 safety guardrails + 2 performance)
  • 按需加载知识库 / On-demand knowledge loadingreferences/ 三份参考文件按站点加载,避免一次性塞满上下文 / the three files under references/ are loaded per station instead of all at once

兼容工具矩阵 / Compatibility Matrix

工具 / Tool 调用入口 / Invocation 提问方式 / Question Style
Trae /loopx 命令或语义触发 / /loopx command or semantic trigger AskUserQuestion 原生组件 / Native AskUserQuestion component
Trae Work /loopx 命令或语义触发 / /loopx command or semantic trigger AskUserQuestion 原生组件 / Native AskUserQuestion component
Claude Code 将 SKILL.md 放入项目并引用 / Place SKILL.md in project and reference it AskUserQuestion(≤4 选项)/ AskUserQuestion (≤4 options)
Cursor Composer/Chat 中 @引用 SKILL.md / @-reference SKILL.md in Composer/Chat 编号列表,回复编号 / Numbered list; reply with number
Codex 复制 SKILL.md 内容到上下文 / Paste SKILL.md into context 纯文本编号列表 / Plain-text numbered list
OpenCode 加载 SKILL.md 到会话 / Load SKILL.md into session 编号列表 / Numbered list
WorkBuddy 上传 SKILL.md 为知识库文档 / Upload SKILL.md as knowledge doc 编号列表 / Numbered list
CodeArts 加载 SKILL.md 到会话 / Load SKILL.md into session 编号列表(遵循其提问规范)/ Numbered list (per its prompt conventions)

本 Skill 仅使用标准 Markdown,无 HTML、无 Mermaid、无工具专有指令,跨工具渲染一致。

This skill uses only standard Markdown — no HTML, no Mermaid, no tool-specific directives — so it renders consistently across tools.


安装与使用 / Installation & Usage

安装 / Installation

  1. 将本仓库克隆或下载到本地。 / Clone or download this repository.
  2. 按上表将 SKILL.md 接入你使用的 IDE(保持 references/ 目录与 SKILL.md 的相对位置不变)。 / Wire SKILL.md into your IDE per the matrix above (keep references/ in the same relative location as SKILL.md).

触发方式 / Triggers

  • 命令触发 / Command:在支持的 IDE 中输入 /loopx / type /loopx in supported IDEs
  • 语义触发 / Semantic:输入包含「Agent Loop / 智能体循环 / 推理循环 / 执行闭环 / ReAct 循环」等关键词的请求 / any request containing keywords such as "Agent Loop", "ReAct loop", "reasoning loop", or "execution closed-loop", e.g.:
    • 「帮我设计一个客服 Agent 的循环」 / "Design a ReAct loop for a research agent"
    • "Design a ReAct loop for a research agent" / "Review my current agent loop implementation"
    • 「我的 Agent 一直在重复调用同一个工具,帮我排查」 / "My agent keeps calling the same tool repeatedly — help me debug it"

快捷指令 / Quick Commands

  • 输入「默认」或 default:采用全部 ⭐ 推荐项,跳过后续提问,直接输出最终产物。 / Type default: accept all ⭐ recommendations, skip remaining questions, and jump straight to the final deliverable.
  • 输入「0」或「其他」:提供自定义方案。 / Type 0 or "other": supply a custom option.

交互流程示例 / Interaction Example

用户 / User: /loopx 帮我设计一个订单处理 Agent / Design an order-processing agent

AI (Station 1 · 任务分型 / Task Classification):
该任务需要按顺序完成 校验→计价→扣库存→通知 四个子任务,请确认任务分型:
The task requires four sequential subtasks: validate → price → reserve stock → notify. Please confirm the classification:
1. 多步流程 —— 顺序子任务链,无分支;实现最简单 ⭐ 推荐:子任务为线性依赖
   Multi-step workflow — linear subtask chain, no branching; simplest to build ⭐ Recommended: subtasks are linearly dependent
2. 状态图分支 —— 若计价失败需回滚库存,存在条件跳转;需引入状态机
   State-graph branching — pricing failure requires stock rollback (conditional jumps); needs a state machine
0. 其他/自定义(请说明) / Other (please specify)

用户 / User: 1

AI (Station 2 · 架构选型 / Architecture Selection):
...

目录结构 / Repository Structure

loopx/
├── SKILL.md                      # 技能主入口(英文为主,语境自动切换)/ Skill entry point (English-primary, auto language switching)
├── references/
│   ├── core-spec-zh.md           # 中文核心规范(4 阶模型/组件/状态机/痛点/清单)
│   ├── core-spec-en.md           # English core specification (aligned with the Chinese version)
│   └── option-playbook.md        # 选项生成手册(英文为主,六站候选池与澄清模板)/ Option-generation playbook (English-primary)
├── README.md                     # 本文档(双语)/ This document (bilingual)
├── README.ch.md                  # 中文 README / Chinese README
└── README.en.md                  # English README

License

MIT License

About

Lightweight Agent Loop Skills | 工程化智能体循环调度技能

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors