Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

iterate

БесплатноЗапускает вложенные скриптыНе проверен

Autonomous single-metric improvement loop - modify, measure, keep or discard, repeat (Karpathy autoresearch). One session, git as memory…

0xDarkMatterот 0xDarkMatter★ 86 звёзд на GitHub

Об этом скилле

Iterate - Autonomous Improvement Loop

Inspired by Karpathy's autoresearch: constrain scope, clarify success with one mechanical metric, loop autonomously. The agent modifies code, measures the result, keeps improvements, discards regressions, and repeats - until any stop condition fires or the user interrupts.

The power is in the constraint. One metric. One scope. One loop. Git as memory.

Preflight

Before the loop starts, do the work that makes the loop effective. Don't skip steps - this discipline is what separates a productive overnight run from a flailing one.

1. Collect Config

If provided inline, extract and proceed. If required fields are missing, ask once using AskUserQuestion with all missing fields batched together.

Field Required What it is Example
Goal Yes What you're improving, in plain language "Increase test coverage to 90%"
Scope Yes File globs the agent may modify src/**/*.ts
Verify Yes Shell command that outputs the metric (a number) npm test -- --coverage | grep "All files"
Direction Yes Is higher or lower better? higher / lower
Guard No Command that must always pass (prevents regressions) npm run typecheck
Batch No Changes per iteration. >1 enables bisect-on-regression. Default 1. 3
Iterations No Hard cap on iteration count. 30
Until No Stop when metric crosses this target value. 90
Stagnation No Stop after N consecutive iterations with no improvement. 15
Branch No Branch isolation. current (default), auto (slug from goal), or explicit name. auto

Stop conditions are OR'd: any combination of Iterations, Until, Stagnation may be set. The loop stops when any one is satisfied. If none are set, the loop is unbounded - it runs until interrupted.

2. Plan

Read all in-scope files. Understand the codebase before touching anything.

  • What's the current state? What's already been tried?
  • What are the likely improvement vectors? Rank them.
  • What are the risks? What could break?
  • Form a rough strategy for the first 5-10 iterations.

3. Permissions

Check that allowed-tools cover what the loop needs. The verify and guard commands must run without permission prompts - a blocked tool at 3am kills the whole run.

  • Dry-run the verify command. If it gets blocked, note which Bash(command:*) pattern is needed.
  • Dry-run the guard command (if set). Same check.
  • If permissions are missing, suggest specific wildcard additions for .claude/settings.local.json and ask the user to approve before starting. Reference /setperms for a full setup.

4. Branch Setup

The Branch field controls where iteration commits land.

Value Behavior
current (default) Stay on the current branch. Commits land directly.
auto Create iterate/<slug-from-goal> from current HEAD and switch to it.
<explicit-name> Create branch with that exact name and switch to it.

Slug derivation (for auto): lowercase the Goal, replace non-alphanumeric runs with -, trim leading/trailing dashes, truncate to 40 chars. "Increase test coverage to 90%" → iterate/increase-test-coverage-to-90.

Collision: if the branch already exists, suffix -2, -3, etc.

Confirm before switching: print the chosen branch name and source branch. Do not silently create a branch the user didn't ask for.

Cleanup: never auto-delete the branch. The user decides whether to merge, open a PR, or git branch -D it. The skill's job ends at "branch exists with results."

5. Tasks

Create a TaskList to track progress across iterations. This provides structure the user can check without reading the full results log.

TaskCreate: "Establish baseline" (status: in_progress)
TaskCreate: "Iteration loop - [goal]" (status: pending)
TaskCreate: "Final summary and cleanup" (status: pending)

Update task status as the loop progresses. Mark the iteration task as in_progress when the loop starts, completed when it ends.

6. Tests and Verification

Before the first iteration, make sure verification actually works:

  • Run the verify command on the current state. If it fails or produces no parseable number, fix this first.
  • Run the guard command (if set). If it fails on the current state, the codebase has pre-existing issues - flag to the user.
  • If the metric is a timing or throughput, vet the harness first with perf-ops -> references/benchmark-vetting.md: what limits it, whether errors and skipped work are counted, whether the work happened.
  • If tests don't exist yet for the scope, consider writing them as iteration 0. Good tests make the loop more effective.

7. Baseline

Record the starting point:

  1. Run verify command, extract the metri
Полный SKILL.md на GitHub

Установить iterate в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Read
Write
Edit
Glob
Grep
Bash
Agent
TaskCreate
TaskUpdate
TaskList

Вложенные файлы

scripts/score.sh

FAQ

Что делает скилл iterate?

Autonomous single-metric improvement loop - modify, measure, keep or discard, repeat (Karpathy autoresearch). One session, git as memory, bisect-on-regression. Triggers: iterate, improve autonomously, run overnight, keep improving, improvement loop, iterate until done.

Как установить скилл iterate?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл iterate запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить iterate с