Skip to main content
skill Claude Code

loop — Claude Code skill: what it does, how to install

This skill runs recurring autoresearch experiments through CronCreate. Use it when an experiment should be checked on a schedule.

Install into Claude Code · Plugin marketplace All methods and platforms ↓
/plugin marketplace add alirezarezvani/claude-skills
/plugin install autoresearch-agent@claude-code-skills
Open on GitHub

What loop does

loop takes an experiment and an interval: 10m, 1h, daily, weekly, or monthly. When no interval is supplied, Claude Code presents the available options. /ar:loop engineering/api-speed 1h creates the recurring job, while /ar:loop stop engineering/api-speed stops it.

Before each iteration, the agent reads config.cfg, program.md, and results.tsv, checks out autoresearch/{domain}/{name}, makes one change, commits it, and runs python {skill_path}/scripts/run_experiment.py --experiment {domain}/{name} --single. The result is read as KEEP, DISCARD, or CRASH. Schedule metadata is stored in .autoresearch/{domain}/{name}/loop.json.

CronCreate jobs auto-expire after 3 days. Run loop again to continue; saved results let the next loop pick up where the previous one ended. Install this skill when the experiment already follows the .autoresearch layout. Parallel loops require separate git branches.

What it helps with

  • run an autoresearch experiment on a schedule
  • repeat one experiment iteration at a selected interval
  • stop an active loop with /ar:loop stop
  • store the cron ID and loop settings in loop.json

Example prompts for the agent

  • `/ar:loop engineering/api-speed 10m`
  • `/ar:loop engineering/api-speed daily`
  • `/ar:loop stop engineering/api-speed`

How to install loop

1Plugin marketplace

/plugin marketplace add alirezarezvani/claude-skills
/plugin install autoresearch-agent@claude-code-skills

This installs the whole autoresearch-agent plugin with all its skills

2Skills CLI (Vercel)

npx skills add alirezarezvani/claude-skills --skill loop -a claude-code

3Manually: put the files in place

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

Copy the whole skill folder; for one project use .claude/skills/loop/

From the same set349

The whole set →
engineering-skills Alireza Rezvani An engineering skill index for Claude Code that helps you select one specialist SKILL.md for the task at hand. It covers architecture, testing, DevOps, and data work. Claude Code 2,387installs finance-skills Alireza Rezvani Routes ambiguous finance prompts to the right bundled skill: financial-analyst, saas-metrics-coach, or month-end-close. Claude Code 2,312installs marketing-skills Alireza Rezvani A directory and router for marketing skills in Claude Code. It picks the right specialist skill for SEO, content, CRO, channels, and related tasks. Claude Code 2,264installs business-growth-skills Alireza Rezvani Routes growth and revenue prompts to the right specialized skill across customer success, sales engineering, RevOps, and proposals in Claude Code. Claude Code 2,189installs engineering-advanced-skills Alireza Rezvani An index of 37 engineering skills for architecture, automation, reliability, and platform work. Use it when a project needs task-specific engineering workflows. Claude Code 2,019installs product-skills Alireza Rezvani Product work orchestrator for Claude Code. Routes queries across 16 domain lanes and validates discovery trees with deterministic scripts. Claude Code 1,994installs pm-skills Alireza Rezvani Routes project-delivery requests across 8 PM sub-skills for Jira, Confluence, sprints, reporting, and team communication. Useful for controlled delivery work. Claude Code 1,975installs senior-backend Alireza Rezvani Scaffolds backend APIs, detects database bottlenecks, and runs load tests. Useful when designing Express routes, optimizing PostgreSQL, or preparing for production. Claude Code 1,674installs

Similar

prompt-optimizer official github Converts rough drafts, tasks, and half-formed ideas into finished, copy-pasteable chat prompts without placeholder variables. GitHub Copilot 467installs gke-ai-troubleshooting-tpu-partition-overlap official google Diagnoses GKE TPU slice creation failures (SliceCreationFailed) caused by partition overlap with another slice or JobSet. Pinpoints node conflicts using read-only checks. Claude Code Gemini CLI CX Codex 378installs gke-ai-troubleshooting-tpu-reservation-stockout official google Diagnoses GKE TPU node pool creation failures caused by reservation stockouts when unhealthy nodes lack auto-repair and hoard reserved capacity. Claude Code Gemini CLI CX Codex 377installs harness-engineering official github Turns repeated coding agent mistakes into repository rules, drift checks, and regression tests. Use it when Copilot keeps repeating the same errors in your project. GitHub Copilot 366installs skill-creator official anthropics Creates and refines skills, then tests them with prompts, evaluations, and performance checks. Claude Code Claude.ai 414,180installs writing-for-agents Matt Pocock Guidance for writing skills and agent-facing documents. Use it when editing AGENTS.md, CLAUDE.md, or reference files reached from them. Claude Code 466,719installs media-use heygen-com Finds or generates media for HyperFrames videos, including voiceovers, music, cutouts, and color grades. Stores files locally in assets. Claude Code CX Codex Cursor +1 1,100,000installs mcp-builder official anthropics This skill walks through building an MCP server in TypeScript or Python, from reading the protocol spec to writing tests and evaluation questions. Claude Code Claude.ai 130,949installs

Questions about loop

How do I install loop in Claude Code?

Run npx skills add alirezarezvani/claude-skills --skill loop -a claude-code. You can also use /plugin marketplace add alirezarezvani/claude-skills, followed by /plugin install autoresearch-agent@claude-code-skills.

What does loop do?

The skill creates a recurring autoresearch loop. It reads experiment history, makes one change, commits it, and evaluates the run with run_experiment.py.

How long does a loop run?

CronCreate recurring jobs auto-expire after 3 days. Results remain available, so you can run loop again and continue the experiment.

Source text

SKILL.md · MIT
---
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."
metadata:
  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
/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`:

```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}`).

© Alireza Rezvani · MIT · alirezarezvani/claude-skills

See also

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor