New: Earn 20% as an AgentAlley affiliate. Share your link and earn on every sale you refer. Join now New: Earn 20% as an affiliate. Join now

Start an autonomous experiment loop with user-selected

/ar:loop — Autonomous Experiment Loop

by alirezarezvani · MIT license · ★ 26,349 on GitHub · updated Aug 30

/ar:loop — Autonomous Experiment Loop cover

Start an autonomous experiment loop with user-selected interval (10min, 1h, daily, weekly, monthly). Uses CronCreate for scheduling.

---
name: "loop"
description: "Start an autonomous experiment loop with user-selected interval (10min, 1h, daily, weekly, monthly). Uses CronCreate for scheduling. Use when the user runs /ar:loop or asks to run an autoresearch experiment continuously on a schedule."
command: /ar:loop
---

# /ar:loop — Autonomous Experiment Loop

Start a recurring experiment loop that runs at a user-selected interval.

## Usage

```
/ar:loop engineering/api-speed             # Start loop (prompts for interval)
/ar:loop engineering/api-speed 10m         # Every 10 minutes
/ar:loop engineering/api-speed 1h          # Every hour
/ar:loop engineering/api-speed daily       # Daily at ~9am
/ar:loop engineering/api-speed weekly      # Weekly on Monday ~9am

Overview

Start a recurring experiment loop that runs at a user-selected interval.

Manual install (npx, ZIP)
Claude Codenpx skills add alirezarezvani/claude-skills --skill loop -g -a claude-code
Claude Code (manual)mkdir -p ~/.claude/skills && curl -sL https://codeload.github.com/alirezarezvani/claude-skills/tar.gz/19392f7a0826 \ | tar -xz -C ~/.claude/skills --strip-components=4 claude-skills-19392f7a0826/engineering/autoresearch-agent/skills/loop
Windows (PowerShell)New-Item -ItemType Directory -Force "$HOME\.claude\skills" | Out-Null; Invoke-WebRequest "https://m.agentalley.io/zip/c803b1cabe4069dd66db/loop.zip" -OutFile "$env:TEMP\loop.zip"; Expand-Archive "$env:TEMP\loop.zip" -DestinationPath "$HOME\.claude\skills" -Force
Claude.ai / desktopDownload the ZIP and upload it under Settings → Capabilities → Skills.
Codex, Cursor, other agentsPoint them at SKILL.md. The other files are plain text.

Connects with Agent Alley MCP · agentalley.io/mcp

Files included

  • SKILL.md4.1 KB
Read the files here
alirezarezvani/19392f71 file
Shared references1SKILL.md reads these from elsewhere in the repo. Not in the ZIP.Get them on GitHub ↗
SKILL.md
Show the full text123 lines

/ar:loop — Autonomous Experiment Loop

Start a recurring experiment loop that runs at a user-selected interval.

Usage

/ar:loop engineering/api-speed             # Start loop (prompts for interval)
/ar:loop engineering/api-speed 10m         # Every 10 minutes
/ar:loop engineering/api-speed 1h          # Every hour
/ar:loop engineering/api-speed daily       # Daily at ~9am
/ar:loop engineering/api-speed weekly      # Weekly on Monday ~9am
/ar:loop engineering/api-speed monthly     # Monthly on 1st ~9am
/ar:loop stop engineering/api-speed        # Stop an active loop

What It Does

Step 1: Resolve experiment

If no experiment specified, list experiments and let user pick.

Step 2: Select interval

If interval not provided as argument, present options:

Select loop interval:
  1. Every 10 minutes  (rapid — stay and watch)
  2. Every hour         (background — check back later)
  3. Daily at ~9am      (overnight experiments)
  4. Weekly on Monday   (long-running experiments)
  5. Monthly on 1st     (slow experiments)

Map to cron expressions:

Interval Cron Expression Shorthand
10 minutes */10 * * * * 10m
1 hour 7 * * * * 1h
Daily 57 8 * * * daily
Weekly 57 8 * * 1 weekly
Monthly 57 8 1 * * monthly
Step 3: Create the recurring job

Use CronCreate with this prompt (fill in the experiment details):

You are running autoresearch experiment "{domain}/{name}".

1. Read .autoresearch/{domain}/{name}/config.cfg for: target, evaluate_cmd, metric, metric_direction
2. Read .autoresearch/{domain}/{name}/program.md for strategy and constraints
3. Read .autoresearch/{domain}/{name}/results.tsv for experiment history
4. Run: git checkout autoresearch/{domain}/{name}

Then do exactly ONE iteration:
- Review results.tsv: what worked, what failed, what hasn't been tried
- Edit the target file with ONE change (strategy escalation based on run count)
- Commit: git add {target} && git commit -m "experiment: {description}"
- Evaluate: python {skill_path}/scripts/run_experiment.py --experiment {domain}/{name} --single
- Read the output (KEEP/DISCARD/CRASH)

Rules:
- ONE change per experiment
- NEVER modify the evaluator
- If 5 consecutive crashes in results.tsv, delete this cron job (CronDelete) and alert
- After every 10 experiments, update Strategy section of program.md

Current best metric: {read from results.tsv or "no baseline yet"}
Total experiments so far: {count from results.tsv}
Step 4: Store loop metadata

Write to .autoresearch/{domain}/{name}/loop.json:

{
  "cron_id": "{id from CronCreate}",
  "interval": "{user selection}",
  "started": "{ISO timestamp}",
  "experiment": "{domain}/{name}"
}
Step 5: Confirm to user
Loop started for {domain}/{name}
  Interval: {interval description}
  Cron ID: {id}
  Auto-expires: 3 days (CronCreate limit)

  To check progress: /ar:ar-status
  To stop the loop:  /ar:loop stop {domain}/{name}

  Note: Recurring jobs auto-expire after 3 days.
  Run /ar:loop again to restart after expiry.

Stopping a Loop

When user runs /ar:loop stop {experiment}:

  1. Read .autoresearch/{domain}/{name}/loop.json to get the cron ID
  2. Call CronDelete with that ID
  3. Delete loop.json
  4. Confirm: "Loop stopped for {experiment}. {n} experiments completed."

Important Limitations

  • 3-day auto-expiry: CronCreate jobs expire after 3 days. For longer experiments, the user must re-run /ar:loop to restart. Results persist — the new loop picks up where the old one left off.
  • One loop per experiment: Don't start multiple loops for the same experiment.
  • Concurrent experiments: Multiple experiments can loop simultaneously ONLY if they're on different git branches (which they are by default — each experiment gets autoresearch/{domain}/{name}).
1---
2name: "loop"
3description: "Start an autonomous experiment loop with user-selected interval (10min, 1h, daily, weekly, monthly). Uses CronCreate for scheduling. Use when the user runs /ar:loop or asks to run an autoresearch experiment continuously on a schedule."
4command: /ar:loop
5---
6 
7# /ar:loop — Autonomous Experiment Loop
8 
9Start a recurring experiment loop that runs at a user-selected interval.
10 
11## Usage
12 
13```
14/ar:loop engineering/api-speed # Start loop (prompts for interval)
15/ar:loop engineering/api-speed 10m # Every 10 minutes
16/ar:loop engineering/api-speed 1h # Every hour
17/ar:loop engineering/api-speed daily # Daily at ~9am
18/ar:loop engineering/api-speed weekly # Weekly on Monday ~9am
19/ar:loop engineering/api-speed monthly # Monthly on 1st ~9am
20/ar:loop stop engineering/api-speed # Stop an active loop
21```
22 
23## What It Does
24 
25### Step 1: Resolve experiment
26 
27If no experiment specified, list experiments and let user pick.
28 
29### Step 2: Select interval
30 
31If interval not provided as argument, present options:
32 
33```
34Select loop interval:
35 1. Every 10 minutes (rapid — stay and watch)
36 2. Every hour (background — check back later)
37 3. Daily at ~9am (overnight experiments)
38 4. Weekly on Monday (long-running experiments)
39 5. Monthly on 1st (slow experiments)
40```
41 
42Map to cron expressions:
43 
44| Interval | Cron Expression | Shorthand |
45|----------|----------------|-----------|
46| 10 minutes | `*/10 * * * *` | `10m` |
47| 1 hour | `7 * * * *` | `1h` |
48| Daily | `57 8 * * *` | `daily` |
49| Weekly | `57 8 * * 1` | `weekly` |
50| Monthly | `57 8 1 * *` | `monthly` |
51 
52### Step 3: Create the recurring job
53 
54Use `CronCreate` with this prompt (fill in the experiment details):
55 
56```
57You are running autoresearch experiment "{domain}/{name}".
58 
591. Read .autoresearch/{domain}/{name}/config.cfg for: target, evaluate_cmd, metric, metric_direction
602. Read .autoresearch/{domain}/{name}/program.md for strategy and constraints
613. Read .autoresearch/{domain}/{name}/results.tsv for experiment history
624. Run: git checkout autoresearch/{domain}/{name}
63 
64Then do exactly ONE iteration:
65- Review results.tsv: what worked, what failed, what hasn't been tried
66- Edit the target file with ONE change (strategy escalation based on run count)
67- Commit: git add {target} && git commit -m "experiment: {description}"
68- Evaluate: python {skill_path}/scripts/run_experiment.py --experiment {domain}/{name} --single
69- Read the output (KEEP/DISCARD/CRASH)
70 
71Rules:
72- ONE change per experiment
73- NEVER modify the evaluator
74- If 5 consecutive crashes in results.tsv, delete this cron job (CronDelete) and alert
75- After every 10 experiments, update Strategy section of program.md
76 
77Current best metric: {read from results.tsv or "no baseline yet"}
78Total experiments so far: {count from results.tsv}
79```
80 
81### Step 4: Store loop metadata
82 
83Write to `.autoresearch/{domain}/{name}/loop.json`:
84 
85```json
86{
87 "cron_id": "{id from CronCreate}",
88 "interval": "{user selection}",
89 "started": "{ISO timestamp}",
90 "experiment": "{domain}/{name}"
91}
92```
93 
94### Step 5: Confirm to user
95 
96```
97Loop started for {domain}/{name}
98 Interval: {interval description}
99 Cron ID: {id}
100 Auto-expires: 3 days (CronCreate limit)
101 
102 To check progress: /ar:ar-status
103 To stop the loop: /ar:loop stop {domain}/{name}
104 
105 Note: Recurring jobs auto-expire after 3 days.
106 Run /ar:loop again to restart after expiry.
107```
108 
109## Stopping a Loop
110 
111When user runs `/ar:loop stop {experiment}`:
112 
1131. Read `.autoresearch/{domain}/{name}/loop.json` to get the cron ID
1142. Call `CronDelete` with that ID
1153. Delete `loop.json`
1164. Confirm: "Loop stopped for {experiment}. {n} experiments completed."
117 
118## Important Limitations
119 
120- **3-day auto-expiry**: CronCreate jobs expire after 3 days. For longer experiments, the user must re-run `/ar:loop` to restart. Results persist — the new loop picks up where the old one left off.
121- **One loop per experiment**: Don't start multiple loops for the same experiment.
122- **Concurrent experiments**: Multiple experiments can loop simultaneously ONLY if they're on different git branches (which they are by default — each experiment gets `autoresearch/{domain}/{name}`).
123 
View all files on GitHub →

Details

Updated
Aug 30, 2026
License
MIT
Stars on the repo
★ 26,349
Checked
Source
alirezarezvani/claude-skills ↗
Creator
alirezarezvani · 363 listings
View creator

Similar skills

See all →
SkillReverse engineer native, managed, Electron/JavaScriptREAmorluto/rea · by morlutoReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.★ 316k GitHub starsSkillBrainstorms ideas into designs before any creative workBrainstorming Ideas Into Designsobra/superpowers · by obraYou MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.★ 290k GitHub starsSkillRequires technical rigor and verificationCode Review Receptionobra/superpowers · by obraUse when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementation★ 290k GitHub starsSkillDiagnosis loop for hard bugs and performance regressionsDiagnosing bugsmattpocock/skills · by mattpocockDiagnosis loop for hard bugs and performance regressions. Use when the user says "diagnose"/"debug this", or reports something broken/throwing/failing/slow.★ 267k GitHub starsSkillImplement the result of /to-spec and /to-tickets in codeImplement specmattpocock/skills · by mattpocockImplement the result of /to-spec and /to-tickets in code.★ 267k GitHub starsSkillWriting a PR bodymattpocock/skills · by mattpocockUse when writing a PR body.★ 267k GitHub stars

More from alirezarezvani

SkillResume a paused experiment/ar:ar-resume — Resume Experimentalirezarezvani/claude-skills · by alirezarezvaniResume a paused experiment. Checkout the experiment branch, read results history, continue iterating. Use when the user runs /ar:ar-resume or asks to pick up a previously started autoresearch experiment.★ 26.3k GitHub starsSkillShow experiment dashboard with results, active loops/ar:ar-status — Experiment Dashboardalirezarezvani/claude-skills · by alirezarezvaniShow experiment dashboard with results, active loops, and progress. Use when the user runs /ar:ar-status or asks how an autoresearch experiment is going.★ 26.3k GitHub starsSkillRun a single experiment iteration/ar:run — Single Experiment Iterationalirezarezvani/claude-skills · by alirezarezvaniRun a single experiment iteration. Edit the target file, evaluate, keep or discard. Use when the user runs /ar:run or asks for one manual autoresearch iteration.★ 26.3k GitHub starsSkillSet up a new autoresearch experiment interactively/ar:setup — Create New Experimentalirezarezvani/claude-skills · by alirezarezvaniSet up a new autoresearch experiment interactively. Collects domain, target file, eval command, metric, direction, and evaluator. Use when the user runs /ar:setup or asks to start optimizing a file with the autoresearch loop.★ 26.3k GitHub starsSkill/cs:boardroom <brief/cs:boardroom — Multi-Role Boardroom Deliberationalirezarezvani/claude-skills · by alirezarezvani/cs:boardroom <brief> — 6-phase multi-role deliberation across the C-suite with Phase 2 isolation, critic pre-screen, and synthesis. Outputs a board memo. Use when a decision spans multiple executive domains — e.g. a pricing change touching finance, positioning, and product, or a raise-vs-cut runway call.★ 26.3k GitHub starsSkill/cs:brief <topic — Generate a one-page strategy brief/cs:brief — One-Page Strategy Briefalirezarezvani/claude-skills · by alirezarezvani/cs:brief <topic> — Generate a one-page strategy brief from an office-hours intake. First step in the strategic sprint pipeline. Use when a strategic question needs to be framed before boardroom deliberation — e.g. locking options, assumptions, and success criteria for a pricing change or a market-entry decision.★ 26.3k GitHub stars