/selamy-skills:self-improving-agent-loopsfrom selamy-skills
Use when designing a system that should autonomously generate, evaluate, and refine its own candidate solutions (agents, prompts, configurations, experiments) in a loop — rather than hand-managing each iteration. The system does the search; the human owns the architecture and the final decision.
Ships in selamy-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Hand-managing every iteration of an optimization — spawning each candidate, reading each result, tweaking the next one by hand — does not scale and wastes the operator on work the system can do itself. The higher-leverage design is a loop that improves itself: it proposes candidates, evaluates them against a measurable objective, keeps what wins, refines from there, and repeats until it converges — all without a human in the inner loop.
The shift is from operating the search to architecting it. The system does the heavy lifting of generation and evaluation. The human sets the problem up, reviews the proposals, disengages, and returns to a finished result. This generalizes far beyond code: research directions, experiment design, hyperparameter and config search, prompt and policy optimization, content variants — anything where "try a candidate, score it, improve" is the unit of work.
Automating the loop does not mean ceding judgment. The system searches; the human decides what the search is for and whether the result ships.
The human always owns:
The loop owns the tedious middle — generating candidates, running evaluations, comparing, and refining — precisely because that is the part that is mechanical and high-volume. If a step requires taste, novel architecture, or an irreversible real-world commitment, it belongs to the human, not the loop.
This is the operator's interaction model. The human is in the loop at the boundaries, not inside every iteration.
The value of the model is concentrated in steps 1–2 (setup) and step 4 (decision). Step 3 is where the leverage comes from: the system works while you do not.
1. PROPOSE candidates for the objective (the system generates these)
2. EVALUATE each against the measurable objective, the same way every time
3. SELECT the winners; discard or down-weight the rest
4. REFINE generate the next round informed by what won and why
5. CHECK converged or out of budget? if not → back to step 1
6. REPORT surface the best result, the trajectory, and the evidence
Loop-until-converged, not loop-forever. Each round must be informed by the last — a refinement step, not a fresh random draw — or it is search without learning.
The loop ran unattended to convergence and produced a result that is better on the stated objective, with a trajectory record the human can inspect, and the human reviewed and explicitly accepted (or rejected) it. Not "the loop finished" — the loop finishing is a claim; the verified, accepted result is the outcome.
Verify the winning candidate against the real objective yourself before accepting it; an autonomous loop's self-reported best is still a self-report ([[verify-delegated-work]]). A self-improving loop with no human decision at the end is not autonomy, it is an unowned process.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub selamy-labs/agent-skills --plugin selamy-skills111 skills in this plugin
/adaptive-estimationUse when tracking a slowly-varying latent quantity from noisy measurements with quantifiable uncertainty — a drifting metric, capacity, latency trend, or confidence. Prefer a Kalman-style adaptive estimator over fixed moving averages or static thresholds./adaptive-loop-budgetingUse when an autonomous loop needs explicit limits on attempts, time, cost, tool calls, verification depth, or risk, and a clear stop, continue, yield, or escalate decision./adopt-and-deleteUse when adopting a shared module, library, chart, or service, or doing any consolidation, migration, or refactor that supersedes existing code. The change that adds the replacement must REMOVE what it replaced, in the same atomic change.Other plugins' skills for the same job