跳到正文
Skillpedia
部署与云(DevOps)5.5k · #14775

design-control-loop

它能做什么

这项技能教智能体如何设计一个自动化循环,使代码库能够分小步持续改进。它会先提出问题,提出适合该仓库的方案,然后构建你认可的设计。

适用场景

  • ✓当团队希望通过长期的小改动,把代码库的某项特性(例如旧的写法)逐步推向目标的时候。
  • ✓当用户希望定时运行的智能体做低风险改动,并由人进行审阅的时候。
  • ✓当用户不确定如何将重复的代码库工作自动化,并希望先有一份设计的时候。

技能链接

https://github.com/humanlayer/skills/blob/main/plugins/design-control-loop/skills/design-control-loop/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/humanlayer/skills/blob/main/plugins/design-control-loop/skills/design-control-loop/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“我希望我们的代码库逐步去掉旧的 API 调用。请帮我设计一个自动化循环,并由人进行审阅。”

每周 5 个新技能,1 分钟读完。

工作原理

智能体会先询问你的目标和风险,阅读仓库中的工具,然后用传感器、控制器和执行器模型提出设计方案。经你同意后,它会构建本地部分以及定时工作流。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Design Control Loop

Use this skill when a user wants to drive some property of their codebase toward a target with small, low-risk, reviewable changes on a schedule — an agentic control loop.

Your job is to interview the user, design the loop with them, and then build it for them. The design must be tailored to their codebase and the tooling they already use. There is no fixed toolset and no template to reproduce: propose options grounded in what you find in the repo, discuss trade-offs, agree on a design, then implement it.

The mental model

Borrow from control theory. The codebase is a dynamic system being changed continuously (by teammates, dependencies, and generated code — the disturbances). A control loop drives it toward a desired state instead of all at once:

  • Set point — the desired end state for some property of the codebase.
  • Sensor — measures the current state, producing the gap to the set point.
  • Controller — decides the next small, low-risk change from that measurement.
  • Actuator — a coding agent that applies the change and opens a PR.
  • The result feeds back into the next run. A human stays on the loop to steer it.

Read references/control-loop-taxonomy.md and walk the user through these concepts before designing anything. For one fully worked example, see references/example-control-loop.md — treat it as an illustration, not a blueprint.

How to run this skill

  • Read the repo before you ask (Phase A). Come to the interview with proposals, not a blank form.
  • Tailor every component. The right sensor, controller, and actuator depend entirely on the user's problem and stack. The lists in the references are examples to spark discussion, never a checklist to push.
  • Make each component runnable locally and standalone before wiring it into CI (Phase D). The workflow should only orchestrate pieces the user can already run by hand.
  • Capture the agreed design in writing before building, so the user can correct it cheaply.

Outputs

Create or update these in the target repo, tailored to the agreed design:

  • The sensor and controller as version-controlled commands/scripts the user can run locally.
  • .claude/skills/<skill-name>/SKILL.md — the actuator skill capturing the agent's judgement (path may be .agents/skills/... per repo convention).
  • The recurring workflow that runs the loop and opens a PR (GitHub Actions by default; whatever CI the repo uses).
  • A memory/feedback file that carries standing feedback between runs.
  • Optionally, a dampener (regression gate) that keeps the problem from getting worse while the loop improves it.

Workflow

Phase A — Understand the system

Read the following references: references/example-control-loop.md.

Read before asking setup questions:

  • Existing CI: .github/workflows/*.yml, .github/actions/**, or the repo's non-GitHub CI config — runner, checkout, dependency install, cache, and PR conventions.
  • Package manager files (package.json, bun.lock, pnpm-lock.yaml, yarn.lock, package-lock.json, pyproject.toml, go.mod, Cargo.toml, …).
  • Existing validation scripts: typecheck, lint, test, quality, format, and package-scoped commands.
  • Existing .claude/skills / .agents/skills and any existing agent loops (workflows, agent-memory, where glue scripts live) to mirror conventions instead of inventing new ones.
  • The static-analysis, linting, codegen, and test tooling already in the repo — these are the most likely raw material for a sensor.
  • Discover packages, services, and repo purpose at a high level.

Completion criterion: you can name the repo's package manager, install command, likely validation commands, CI platform, and any existing loop conventions. You understand the packages/services/applications it contains at a high level.

Phase B — Design the loop with the user

Read the following references: references/control-loop-taxonomy.md, references/example-control-loop.md, references/agent-runner-templates.md.

This is an interview. Work through each component below. Start by asking the user questions about the set point. Proposing options grounded in Phase A and surfacing trade-offs rather than mandating any choice. Record the decisions as you go.

  1. Set point. What property are we driving, and to what target? Examples: an invariant ("no procedures use the old pattern"), a threshold ("test coverage ≥ X in these pack
常见问题

这种设计中的传感器是什么?

它是用来衡量代码库距离目标还有多远的部分。

它会不经审阅就应用改动吗?

不会。这项技能让人始终参与循环进行引导,改动会以可审阅的拉取请求形式提交。

它假设使用固定的工具集吗?

不会。这项技能说明,设计必须适合用户的代码库和他们已经使用的工具。

详情

作者的原始描述

interview the user to design an agentic control loop (sensor, controller, actuator under disturbances) tailored to their codebase, then build it as locally-runnable components plus a scheduled coding-agent workflow

repo: humanlayer/skills

热度

GitHub 星标
5.5k
排名
#14775
许可证
MIT
更新时间
2026/11/1

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能