Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Autonomous iterative improvement loop. Agent modifies code, verifies against metrics, keeps improvements or reverts failures, and repeats. Uses git as memory — each change is committed, measured, and kept or discarded. Runs until a target metric is hit or max iterations reached. Triggers on: "autoresearch", "auto improve", "iterative improvement", "autonomous loop", "hill climb"
.claude/skills/miosa-osa-autoresearch/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-03 | ✗→✓ | ▲ Improved | 528% | 0% |
| case-10 | ✗→✓ | ▲ Improved | 34% | 0% |
| case-16 | ✗→✓ | ▲ Improved | -4% | 0% |
| case-09 | ✓→✗ | ▼ Worse | 378% | 0% |
| case-20 | ✓→✓ | = Same ✓ | 167% | 0% |
> Autonomous code improvement through iterative experiment-and-measure cycles.
Run an autonomous loop that improves code against a measurable metric. Each iteration: the agent analyzes current performance, hypothesizes an improvement, implements it, commits it, runs the metric, and decides keep-or-revert. Git history becomes the experiment log. The loop continues until the target is met, max iterations are exhausted, or no progress is made for N consecutive rounds.
bash# Basic — improve test pass rate /autoresearch --metric "mix test --cover" --target 95 # Improve benchmark performance /autoresearch --metric "cargo bench --output json" --target "p99 < 10ms" --max-iter 20 # Improve code quality score /autoresearch --metric "npx eslint . --format json | jq '.errorCount'" --target 0 # Dry run — show plan without executing /autoresearch --metric "pytest" --target "all pass" --dry-run # Resume a previous session /autoresearch --resume # Limit scope to specific files /autoresearch --metric "mix test test/parser_test.exs" --target "0 failures" --scope "lib/parser.ex"
| Flag | Type | Default | Description | |------|------|---------|-------------| | --metric | string | required | Command that produces a measurable result | | --target | string | required | Success condition (number, comparison, or keyword) | | --max-iter | int | 10 | Maximum improvement iterations | | --stall-limit | int | 3 | Stop after N consecutive iterations with no improvement | | --scope | string | . | Files or directories the agent may modify | | --dry-run | flag | false | Show the improvement plan without executing | | --resume | flag | false | Resume from last autoresearch session | | --branch | string | autoresearch/<timestamp> | Git branch name for the experiment | | --commit-each | flag | true | Commit each successful iteration | | --verbose | flag | false | Show full metric output each iteration |
git commit with hypothesis + result. If worse: git checkout -- . to revert./autoresearch --metric "mix test --cover | grep 'Total:'" --target 90 --scope "lib/"
## Autoresearch — Session ar-20260320-1
| Iter | Hypothesis | Before | After | Decision |
|------|-----------|--------|-------|----------|
| 1 | Add missing tests for Parser.parse_header/1 edge cases | 72.3% | 78.1% | KEEP |
| 2 | Cover error branches in Validator.check/2 | 78.1% | 83.4% | KEEP |
| 3 | Add property tests for Encoder module | 83.4% | 82.9% | REVERT |
| 4 | Test Encoder.encode/1 boundary inputs directly | 83.4% | 88.7% | KEEP |
| 5 | Cover remaining uncovered functions in Formatter | 88.7% | 91.2% | KEEP |
Result: TARGET MET (91.2% >= 90%)
Branch: autoresearch/20260320-143022 (5 commits, 2 reverted)markdown## Autoresearch Complete - **Branch**: autoresearch/20260320-143022 - **Iterations**: 7 (5 kept, 2 reverted) - **Baseline**: 72.3% - **Final**: 91.2% - **Target**: 90% — MET - **Net improvement**: +18.9% ### Iteration Log | # | Hypothesis | Score | Delta | Decision | |---|-----------|-------|-------|----------| | 1 | ... | 78.1% | +5.8 | KEEP | | ... | ... | ... | ... | ... | ### Recommended Next Steps - Merge branch or cherry-pick successful commits - Run full test suite to confirm no regressions
/commit — Used for each successful iteration| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-20 | pass→pass | 7,279 | 14,153 | +94% | 1 | 1 | 0% | 1,223 | 3,270 | +167% | 0 | 0 | — |
case-01 | fail→fail | 22,651 | 5,973 | -74% | 1 | 1 | 0% | 3,261 | 1,532 | -53% | 0 | 0 | — |
case-02 | fail→fail | 5,411 | 5,721 | +6% | 1 | 1 | 0% | 293 | 1,570 | +436% | 0 | 0 | — |
case-03 | fail→pass | 4,003 | 13,143 | +228% | 1 | 1 | 0% | 430 | 2,699 | +528% | 0 | 0 | — |
case-04 | fail→fail | 19,334 | 12,735 | -34% | 1 | 1 | 0% | 3,148 | 2,957 | -6% | 0 | 0 | — |
case-10 | fail→pass | 8,147 | 3,259 | -60% | 1 | 1 | 0% | 1,304 | 1,752 | +34% | 0 | 0 | — |
case-05 | fail→fail | 16,213 | 20,272 | +25% | 1 | 1 | 0% | 3,086 | 4,293 | +39% | 0 | 0 | — |
case-06 | fail→fail | 5,290 | 6,716 | +27% | 1 | 1 | 0% | 187 | 1,475 | +689% | 0 | 0 | — |
case-07 | fail→fail | 8,022 | 12,103 | +51% | 1 | 1 | 0% | 1,073 | 2,437 | +127% | 0 | 0 | — |
case-08 | fail→fail | 16,608 | 6,640 | -60% | 1 | 1 | 0% | 2,433 | 1,714 | -30% | 0 | 0 | — |
case-09 | pass→fail | 3,234 | 6,076 | +88% | 1 | 1 | 0% | 326 | 1,557 | +378% | 0 | 0 | — |
case-11 | fail→fail | 10,020 | 3,491 | -65% | 1 | 1 | 0% | 1,353 | 1,766 | +31% | 0 | 0 | — |
case-12 | fail→fail | 10,048 | 2,534 | -75% | 1 | 1 | 0% | 1,507 | 1,638 | +9% | 0 | 0 | — |
case-13 | pass→pass | 8,636 | 2,932 | -66% | 1 | 1 | 0% | 1,206 | 1,652 | +37% | 0 | 0 | — |
case-14 | fail→fail | 12,530 | 5,034 | -60% | 1 | 1 | 0% | 2,058 | 2,033 | -1% | 0 | 0 | — |
case-15 | pass→pass | 15,639 | 8,841 | -43% | 1 | 1 | 0% | 2,050 | 2,707 | +32% | 0 | 0 | — |
case-16 | fail→pass | 13,650 | 4,141 | -70% | 1 | 1 | 0% | 2,087 | 2,011 | -4% | 0 | 0 | — |
case-17 | pass→pass | 13,261 | 2,530 | -81% | 1 | 1 | 0% | 1,808 | 1,621 | -10% | 0 | 0 | — |
case-18 | pass→pass | 14,724 | 8,489 | -42% | 1 | 1 | 0% | 2,304 | 2,524 | +10% | 0 | 0 | — |
case-19 | pass→pass | 16,523 | 11,883 | -28% | 1 | 1 | 0% | 2,412 | 2,885 | +20% | 0 | 0 | — |
case-21 | fail→fail | 3,249 | 20,070 | +518% | 1 | 1 | 0% | 391 | 3,123 | +699% | 0 | 0 | — |
case-22 | pass→pass | 9,590 | 6,555 | -32% | 1 | 1 | 0% | 1,512 | 2,380 | +57% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted, and 18 counted toward the lift figure. The other 4 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +9 percentage points is the difference between those two pass rates over the 18 comparable cases. 2 cases got worse with the skill loaded, and they are included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.