design-control-loop
What it does
This skill teaches an agent how to design an automated loop that keeps improving a codebase in small steps. It asks questions first, proposes options that fit the repo, and then builds the design you agree on.
When to use it
- βWhen a team wants a codebase property, such as an old pattern, moved toward a target through small changes over time.
- βWhen a user wants a scheduled agent to make low-risk changes that a person reviews.
- βWhen a user is unsure how to automate repeated codebase work and wants a design first.
Skill link
https://github.com/humanlayer/skills/blob/main/plugins/design-control-loop/skills/design-control-loop/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
Example of what to ask your AI
βI want our codebase to drop its old API calls gradually. Help me design an automated loop for it that a person reviews.β
5 new skills a week. 1 minute to read.
How it works
The agent interviews you about the goal and the risks, reads the repo's tools, and proposes a design using a sensor, controller, and actuator model. After you agree, it builds the local parts and a scheduled workflow.
Technical content (original SKILL.md)
Original text by the author, straight from 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/skillsand 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.
- 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
FAQ
What is the sensor in this design?
It is the part that measures how far the codebase is from the target goal.
Does it apply changes without review?
No. The skill keeps a person on the loop to steer it, and changes arrive as reviewable pull requests.
Does it assume a fixed toolset?
No. The skill says the design must fit the user's codebase and the tools they already use.
Details
Original description by the author
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
Popularity
- GitHub stars
- 5.5k
- Ranking position
- #14775
- License
- MIT
- Updated
- 11/1/2026
Comments
- β¦
More skills from this repository
build-iterated-agentic-loop
5.5kHelps your agent turn a repeated coding task into a repo skill plus a scheduled GitHub Actions workflow that runs a coding agent, with a memory file and one open PR per loop.
improve-claude-md
5.5kHelps your agent rewrite a CLAUDE.md file with conditional blocks, so important instructions are followed when they apply and the rest stays out of the way.
rpi
5.5kHelps your agent research a change, work through its design, and implement it in clear phases, with a document for each step you can review.
visual-pr
5.5kHelps your agent write or update a pull request description that explains why a change exists and how it is built, using a clear template and a short visual outline.
Similar skills
openclaw-update
394kHelps your agent update an existing OpenClaw Gateway, choosing the update method that fits how it was installed and keeping your session working.
diagnose-gateway
394kHelps your agent find out why your OpenClaw Gateway is failing by checking settings, channels, and ports without changing anything.
crabbox-apps
394kHelps your agent open and run an app on a temporary cloud machine, then show its view in your chat side panel.