Skip to content

Self-Improvement Loops

Guides an agent in designing loops that safely let its own harness, prompts, or context evolve.

Stars
18,282
Licence
MIT
Files
2 files

What it does

When installed, the agent gets a detailed design playbook for systems where the agent's own scaffolding (its harness, workflow, prompts, or context-generating mechanism) is the thing being automatically improved. It explains how to pick the right level to fix a failure, how to keep the scoring signal out of the optimizer's reach so it cannot game it, and how to accept self-edits only when measured results show no regressions. It is advice and structure for designing such loops, not a tool that runs one by itself.

Great for

  • Engineers building recursive self-improvement or meta-harness experiments for AI agents
  • Teams designing acceptance gates and held-out evaluation for self-modifying agent systems
  • Researchers diagnosing reward hacking, diversity collapse, or silent stagnation in agent optimization loops

Skip it if

  • Simply running a single autonomous agent with logging and approval steps; the skill says that belongs to harness-engineering, so it adds little here (it routes you elsewhere)
  • Non-technical users looking for a ready-made product; it is a design reference for building optimization loops, and misapplying it can produce loops that quietly game their own metrics
  • Projects that need only one-off prompt or token-efficiency tuning without any improvement loop

Try asking

  • “Help me design a loop where my coding agent mines its failed test runs and proposes bounded edits to its own prompts.”
  • “Review my acceptance gate for a self-modifying agent: should I require both held-in and held-out splits to improve?”
  • “Diagnose why my self-improving harness keeps scoring higher while output quality is falling; check for reward hacking.”
  • “Which rung of the optimization ladder should I fix this recurring failure at: prompt, context, workflow, or harness code?”
Step-by-step guide: how to use Self-Improvement LoopsInstall, first run, examples, tips and FAQs

Install in 3 steps

  1. 1

    Download the skill

    The ZIP contains the 2 original files, the MIT licence and an attribution note.

    self-improvement-loops.zip
  2. 2

    Add it to your agent

    Claude Code (all projects)

    mkdir -p ~/.claude/skills && unzip self-improvement-loops.zip -d ~/.claude/skills/

    Claude Code / Agent SDK (this project only)

    mkdir -p .claude/skills && unzip self-improvement-loops.zip -d .claude/skills/

    Claude apps (web/desktop): Settings → Capabilities → Skills → Upload skill, and choose the ZIP.

  3. 3

    Ask for the task

    No special command needed — the agent reads the skill's description and loads it when your request matches. Try one of the prompts above.

Get better results

  • Pair this skill with harness-engineering for governance and evaluation for building the scorer, since it deliberately defers those topics.
  • Keep evaluator source hidden from any proposer agent, and enforce budgets and permissions in the runtime rather than in prompts.
  • Start with a capability validation over a fixed number of iterations on held-out tasks before enabling recursive self-edits.

What's inside

  • references/loop-design-evidence.md
  • SKILL.md

Redistributed unmodified from muratcankoylan/Agent-Skills-for-Context-Engineering under the MIT licence. The assessment was drafted with AI from the skill's files on 2026-10-29. Skills can instruct your agent to run code — read SKILL.md and any scripts before installing.