loop
Skill34 starsChanged 3 days agoApache-2.0View on GitHub
Continuously improve an AI agent from traces, feedback and evaluations through repeated learning and experiments. Use improve for a single fix or improvement and eval for a one-off evaluation run. Excludes scheduled prompts and polling.
56 other projects use a version of this.
Adopted by
Most recently taken up by
- Eclipter/agentstheir own version, first seen Nov 8, 2026
- SethGammon/Citadeltheir own version, first seen Nov 4, 2026
- drevendev/HungryCrabtheir own version, first seen Nov 1, 2026
- Railly/skillstheir own version, first seen Nov 1, 2026
- HeshamFS/swarmweavertheir own version, first seen Nov 1, 2026
- jtaroreh/agystacktheir own version, first seen Oct 29, 2026
Used with
Projects with it also use review-bugbot, origin and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
0mlkrizzz655335vSkillreview-bugbot
缺陷导向代码审查。用 Bugbot 子代理找 bug。
Also in 4 projects that use this
0mlkrizzz655335vSkillorigin
origin CLI 管理。安装、登录、更新、修复 origin.cursor.com 的 CLI。"disabled-environments:
Also in 3 projects that use this
PandelisZSkillupdate-cli-config
View and modify Cursor CLI configuration settings in ~/.cursor/cli-config.json. Use when the user wants to change CLI settings, configure permissions, switch approval mode, enable vim mode, toggle display options, configure sandbox, or manage any CLI preferences.
Also in 4 projects that use this
32103210Skillmigrate-to-skills
Convert 'Applied intelligently' Cursor rules (.cursor/rules/*.mdc) and slash commands (.cursor/commands/*.md) to Agent Skills format (.cursor/skills/). Use when you want to migrate rules or commands to skills, convert .mdc rules to SKILL.md format, or consolidate commands into the skills directory.
Also in 4 projects that use this
32103210Skillupdate-cursor-settings
Modify Cursor/VSCode user settings in settings.json. Use when you want to change editor settings, preferences, configuration, themes, font size, tab size, format on save, auto save, keybindings, or any settings.json values.
Also in 4 projects that use this
MicrosoftSkillautomate
Propose an automation from a completed task or a new idea, then create it after approval. Use when the user asks to create an automation or wants scheduled local or cloud agent work.
Also in 4 projects that use this
- +3 more from 0mlkrizzz655335v
- +1 more from 32103210
Other versions56 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 56
- SethGammon/Citadel★ 927same name
- breezewish/CodexPotter★ 629same name
- jtaroreh/agystack★ 128same name
- dannys-code-corner/incan★ 73same name
- ww-w-ai/bkit-gemini★ 66same name
- IsuruMaduranga/one-code★ 50same name
- unclejobs-ai/second-claude-code★ 41same name
- BULDEE/ai-craftsman-superpowers★ 35same name
- Hassaan146/claude-skills★ 18same name
- woxiangyangzhimao/skills★ 14same name
46 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository8 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- coding-evalsSkill
- discoverSkill
- evalSkill
- improveSkill
- startSkill
- trace-reviewSkill
The file
We split this skill into the rules it gives an agent
4 rules. 0 are common, 4 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 51 edited versions we read keep these.
4
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 19
Every kept change has comparable evidence and regression checks.
- Distinctive: line 43
Before claiming an improvement, a comparable baseline exists for the objective and guardrails, measured or reused with a rationale.
- Distinctive: line 138
Use the shared reviewable handoff for decisions or annotations: show their consequences and a useful chat or app review path.
- Distinctive: line 145
Stop when the agreed objective or limits are reached, the user asks, blocking judgment is needed, or no worthwhile authorized experiment …
“Common” is measured: kept by at least 6 in 10 of the 51 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Loop: learn from new traces, fix, repeat
Inspect existing evidence and runners. Read relai/README.md, or the bundled
terms when absent; use the start skill
for needed managed records without rebuilding working infrastructure. This skill coordinates
learning and verified improvement across the discover, eval and improve skills
under one contract.
The flow below is a starting point. Adapt, reorder, repeat or skip activities when that better serves the request and the evidence, and load stage guidance only when relevant. The agreed scope, budget, authorization, evidence requirements and stage rules still bind.
Goal: useful learning and evidence-backed improvement with human judgment used where needed. Every kept change has comparable evidence and regression checks; every candidate decision is recorded with its reason. An investigation can produce useful knowledge without a code change. Maintain that knowledge when it helps future work under the shared policy; do not fill an iteration with artifact updates that add no durable value.
Two levels: learning iterations and experiments
- An iteration is a learning cycle started by a credible learning opportunity: new inputs, an unresolved question, or a useful experiment using existing evidence. It need not include trace intake, new tests or code changes.
- An experiment round happens inside an iteration (improve: improve-loop). It can produce learning without a patch. Accepted candidates become the incumbent; other exploration remains isolated.
A round cap counts experiment rounds, including diagnosis; report candidate attempts separately.
Done when
The paths below describe RELAI-managed records. Existing project contracts, iteration history, candidate decisions and reporting may serve the same purpose when authorization and evidence remain inspectable and recoverable; do not create duplicate state merely to match these filenames.
- The contract was approved (below) and saved in
relai/records/loop/state.json(relai/docs/files.md), with a line indecisions.md. - Before claiming an improvement, a comparable baseline exists for the objective and guardrails, measured or reused with a rationale. Investigation without a candidate records its findings and limits without an improvement claim.
- Each iteration is appended to
state.jsonunderiterations; each attempted candidate has arelai/changes.mdentry. - The loop stopped on a stopping condition, and you reported: the iterations run and what started each, experiments run, candidates tried and kept, the applicable objective/guardrail evidence and its limits, resource measurements, the regressions caught and changes rejected (and why), the user's decisions, total spend, benchmark coverage, and where the improved agent lives; the final split of a benchmark only when authorized. Relevant managed state or equivalent project reporting is current.
Establish the loop agreement
Reuse an existing contract covering these choices. Ask only for missing consequential choices
or changed boundaries; establish a new contract before starting when none exists. The contract is
the improvement agreement (relai/README.md, Terms) and supplies the authorization for the
stage decisions it covers. It is not approval to skip an uncovered consequential decision.
- Objective and guardrails: what improves (test pass rate, or cost or latency with scores held), and the guardrails with their bounds and evidence requirements.
- Scope: what may change (prompts, tool descriptions, skills, memory or context construction, retry logic, agent code, model settings) and what is off-limits.
- Inputs: the trace folder or stream to learn from, if any, the test suites in play, and any
benchmarks (with any agreed held-out sample and batch size per iteration). When traces will be
triaged by a model, the provider and model, and the user's authorization to send trace text to
it (discover: trace-triage); with that and the budget,
the loop runs triage beyond the pilot size (
--yesfor the example script). - Length: the most iterations to run, or "until there is nothing new"; and any experiment limit per iteration.
- Budget and evidence: a ceiling for the loop and any per-iteration limits, covering agent trials, judges and triage. Measurement effort is chosen per decision (eval: measure).
- When to ask the user (recommend: only these): user intent is genuinely ambiguous; two
requirements conflict; a behavior is irreversible or safety-sensitive; a judge and the user's
past verdicts disagree; a product-policy decision is needed. They are asked as
relai/README.mdsays ("When the user is asked"); everything else proceeds and appears in the digest. - Approvals:
delegated(default): fresh independent reviews stand in for scenario approval, grader previews and task lists, as delegated approvals describe; orsupervised: the user approves each scenario table, grader preview and kept change individually. Inside the loop this setting answers the build skills' "how involved" question. - Check-ins: a short digest after every iteration (default), or only at the end.
- Watch mode (optional): instead of stopping when nothing is new, re-check the trace source on a schedule the user sets up and start an iteration only when new traces or answers have arrived. A check that finds nothing new exits quietly; report any host/model usage rather than promising that a scheduled check is free.
- Delivery: kept changes accumulate on a branch for review (default), never in the user's working tree unless the contract says so.
The locked kernel
Hold measurement meaning and relevant comparison conditions stable within an iteration: frozen tests and their evaluators, the held-out set and acceptance rule. Budget and authorization also stay binding. Supporting implementation repairs or improvements may proceed within scope under the shared adaptation policy; changes to measurement meaning require controlled repair and comparable starting evidence. New tests join only at an iteration's start, after their fresh review and freeze, and get a baseline on the incumbent before any candidate is compared with them. The loop may propose a change to the kernel (a rubric repair, a retired test, a new budget); only authorization covering that change permits it.
Suggested learning flow
With adequate evaluations, begin at improvement; diagnosis may return to discovery when an ambiguity appears. Record adaptations that affect evidence, scope or delivery. Keep the real dependencies: comparable evidence precedes improvement claims, delivered revisions need verification, and measurement changes go through the locked kernel.
- What is worth learning next? New traces or answers, uncovered behavior, missing measurements, or a credible experiment on existing evidence. If none remains, stop or wait in watch mode rather than repeating activities for their own sake.
- Intake. Triage traces that arrived since the last iteration (discover: trace-triage; incremental by trace id) and read new feedback and answers.
- Filter by usefulness. Routine runs with no signal are archived. Durable knowledge goes to
the wiki: requirements from settled answers, evidence on risks, near misses. Reproducible
behavior becomes test proposals: runs the user's feedback judged wrong, uncovered situations, co-occurring weak
signals, harder rungs of tests the agent now passes. Questions the contract says to ask go to
open questions or
feedback.mdand are asked together; the loop does not wait on them, it works on everything else. - Grow the tests. Build the strongest proposals (the
evalskill): realistic, both directions, a fresh review standing in for scenario approval and grader preview when the contract's approvals aredelegated, then freeze. Held-out tests are optional (theevalskill's Split rule). - Establish starting evidence for the objective and guardrails: reuse comparable
incumbent runs or measure what is missing (eval: measure). On
benchmarks, use exact development selections (
benchmark.py batch --case-ids ...) plus any agreed held-out sample; never the final split. - Experiment as improve: improve-loop describes; alternatives follow its candidate-selection reference.
- Verify the delivered candidate with comparable before/after evidence and a fresh review of the actual delivered diff.
- Accept or roll back by the improve loop's acceptance rule, judged over the iteration's delivered changes. Preserve the last verified incumbent, record dropped candidates as rejected, and reverify and review the resulting diff. An accepted iteration is a new generation of the agent.
- Record and report. Append the iteration to
state.json(relai/docs/files.md), updaterelai/STATUS.md, and send the digest: what started the iteration, what was learned, tests added, experiments and candidate outcomes, comparable measurements and their limits, spend so far; then ask the waiting questions. Use the shared reviewable handoff for decisions or annotations: show their consequences and a useful chat or app review path. Revisit relevant deferred questions when new evidence or the current work warrants it; do not repeat an unchanged backlog or silently treat a nonblocking question as deferred.
Stopping conditions and recovery
Stop when the agreed objective or limits are reached, the user asks, blocking judgment is needed,
or no worthwhile authorized experiment remains. Outside watch mode, do not start a new iteration
on unchanged inputs merely to evade a round cap. Stalls, extensions and recovery after
interruption follow improve: improve-loop; state.json is an
orchestration summary, never evidence that a candidate ran or was accepted.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

