# Self Improvement Loops

Should be used when the harness, scaffold, workflow, or optimizer itself is the...

- Repository: https://github.com/muratcankoylan/Agent-Skills-for-Context-Engineering (18272 stars)
- Category: Design
- License: MIT
- Last updated: 2026-10-12
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add muratcankoylan/Agent-Skills-for-Context-Engineering --skill self-improvement-loops -g -a claude-code -y`
Codex: `npx skills add muratcankoylan/Agent-Skills-for-Context-Engineering --skill self-improvement-loops -g -a codex -y`
Cursor: `npx skills add muratcankoylan/Agent-Skills-for-Context-Engineering --skill self-improvement-loops -g -a cursor -y`
Gemini CLI: `npx skills add muratcankoylan/Agent-Skills-for-Context-Engineering --skill self-improvement-loops -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add muratcankoylan/Agent-Skills-for-Context-Engineering`

## Description

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, durable logs, rollback, novelty gates, approval boundaries) to harness-engineering, measurement and quality-gate design to evaluation, judge design to advanced-evaluation, and remote sandbox infrastructure to hosted-agents.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Self-Improvement Loops

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.

## When to Activate

Activate this skill when:

- Building a loop where an agent proposes edits to its own harness, prompts, context playbook, or workflow based on mined failure patterns
- Designing meta-level search over harness or scaffold code: meta-agent search, tree search over workflow graphs, evolutionary program search with an LLM mutation operator
- Choosing acceptance criteria for any self-modifying agent system
- Evolving the mechanism that manages context (a skill, playbook, or context function) rather than hand-editing the context artifact
- Diagnosing a degenerating self-improvement loop: reward hacking, diversity collapse, context collapse, or silent stagnation
- Deciding which level of the optimization ladder (prompt, context, workflow, harness code, optimizer code) a recurring failure should be fixed at

Do not activate this skill for adjacent work owned by other skills:

The rest: https://github.com/muratcankoylan/Agent-Skills-for-Context-Engineering/blob/HEAD/skills/self-improvement-loops/SKILL.md
