К основному содержанию
скилл CX Codex

autoresearch-loop — скилл для Claude Code

Скилл autoresearch-loop для Claude Code выбирает метрики цели и проверяет изменения циклом «эксперимент — оставить или откатить». Цикл оценивает измеримый результат проекта.

MIT ★ 239 обновлён 2026-08-30

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add jdrhyne/agent-skills --skill autoresearch-loop -a claude-code
Открыть на GitHub

Что делает autoresearch-loop

Сначала агент выбирает основную метрику и защитные показатели, задаёт бюджет проб и условие остановки. Затем проверяет исходный результат и меняет по одной гипотезе за итерацию: arl запускает испытание, читает строки METRIC и выполняет проверки защитных метрик. Удачные изменения сохраняются, регрессии откатываются; журнал фиксирует, что проверили и чему научились.

В скилле есть инструкции по поиску метрик, доменные адаптеры и CLI-обвязка для сессии в .auto/. Перед изменениями нужно убедиться, что замер действительно охватывает нужный артефакт, а не зависимость или внешний движок. Если метрика не измеряется повторяемо в пределах бюджета, цикл следует остановить: иначе он будет оптимизировать шум.

Какие задачи решает

  • выбрать метрику для измеримой цели проекта
  • сравнить изменение с исходным результатом
  • откатить правку, ухудшившую защитный показатель
  • вести журнал проверенных гипотез и их результатов

Примеры запросов агенту

  • Исследуй проект и улучши его по измеримой цели, фиксируя удачные изменения и откаты.
  • Найди подходящие метрики для этой задачи, затем проверь одну гипотезу за итерацию.
  • Проверь, действительно ли замер охватывает нужный код, и остановись, если метрика ненадёжна.

Как установить autoresearch-loop

1Через Skills CLI (Vercel)

npx skills add jdrhyne/agent-skills --skill autoresearch-loop -a claude-code

2Вручную: положить файлы

~/.claude/skills/autoresearch-loop/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/autoresearch-loop/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Вопросы об autoresearch-loop

Как установить autoresearch-loop в Claude Code?

Выполните npx skills add jdrhyne/agent-skills --skill autoresearch-loop -a claude-code. Файл скилла находится по пути ~/.claude/skills/autoresearch-loop/SKILL.md.

Что делает autoresearch-loop?

Он помогает агенту подобрать метрики, испытать изменения и оставить те, что улучшают основной показатель без ухудшения защитных. Результаты и выводы записываются в журнал.

Когда autoresearch-loop должен остановить эксперименты?

Если результат нельзя повторяемо и недорого измерить в пределах бюджета проб, цикл следует остановить. То же относится к необратимым или небезопасным изменениям без процедуры отката.

Исходный текст

SKILL.md · MIT
---
name: autoresearch-loop
description: "Domain-agnostic metric-driven improvement loop, generalizing Karpathy's autoresearch. Use when you want an agent to discover what to measure for a project/goal, then run a keep-or-revert experiment loop that proposes changes, measures them against an objective, keeps wins, discards regressions, and records implemented improvements. Adapts to code perf-auditing, codegen, bug-finding, ad optimization, or any artifact + measurable objective + trial. Trigger: 'autoresearch this', 'find and implement improvements to X', 'discover metrics and optimize'."
---

# autoresearch-loop

Generalize Karpathy's autoresearch into a domain-adaptive improvement loop. The agent **discovers what to measure**, then runs a disciplined **propose → trial → keep-or-revert** loop, maintaining an explicit ledger of what was tried, kept, discarded, and implemented.

Read `DESIGN.md` once at the start of a run for the full architecture and the domain-specific tensions (metric latency/noise/cost, Goodhart gaming, cost-per-trial, reversibility). The phases below are the operating procedure.

**Runtime:** the loop's mechanics (run a trial, parse the metric, score confidence, keep/commit or discard/revert) are handled by the `arl` CLI over a `.auto/` session folder — a Claude-native port of pi-autoresearch's tools. Read `references/runtime-contract.md` for the `.auto/` layout, the `METRIC name=value` contract, MAD confidence scoring, and the `arl init|run|log|status` commands. Invoke it as `node scripts/arl.mjs <cmd>` (or `arl` if on PATH).

## When NOT to run
- There is no metric that can be measured **repeatably and cheaply enough** within a trial budget. A loop with no trustworthy metric chases noise — stop and say so.
- The change surface is irreversible or unsafe to mutate experimentally (production data, customer-facing irreversible actions) without an explicit revert procedure in the adapter.

## Phase 0 — FRAME (metric discovery)

Given `{project, goal, context}` — follow the procedure in `references/metric-discovery.md` (restate the goal as an outcome → enumerate candidates on the proxy→outcome spectrum → score on six axes → choose primary + guardrails + strategy → red-team for gaming). In brief:
1. Identify or select a **domain adapter** (`adapters/*.md`). If none fits, draft an inline adapter following `references/domain-adapter-contract.md`.
2. Propose **candidate metrics** (the adapter's menu is a *prior*, not the answer — reason from the goal). Score each on measurability, latency, noise, alignment, gameability, and cost. Prefer alignment over convenience for the primary.
3. Pick ONE **primary objective**, a set of **guardrail metrics** that must not regress, a **trial budget** (wall-clock and/or cost per trial), and a **stop condition** (budget exhausted, plateau over K trials, or target hit).
4. Choose the **accept/reject strategy** for this domain: `deterministic-delta` (fast, low-noise), `significance-test`, or `bandit` (noisy/delayed/expensive — e.g. ads).
5. Name the **Goodhart guards** (guardrail metrics, holdout, periodic critic).
6. Write `runs/<id>/CHARTER.md`. Confirm it with the user before spending real budget if trials cost money or touch production.

## Phase 1 — BASELINE
Write `.auto/measure.sh` (and `.auto/checks.sh` if guardrails require it). `arl init` with the primary metric + direction, run the baseline (`arl run`), and record it (`arl log --status keep --metric <baseline> --desc baseline`). If the baseline can't be measured cleanly and repeatably, stop (see "When NOT to run").

**Before proposing any change, profile where the cost actually is, and confirm the benchmark stresses the IN-SCOPE artifact — not a dependency, a native/FFI call, an external engine, the network, or unrelated code.** (Validated the hard way on two live runs: once the assumed hot path was wrong twice and 97% of time was in an out-of-scope library; once the in-scope managed code was only 0.4–3.8% of wall-time because a Rust NIF dominated — the correct loop output there was a *true negative*, "re-scope," not a sub-noise edit. See `adapters/code-perf-audit.md` → Pitfalls.) Spend one profiling run on the managed-vs-native/dependency split; a loop that optimizes code which isn't the bottleneck produces confident, useless churn — and proving "no in-scope headroom" cheaply is itself a successful outcome.

## Phase 2 — LOOP (until stop condition)
Each iteration:
1. Read the artifact, `.auto/prompt.md`, the `.auto/log.jsonl` tail, and `.auto/ideas.md` — never re-propose an exhausted line.
2. Propose **one** hypothesis: the smallest change most likely to move the primary metric. Pull from `.auto/ideas.md`; append newly-imagined ideas there.
3. Apply it directly to the in-scope files (a discard reverts code via git; `.auto/` is preserved).
4. `arl run` — runs the trial harness, parses `METRIC` lines, runs guardrail `checks.sh`.
5. **Decide** with the charter's accept/reject strategy. For `fast-low-noise` domains, watch the MAD confidence score (`<1.0×` = within noise, re-run before trusting). For `delayed-expensive` domains (ads), do NOT trust a single trial — reach the adapter's minimum sample and use significance/bandit logic. A primary win that regresses any guardrail is a **discard**.
6. `arl log --status keep|discard|... --metric <value> --desc "..." --asi <learning>`. Keep auto-commits and advances the baseline; discard auto-reverts the code. Record cost with `--cost`.
7. Annotate every run's `--asi` with what was *learned* (survives a discard's revert); prune exhausted ideas.

Respect concurrency reality: deterministic domains can run many fast sequential trials; noisy/delayed domains (ads) run few long concurrent trials and must reach a minimum sample before any verdict.

## Phase 3 — ADAPT (every N trials)
- Prune dead-end hypothesis families.
- Re-tune the trial budget (raise if trials are cheap and informative; lower if wasteful).
- **Goodhart check:** inspect recent keeps — is the metric genuinely better, or gamed (tests deleted, benchmark special-cased, holdout diverging from training metric, downstream conversion dropping while CTR rises)? If gamed, tighten guardrails or refine the metric, and revert the gamed keep.
- **Proxy-degeneracy check:** if a cheap proxy metric can be *structurally degenerate* for some task shapes (e.g. a routing score that is always 0 when landing == target), it will under-measure or mislead — and it can "pass" real defects a behavioral check would catch. When a cheap and a behavioral oracle both exist, iterate on the cheap one but **decide keeps with the behavioral oracle**. Validated on a real run where the content score read a genuine fix as +2.15 while the browser-flow oracle measured +28.68 and also caught three broken links the content score missed. See `adapters/web-onboarding.md`.

## Output
At any stop, report (`arl status` summarizes most of it): metric baseline → current with the delta and confidence, the kept improvements (each with its delta and cost), what was tried and discarded with the `--asi` reasons from `.auto/log.jsonl`, the remaining promising ideas, and total cost. The durable record is `.auto/` plus the git history of kept commits.

## Reference files
- `DESIGN.md` — architecture, per-domain design tensions, and the pi-autoresearch prior-art decision (read once per run).
- `references/metric-discovery.md` — the Phase 0 procedure: deriving + scoring + red-teaming the metric.
- `references/runtime-contract.md` — the `.auto/` layout, `METRIC` contract, MAD confidence, and `arl` commands.
- `references/domain-adapter-contract.md` — how to define a new domain adapter.
- `references/journal-schema.md` — the ledger record formats.
- `adapters/*.md` — concrete domain adapters (code-perf-audit, bug-finding, code-generation, google-ads, web-onboarding).

© jdrhyne · MIT · jdrhyne/agent-skills

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

Все скиллы по теме «Настройка агента: память, контекст, субагенты» →
autoresearch официальный luiscantero Скилл autoresearch для GitHub Copilot, который запускает автономный цикл экспериментов над кодом: меняет, тестирует, измеряет метрику и оставляет только улучшения. Работает в git-репозитории с доступом к терминалу. CX Codex +1 3 400установок autoresearch-agent Alireza Rezvani Плагин autoresearch-agent для Claude Code запускает автономный цикл экспериментов и оптимизирует файлы по числовым метрикам. Автоматизирует регулярные тесты и настройку параметров кода. ★ 30 251звёзд репо codex-autoresearch-loop reason-machines Скилл codex-autoresearch-loop циклически правит код, проверяет метрику и сохраняет удачные изменения в git. Запускается для автономного устранения ошибок типов или повышения тестового покрытия. CX Codex +1 1 200установок loop Alireza Rezvani Скилл loop для Claude Code, который запускает автономный цикл экспериментов autoresearch по расписанию. Задаётся интервал от 10 минут до месяца, дальше агент сам читает конфиг, правит код, коммитит и оценивает результат. CX Codex +1 1 557установок tournament-autoresearch gaasher Скилл tournament-autoresearch для Claude Code организует цикл ML-экспериментов: субагенты предлагают изменения архитектуры, судья выбирает одно для запуска. Идеи сравниваются до расхода вычислительных ресурсов. CX Codex +1 ★ 185звёзд репо exploratory-autoresearch gaasher Скилл exploratory-autoresearch гоняет автономный цикл ML-экспериментов: сначала несколько диких переписываний, потом адаптивная фаза с запретом залипать на мелких правках. CX Codex +1 ★ 185звёзд репо

Из того же набора27

Весь набор →
gallery-scraper Скилл gallery-scraper для Claude собирает ссылки на полноразмерные картинки в галерее под логином и скачивает их пачкой через прикреплённую вкладку браузера. CX Codex +1 ★ 239звёзд репо gong Получает метаданные звонков, фрагменты расшифровок и статистику активности через Gong API. Данные можно анализировать без ручного скачивания встреч. CX Codex +1 ★ 239звёзд репо munger-observer Скилл munger-observer для Claude Code разбирает решение, план или документ, отделяет факты от выводов и предлагает проверку. Помогает проводить премортем и искать слабые места. CX Codex +1 ★ 239звёзд репо context-recovery Скилл context-recovery находит, на чём вы остановились после сжатия или обрезки контекста, и показывает, откуда взяты факты. CX Codex +1 ★ 239звёзд репо google-ads Скилл для Claude, который разбирает аккаунт Google Ads: расходы, ключевые слова, поисковые запросы, бюджеты, конверсии. По умолчанию только чтение, правки — после подтверждения. CX Codex +1 ★ 239звёзд репо nutrient-openclaw Скилл nutrient-openclaw регулирует обработку документов через плагин Nutrient в Claude Code. Следит за расходом кредитов DWS, защитой ключей и подтверждением операций перед отправкой файлов. CX Codex +1 ★ 239звёзд репо task-orchestrator Скилл task-orchestrator для Claude Code и Codex распределяет задачи GitHub по зависимостям и запускает независимые в отдельных рабочих деревьях и сессиях tmux. CX Codex +1 ★ 239звёзд репо salesforce Скилл водит Salesforce CLI вместо вас: SOQL и SOSL, чтение и правка записей, bulk-выгрузка, Apex и метаданные прямо из чата Claude. CX Codex +1 ★ 239звёзд репо

Спонсоры проекта

Компании, которые помогают держать аналитику открытой