Continuous Agent Loop
affaan-m/ECC
Patterns for continuous autonomous agent loops with quality gates, evals, and recovery controls.
This skill should be used when the harness, scaffold, workflow, or optimizer itself is the optimization target: recursive self-improvement (RSI) loops, meta-harnesses, self-improving harnesses that…
$ npx skills add guanyang/open-agent-hub --skill self-improvement-loops -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install guanyang/open-agent-hub self-improvement-loops --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/guanyang/open-agent-hub.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/self-improvement-loops .claude/skills/self-improvement-loops && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "self-improvement-loops" agent skill from https://github.com/guanyang/open-agent-hub/tree/main/skills/self-improvement-loops into .claude/skills/self-improvement-loops/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "self-improvement-loops", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/guanyang/open-agent-hub/tree/main/skills/self-improvement-loopsType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add guanyang/open-agent-hub --skill self-improvement-loops -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install guanyang/open-agent-hub self-improvement-loops --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/guanyang/open-agent-hub.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/self-improvement-loops .agents/skills/self-improvement-loops && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "self-improvement-loops" agent skill from https://github.com/guanyang/open-agent-hub/tree/main/skills/self-improvement-loops into .agents/skills/self-improvement-loops/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "self-improvement-loops", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add guanyang/open-agent-hub --skill self-improvement-loops -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install guanyang/open-agent-hub self-improvement-loops --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/guanyang/open-agent-hub.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/self-improvement-loops .cursor/skills/self-improvement-loops && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "self-improvement-loops" agent skill from https://github.com/guanyang/open-agent-hub/tree/main/skills/self-improvement-loops into .cursor/skills/self-improvement-loops/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "self-improvement-loops", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/guanyang/open-agent-hub.git --path skills/self-improvement-loops--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add guanyang/open-agent-hub --skill self-improvement-loops -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install guanyang/open-agent-hub self-improvement-loops --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/guanyang/open-agent-hub.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/self-improvement-loops .gemini/skills/self-improvement-loops && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "self-improvement-loops" agent skill from https://github.com/guanyang/open-agent-hub/tree/main/skills/self-improvement-loops into .gemini/skills/self-improvement-loops/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "self-improvement-loops", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install guanyang/open-agent-hub self-improvement-loopsInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add guanyang/open-agent-hub --skill self-improvement-loops -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/guanyang/open-agent-hub.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/self-improvement-loops .github/skills/self-improvement-loops && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "self-improvement-loops" agent skill from https://github.com/guanyang/open-agent-hub/tree/main/skills/self-improvement-loops into .github/skills/self-improvement-loops/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "self-improvement-loops", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add guanyang/open-agent-hub --skill self-improvement-loops -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install guanyang/open-agent-hub self-improvement-loops --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/guanyang/open-agent-hub.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/self-improvement-loops .opencode/skills/self-improvement-loops && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "self-improvement-loops" agent skill from https://github.com/guanyang/open-agent-hub/tree/main/skills/self-improvement-loops into .opencode/skills/self-improvement-loops/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "self-improvement-loops", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
self-improvement-loopsThis skill should be used when the harness, scaffold, workflow, or optimizer itself is the optimization target: recursive self-improvement (RSI) loops, meta-harnesses, self-improving harnesses that…
Self Improvement Loops is an agent skill from guanyang/open-agent-hub. This skill should be used when the harness, scaffold, workflow, or optimizer itself is the optimization target: recursive self-improvement (RSI) loops, meta-harnesses, self-improving harnesses that mine their own failures and propose bounded edits, evolutionary or population-based search over agent scaffolds, acceptance gates for self-modifying systems, and agentic context evolution where the mechanism that produces context is versioned and evolved. Route governance of a single autonomous loop (locked surfaces…
Its SKILL.md is about 5.6k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including reference files (for example `references/loop-design-evidence.md`).
It sits in Agent Workflows, covering Autonomous loops, Project scaffolding and Quality gates. The repository describes itself as: A lightweight, zero-dependency CLI tool to manage and activate capabilities for AI coding assistants (such as Claude Code, Cursor, Trae, etc.). The licence is MIT.
2 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit acd7c6c. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md (its code samples are python).
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Self Improvement Loops loads about 5.6k tokens when it runs, and up to ~9k if it reads all its reference files. Until then it costs about 191 tokens; SKILL.md has 2,714 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from guanyang/open-agent-hub at commit acd7c6c, republished under its MIT licence (© guanyang). 2,714 words, ~5,624 tokens.
.claude/skills/self-improvement-loops/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.This skill covers systems where the harness is the artifact being optimized: an agent mines its own failures and edits its own scaffold, a meta-agent searches over harness code, a population of workflow candidates evolves against an evaluator, or the mechanism that produces context is itself versioned and improved. The design question shifts from "how do I control one loop" (harness-engineering) to "how do I let a loop rewrite parts of itself without corrupting the signal that steers it".
The controlling constraint across every published system: the loop optimizes whatever signal it is given, including the signal's own weaknesses. Design the loop assuming the optimizer will find every gap between the metric and the intent.
Activate this skill when:
Do not activate this skill for adjacent work owned by other skills:
harness-engineering. That skill defines the control surfaces; this skill defines what happens when the surfaces themselves become the optimization target.evaluation.advanced-evaluation.context-optimization.hosted-agents.project-development.self-managed-context.Published self-improvement systems target progressively deeper objects:
| Rung | Optimized object | Example systems |
|---|---|---|
| 1 | Instruction prompts | Promptbreeder, GEPA |
| 2 | Structured context | ACE (playbook of itemized bullets) |
| 3 | Context mechanism | MCE (the skill that produces context) |
| 4 | Workflow graph | ADAS, AFlow |
| 5 | Harness code | Self-Harness (bounded self-edits), Meta-Harness, Darwin Godel Machine |
| 6 | Optimizer code | STOP (the improver improves the improver) |
Each rung up buys a larger design space and more leverage, and costs more per evaluation with a larger surface for gaming. Fix a recurring failure at the lowest rung that can express the fix. A stale-library failure is a context fix, not a workflow rewrite. Only move up when failure clusters at the current rung persist across candidates.
Recursive structure amplifies base-model quality in both directions. The same recursive improver design that compounds gains with a strong model degrades mean performance across iterations with weaker models (claim-self-improvement-capability-threshold). Two implications:
The evaluator, its instrumentation, permission control, and budget enforcement must live outside the surface the loop can modify. Every documented reward hack broke this invariant: agents removed the logging markers a hallucination detector depended on, and hacking became more frequent when the checking code was visible to the agent (claim-self-improvement-visible-evaluator-hacking). Agents given sight of scoring functions overwrote timing functions and monkey-patched evaluators to return perfect scores (claim-self-improvement-scorer-visibility).
Operational rules:
Accept a self-modification only on measured evidence, using two splits: a held-in split that checks the targeted weakness was resolved, and a held-out split the proposer never sees that checks nothing else regressed. The strictest published gate accepts only when neither split regresses and at least one strictly improves, with repeated evaluation under stochastic scoring; this produced held-out gains across every base model tested (claim-self-improvement-two-split-acceptance). Reject candidates that trade one split against the other even when the sum improves. Log rejected candidates with their evidence so the proposer stops rediscovering them.
Store every candidate as a directory containing its source, scores, and raw execution traces. Let the proposer navigate the archive with search tools (grep-style queries over files) instead of stuffing history into its context window. In direct ablation, a proposer with full raw-trace access materially outperformed both a scores-only proposer and a proposer fed LLM-written summaries of the same traces; summaries recovered none of the lost signal and sometimes hurt (claim-self-improvement-raw-trace-ablation). Do not pre-summarize the archive. Curate access paths, not content.
Evolutionary and RL-style loops collapse toward variants of the current best unless diversity is engineered in. The mechanisms that survived ablation across published systems:
The strongest published pattern for an agent improving its own harness has three stages:
When searching whole harness programs from outside rather than editing a running harness from inside:
Context playbooks that update themselves are the entry-level self-improvement loop, with two named failure modes. Brevity bias: optimizers collapse toward short generic instructions, dropping the domain-specific heuristics that carried the value. Context collapse: letting a model monolithically rewrite accumulated context shrinks it catastrophically in a single step, below the no-adaptation baseline (claim-self-improvement-context-collapse). The working pattern:
One level up, version the mechanism that produces context (the skill: static components plus dynamic operators) separately from the produced context, evolve the mechanism against a validation split only, and warm-start each iteration from the prior best artifact plus its rollout results. Check the train-validation gap explicitly each iteration to catch mechanism overfitting.
Humans move up the stack rather than out of the loop. Reserve for human decision points: changes to the evaluator or acceptance gate, expansion of editable surfaces, promotion of a discovered harness to production, and abandonment decisions for research directions. Models trained mostly on successful outcomes are poorly calibrated on when to abandon a line of work, and preserved negative results are the cheapest way to trim a successor's search space. Make failed candidates first-class artifacts.
Do not enable self-modification until every item holds:
| Recurring failure | Fix at | Loop pattern |
|---|---|---|
| Missing domain heuristics, repeated known mistakes | Structured context | Itemized playbook with delta updates |
| Context playbook itself plateaus across tasks | Context mechanism | Evolve the skill on validation data |
| Wrong sequencing, missing verification steps | Workflow | Search over workflow graphs with per-node experience |
| Failure clusters persist across workflow candidates | Harness code | Failure-driven bounded self-edits or meta-level search |
| Improvement strategy itself is weak | Optimizer code | Only with strong models and locked meta-evaluation |
Example 1: Two-split acceptance gate
def accept(candidate, baseline, held_in, held_out, repeats=3):
d_in = mean_score(candidate, held_in, repeats) - mean_score(baseline, held_in, repeats)
d_out = mean_score(candidate, held_out, repeats) - mean_score(baseline, held_out, repeats)
if d_in < 0 or d_out < 0:
return False # no regression on either split
return max(d_in, d_out) > 0 # strict improvement on at least oneThe held-out split is invisible to the proposer. A candidate that gains on held-in by sacrificing held-out is rejected even if the sum is positive.
Example 2: Experience archive layout
search-run/
candidates/
c0041/
harness.py # full candidate source
scores.json # per-split, per-repeat results
traces/ # raw prompts, tool calls, outputs, state updates
lineage.txt # parent id, diff summary, decision, evidence
frontier.json # current Pareto set over (quality, cost)
rejected.jsonl # rejected candidates with reasons, append-onlyThe proposer greps this tree selectively. Nothing is summarized into its prompt by default.
Example 3: Routing a failure to the right rung
Observed: agent repeatedly uses a deprecated API despite instructions.
Wrong fix: propose a harness-code edit adding retry logic.
Right fix: rung 2. Inject current API docs into task context at
execution time. Training-data defaults override prompt instructions,
so ground the context; do not add machinery.This skill connects to:
Internal reference:
Related skills in this collection:
External resources:
Numeric, benchmark, volatile, or vendor-performance claims in this skill carry inline claim-* IDs backed by researcher/claims/index.jsonl. Detailed numbers live in the dated reference file.
Created: 2026-07-08 Last Updated: 2026-07-08 Author: Agent Skills for Context Engineering Contributors Version: 1.0.0
© guanyang, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 1 other file (references) in skills/self-improvement-loops of guanyang/open-agent-hub.
Open the folder on GitHubat commit acd7c6c
We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in guanyang/open-agent-hub, which our catalogue first saw on October 7, 2026.
Self Improvement Loops next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Self Improvement Loops this skillguanyang/open-agent-hub | 977 | 1 repos | ~5.6k | Automated safety check: Pass | MIT | |
| Continuous Agent Loopaffaan-m/ECC | 276k | 5 repos | ~298 | Automated safety check: Pass | MIT | |
| Toolifycoreyhaines31/makerskills | 851 | — | ~2.9k | Automated safety check: Notes | MIT | |
| Backend Ralph Planaiskillstore/marketplace | 433 | — | ~1.9k | Automated safety check: Notes | None | |
| Loop FactoryJuliusBrussee/skills | 162 | — | ~2k | Automated safety check: Pass | MIT | |
| Autoresearch Loopjdrhyne/agent-skills | 240 | — | ~2k | Automated safety check: Pass | MIT |
affaan-m/ECC
Patterns for continuous autonomous agent loops with quality gates, evals, and recovery controls.
coreyhaines31/makerskills
When you want to integrate an external tool, API, MCP server, or service into a project — the wizard walks you through auth, config, env vars, client wrapper code, example usage, and an optional…
aiskillstore/marketplace
Create a structured plan directory with Ralph Wiggum Loop integration for backend Django projects.
JuliusBrussee/skills
Run a spec-driven agent loop where coding tasks live as markdown specs that move through inbox → active → archive, get implemented by Claude Code or Codex, and pass a review gate before they count…
jdrhyne/agent-skills
Domain-agnostic metric-driven improvement loop, generalizing Karpathy's autoresearch.
CorridorTech/PoseCap
Scaffold deterministic quality gates per WORKFLOW.md §11 — pre-commit (lint, format, secret-scan), pre-push (build, unit, integration).
guanyang/open-agent-hub
This skill should be used when long-running agent sessions need context compression, structured summarization, compaction, token-per-task optimization, or durable handoff summaries that preserve…
guanyang/open-agent-hub
This skill should be used to explain or reason about the foundational concepts of context engineering: what context is, the anatomy of a context window, how attention mechanics work, the U-shaped…
guanyang/open-agent-hub
This skill should be used when building agent evaluation systems: deterministic checks, regression suites, multi-dimensional rubrics, quality gates, production monitoring, baseline comparison, and…
guanyang/open-agent-hub
This skill should be used when designing multi-agent systems that need context isolation, supervisor or swarm coordination, explicit handoffs, parallel execution, or a decision on whether multiple…
guanyang/open-agent-hub
This skill should be used for project-level decisions about LLM-powered systems: whether an LLM is the right primitive for the task at hand, the shape of a multi-stage batch or agent pipeline, token…
guanyang/open-agent-hub
This skill should be used for the tool-interface layer of an agent system specifically: writing tool descriptions agents can route on, designing tool schemas and response formats, naming…
Categories
This skill should be used when the harness, scaffold, workflow, or optimizer itself is the optimization target: recursive self-improvement (RSI) loops, meta-harnesses, self-improving harnesses that…. Self Improvement Loops is an agent skill from guanyang/open-agent-hub. This skill should be used when the harness, scaffold, workflow, or optimizer itself is the optimization target: recursive self-improvement (RSI) loops, meta-harnesses, self-improving harnesses that mine their own failures and propose bounded edits, evolutionary or population-based search over agent scaffolds, acceptance gates for self-modifying systems, and agentic context evolution where the mechanism that produces context is versioned and evolved.
Self Improvement Loops fits situations like: tasks that involve Autonomous loops; tasks that involve Project scaffolding; tasks that involve Quality gates.
Run `npx skills add guanyang/open-agent-hub --skill self-improvement-loops -a claude-code`. Or copy the skill folder (skills/self-improvement-loops in guanyang/open-agent-hub) into .claude/skills/self-improvement-loops in your project. Claude Code loads it when a task matches its description.
Run `npx skills add guanyang/open-agent-hub --skill self-improvement-loops -a codex`. Or copy the skill folder (skills/self-improvement-loops in guanyang/open-agent-hub) into .agents/skills/self-improvement-loops in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add guanyang/open-agent-hub --skill self-improvement-loops -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/self-improvement-loops, .gemini/skills/self-improvement-loops, .github/skills/self-improvement-loops and .opencode/skills/self-improvement-loops in your project.
SKILL.md names no scripts, command-line tools or credentials: Self Improvement Loops is instructions for the agent only.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Self Improvement Loops is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 5.6k tokens (SKILL.md is roughly 22k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 3.4k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Self Improvement Loops: Continuous Agent Loop (affaan-m/ECC, 276k stars), Toolify (coreyhaines31/makerskills, 851 stars), Backend Ralph Plan (aiskillstore/marketplace, 433 stars) and Loop Factory (JuliusBrussee/skills, 162 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
guanyang (a GitHub user) maintains it in guanyang/open-agent-hub, which has 977 GitHub stars. The repository holds 26 skills in this directory. The repository was last updated on October 10, 2026.
Source: guanyang/open-agent-hub on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.