agentleFS
unclejobs-aiunclejobs-ai/second-claude-code/skills/loop/SKILL.md

loop

Skill41 starsChanged 7 days agoMITView on GitHub

Use when benchmarking and evolving prompt assets through a fixed-suite optimization loop

55 other projects use a version of this.

Adopted by

Most recently taken up by

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.
  • 0mlkrizzz655335vSkill

    review-bugbot

    缺陷导向代码审查。用 Bugbot 子代理找 bug。

    Also in 4 projects that use this

  • 0mlkrizzz655335vSkill

    origin

    origin CLI 管理。安装、登录、更新、修复 origin.cursor.com 的 CLI。"disabled-environments:

    Also in 3 projects that use this

  • PandelisZSkill

    update-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

  • 32103210Skill

    migrate-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

  • 32103210Skill

    update-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

  • MicrosoftSkill

    automate

    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

The file

We split this skill into the rules it gives an agent

9 rules. 0 are common, 2 are distinctive, and 7 are very specific to this project.

  • 0

    Common

    Most of the 50 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 7

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Run a Karpathy-style optimization loop over the plugin's own prompt assets.

    line 25
  2. Very specific:

    Use node scripts/loop-runner.mjs show-suite <name> to load the suite and verify the allowed targets.

    line 44
  3. Very specific:

    Use node scripts/loop-runner.mjs run <name> ...

    line 45
  4. Very specific:

    Keep the top 1-2 elite candidates per generation.

    line 48
  5. Very specific:

    Only promote a winner when all hard gates pass and the score beats baseline by at least min_delta.

    line 49
  6. Very specific:

    Do not add routing for this skill in prompt-detect.mjs for v1.

    line 66
  7. Very specific:

    Do not mutate .mjs, docs/, README*, or tests/ as loop targets.

    line 67
  8. Very specific:

    Do not declare a winner when baseline remains best or when min_delta is not met.

    line 68
  9. Distinctive:

    Do not write to the main worktree directly.

    line 69

“Common” is measured: kept by at least 6 in 10 of the 50 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Resolve runtime paths before file or script operations.

Iron Law

A loop without a benchmark is meaningless.

Red Flags

  • "Let's just run it and see what happens" → STOP, because the Iron Law says a loop without a benchmark is meaningless — a fixed suite with numeric scoring must exist before any run.
  • "The new variant feels better" → STOP, because evaluator output must expose a numeric score that can be parsed deterministically — subjective improvement is not a valid promotion signal.
  • "Baseline is close enough, let's promote the candidate" → STOP, because winners are promoted only when the score beats baseline by at least min_delta — close is not enough.
  • "I'll mutate the docs and test files too" → STOP, because .mjs, docs/, README*, and tests/ are excluded from mutation scope — only allowed targets in the suite allowlist may be changed.
  • "One more generation might improve it" → STOP, because the loop must stop when budget is exhausted, min_delta is not met, or scores plateau — open-ended iteration wastes tokens without measurable gain.

Loop

Run a Karpathy-style optimization loop over the plugin's own prompt assets.

When to Use

  • Maintainers want to improve skills/**/SKILL.md, agents/*.md, commands/*.md, or templates/*.md
  • A fixed benchmark suite with numeric scoring already exists
  • Candidate variants should compete under the same time budget and the best variant should be promoted to an isolated branch

Subcommands

CommandPurpose
list-suitesList bundled loop suites in benchmarks/loop/
show-suite <name>Inspect the validated suite manifest
run <name>Create an isolated run branch, score a baseline, generate candidates, and promote a winner if min_delta is met
resume <run_id>Reload the saved loop state from .data/state/loop-active.json

Workflow

  1. Use node scripts/loop-runner.mjs show-suite <name> to load the suite and verify the allowed targets.
  2. Use node scripts/loop-runner.mjs run <name> ... to create the isolated codex/loop-... branch and run worktree.
  3. Inside that run worktree, create 3-5 prompt variants only within the selected targets.
  4. Evaluate every candidate with the suite's fixed case commands. Parse scores from JSON or review-style output only.
  5. Keep the top 1-2 elite candidates per generation. Stop when budget is exhausted, min_delta is not met, or the loop plateaus.
  6. Only promote a winner when all hard gates pass and the score beats baseline by at least min_delta.

Hard Gates

  • Selected targets must stay within the suite allowlist and the global v1 mutation scope.
  • Contract/runtime smoke checks must still pass when those files exist in the repo.
  • Evaluator output must expose a numeric score that can be parsed deterministically.
  • Winners are promoted only into the run branch/worktree, never into the current workspace.

State

  • Active state: <plugin-data>/state/loop-active.json
  • Artifacts: .captures/loop-<run_id>/
  • Bundled suites: benchmarks/loop/*.json

Gotchas

  • Do not add routing for this skill in prompt-detect.mjs for v1. It is slash-command only.
  • Do not mutate .mjs, docs/, README*, or tests/ as loop targets.
  • Do not declare a winner when baseline remains best or when min_delta is not met.
  • Do not write to the main worktree directly. The isolated loop branch is the output surface.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.