Skip to main content
skill Claude Code CX Codex Cursor GitHub Copilot

autoresearch · uditgoenka — Claude Code skill: what it does, how to install

This skill runs iteration loops that modify code, verify a metric, and keep or discard the result. Use it for debugging, improvements, and regression checks.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add uditgoenka/autoresearch --skill autoresearch -a claude-code
Open on GitHub

What autoresearch does

autoresearch turns a goal or metric into an iteration loop: change the code, verify the result, then keep a successful version or discard it. The base mode accepts an explicit metric or verification step. A plain-language goal starts orchestration, while an empty invocation opens the setup wizard.

The skill includes slash commands for planning, debugging, fixing errors, STRIDE and OWASP audits, scenario generation, documentation, reasoning, regression checks, and result analysis. The orchestrator classifies the goal, derives a testable success predicate, and routes work to the fitting subcommand. Results are logged under autoresearch/{subcommand}-{YYMMDD}-{HHMM}/; handoffs between steps use handoff.json.

Loops are bounded by default: the base command uses 25 iterations, with separate limits for other modes. Publishing, pushing, and deploying require explicit user approval. Check the metric and verification command before starting, especially when the goal is plain language.

What it helps with

  • test a code change against a metric
  • investigate a bug by falsifying hypotheses
  • remove errors one at a time
  • run a STRIDE and OWASP audit
  • compare a baseline with a candidate for regressions

Example prompts for the agent

  • Run an iteration loop to improve API response time. Use `tests/benchmark.sh` for `Metric:` and run the verification command after each iteration.
  • `/autoresearch:debug` investigate the failing test in `tests/auth.test.ts` and test each hypothesis with a separate run.
  • `/autoresearch:regression` compare the current branch with the baseline and return STABLE or UNSTABLE.

How to install autoresearch

1Skills CLI (Vercel)

npx skills add uditgoenka/autoresearch --skill autoresearch -a claude-code

2Manually: put the files in place

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

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

Other versions of autoresearch

Similar

expo-web-to-native expo Guides an existing React web app into a native iOS/Android app with Expo. Use it for a staged screen-by-screen migration. Claude Code CX Codex Cursor +1 19,500installs apify-actor-development apify A skill that walks an agent through building, debugging, and deploying Apify Actors. Covers project scaffolding, schemas, local runs, and pushes to the Apify platform. Claude Code CX Codex Cursor +1 10,800installs thinking-out-loud Shubham Saboo This skill turns a messy stream of thought into a reviewable brief before work begins. Use it for voice notes, reversals, and half-formed ideas. Claude Code CX Codex Cursor +1 431installs uncodixfy cyxzdev Teaches the agent to skip the default Codex aesthetic: soft gradients, floating panels, decorative copy. Use it when generated frontend looks too much like a template. Claude Code CX Codex Cursor +1 5,600installs ce-compound EveryInc A skill that captures non-obvious reasoning from solved problems as durable project knowledge. Use it when the final code works but the logic behind it might vanish when the next person reads the code. Claude Code CX Codex Cursor +1 3,700installs ce-plan EveryInc Builds structured technical implementation plans without touching production code. Useful when scoping features before passing work to execution agents. Claude Code CX Codex Cursor +1 3,700installs setup-matt-pocock-skills Matt Pocock This skill configures a repository for Matt Pocock's engineering skills by setting its issue tracker, triage labels, and domain docs layout. Run it before using the other skills. Claude Code 1,052,851installs to-tickets Matt Pocock Turns a plan, spec, or conversation into small end-to-end tickets with explicit blockers. Use it to agree on the work breakdown before tickets go to a tracker. Claude Code 711,230installs

Questions about autoresearch

How do I install autoresearch in Claude Code?

Run npx skills add uditgoenka/autoresearch --skill autoresearch -a claude-code, run the same command once more, then open ~/.claude/skills/autoresearch/SKILL.md.

What does autoresearch do?

The skill repeats a change-and-verify loop, keeping a result when it passes the chosen metric and discarding a failed version. It also routes plain-language goals to suitable subcommands.

How many iterations does autoresearch run?

The base command uses 25 iterations. You can change the limit with Iterations: N or explicitly enable Iterations: unlimited.

Source text

SKILL.md · MIT
---
name: autoresearch
description: "Autonomous iteration loop: modify, verify, keep/discard against any metric"
version: 2.2.2
---

# Autoresearch — Autonomous Goal-directed Iteration

## Safety Invariants (all subcommands)
- Never push, publish, or deploy without explicit user approval.
- Bounded by default. Override with `Iterations: unlimited`.
- All results logged to `autoresearch/{subcommand}-{YYMMDD}-{HHMM}/` directory.
- Chain handoff via `handoff.json`. Evals reads `*-results.tsv`.

## Dispatch (bare `/autoresearch`)

Parse the invocation in this order:

| Condition | Mode |
|---|---|
| `Metric:` or `Verify:` present | **Classic** — existing metric loop, unchanged |
| Free-form natural-language goal, no metric/verify | **Orchestrator** — see Orchestrator section |
| Nothing | **Setup wizard** — interactive config builder |
| `--classic` flag | Force Classic regardless of goal text |
| `--auto` flag | Force Orchestrator regardless of goal text |

Print a banner on every invocation: `[autoresearch] mode: classic | orchestrator | wizard`.

## Subcommands

| Command | Does | Default Iterations |
|---|---|---|
| `/autoresearch` | Iterate against a metric: modify → verify → keep/discard | 25 |
| `/autoresearch:plan` | Convert a goal into validated Scope, Metric, Verify config | N/A |
| `/autoresearch:debug` | Hunt bugs: hypothesize → test → falsify → repeat | 15 |
| `/autoresearch:fix` | Crush errors one-by-one until zero remain | 20 |
| `/autoresearch:security` | STRIDE + OWASP audit with red-team personas | 15 |
| `/autoresearch:ship` | Ship through 8 phases: checklist → dry-run → deploy → verify | N/A |
| `/autoresearch:scenario` | Generate edge cases across 12 dimensions | 20 |
| `/autoresearch:predict` | 5 expert personas debate before implementation | N/A |
| `/autoresearch:learn` | Scout codebase → generate docs or wiki → validate → fix loop | 10 |
| `/autoresearch:reason` | Adversarial debate with blind judges until convergence | 8 |
| `/autoresearch:probe` | 8 personas interrogate requirements until saturation | 15 |
| `/autoresearch:improve` | Research ICP challenges, discover improvements, generate PRDs | 15 |
| `/autoresearch:evals` | Analyze iteration results: trends, plateaus, regressions | N/A |
| `/autoresearch:regression` | Regression stability gate: baseline vs candidate, verdict STABLE/UNSTABLE | N/A |

## Universal Flags

| Flag | Applies To | Purpose |
|---|---|---|
| `Iterations: N` | All looping | Set iteration count |
| `Iterations: unlimited` | All looping | Opt-in unbounded |
| `--evals` | All looping | Mid-loop checkpoints + final summary |
| `--evals-interval N` | All looping | Override checkpoint frequency |
| `--chain <targets>` | All | Sequential handoff after completion |
| `--<subcommand>` | All | Shorthand for `--chain <subcommand>` |
| `--dry-run` | Orchestrator | Print derived config + planned pipeline; no execution |
| `--max-cycles N` | Orchestrator | Hard ceiling on orchestration cycles (default 50) |
| `--classic` | Bare `/autoresearch` | Force Classic metric-loop mode |
| `--auto` | Bare `/autoresearch` | Force Orchestrator mode |

## Orchestrator

Activated when a plain-language goal is given without `Metric:`/`Verify:`. Classifies the goal into a **Goal archetype** — see `references/orchestrator-routing.md` for the archetype table and router decision table.

Resolve every `scripts/...` path below relative to this installed skill directory, never relative to the caller's working directory.

**Two modes based on archetype:**
- **Orchestration loop** — predicate-bearing archetypes (ship-ready, optimize-metric, fix-broken, harden, build-feature, explore). Goal has a mechanical Success predicate; the loop runs until that predicate is met.
- **Single-pass dispatch** — subjective/terminal archetypes (document, what-to-build, decide-design). Routes once to the fitting subcommand (learn / improve / reason), lets it self-terminate, then reports. No loop, no Plateau, no ship gate.

### Orchestration Loop Steps

Backed by `scripts/orchestrate.sh` (deterministic seam — all routing logic lives there). Subcommands exposed: `classify`, `next-hop`, `units`, `plateau`, `screen-cmd`, `verdict`, `validate-state`, `screen-state-predicate`.

1. **Classify** — `scripts/orchestrate.sh classify "<goal>"` → archetype label + mode.
2. **Derive predicate** — reuse `plan` logic to produce a concrete Success predicate: exact shell command + expected output. For `optimize-metric`, run the full plan/wizard derivation internally.
3. **Confirm** — ONE `AskUserQuestion` showing: archetype, mode, concrete predicate (command + expected output), terminal choice (stop-at-verified vs proceed-to-ship). Misclassifications are caught here, not mid-run.
4. **Round-0 dry-run** — prove the predicate command runs and returns a value; safety-screen every derived command via `screen-cmd`; print projected cycle budget. Stop here if `--dry-run`.
5. **Loop** until predicate satisfied:
   a. Assess state via cheap signals (last `handoff.json`, regression verdict, error count) + affected-test verify.
   b. `scripts/orchestrate.sh next-hop orchestrator-state.json` → next subcommand.
   c. Run subcommand (its own bounded inner loop).
   d. Record per-hop outcome ∈ {progressed, no-op, failed, blocked}.
   e. Fold hop's `handoff.json` into `orchestrator-state.json`.
   f. `scripts/orchestrate.sh units` → recompute **Units remaining**.
6. **Stop conditions** (checked after each hop):
   - Predicate met → ship gate (only if ship is in the pipeline) else `CONVERGED`.
   - `scripts/orchestrate.sh plateau orchestrator-state.json` → true → stop + report `PLATEAU`.
   - Cycles > ceiling (default 50, override `--max-cycles N`) → stop + report `CEILING`.
   - Hop outcome `blocked`/`failed` with no alternative route → checkpoint + stop + report `BLOCKED`.

### Orchestrator State

`orchestrator-state.json` — orchestrator-owned, additive. Tracks: goal, archetype, predicate, terminal-choice, `units_remaining` history, cycle count, per-hop pipeline log with outcomes, current incumbent. Each hop's `handoff.json` is unchanged (single-hop bridge); the orchestrator reads it and folds it in. Two clearly-owned state objects, no overlap.

### Orchestrator Safety Invariants

- **Never auto-approve ship/deploy/push.** The orchestrator never passes `--auto` to `ship`; deploy always requires explicit user approval.
- **Data-migration behind anchored DB-URL allowlist.** Reuses regression's allowlist — host must be `localhost`/`127.0.0.1`/container hostname, or database name carries `_test`/`_ci` suffix. Bare substring match does not qualify. Anything else refused.
- **screen-cmd on every derived command** — run before the loop starts AND on every command read from a persisted state file on resume. Persisted commands are never trusted; resume re-screens the pinned predicate via `screen-state-predicate` and refuses on `refuse`.
- **No un-screened commands mid-loop.** The autonomous loop cannot introduce new shell commands that bypass `screen-cmd`.
- **Predicate pinned, not re-derived.** Round-0 writes the derived Success predicate verbatim into `orchestrator-state.json`; every cycle and every resume reuses that exact string so "done" is reproducible across runs.
- **Validate the ledger before routing.** `validate-state` gates `orchestrator-state.json` (required fields + coarse types); a malformed ledger is not trusted to route from.
- **Independent verify before convergence.** High-impact changes accepted on the working signal set `pending_verify`; `next-hop` routes to a `verify` hop (held-out / adversarial check) before `DONE` or ship. The verify hop never auto-approves ship.
- **Unknown-units cycles excluded from Plateau counter.** A cycle where `units` returns `unknown` (e.g. runner crash) is not counted as zero-progress; repeated `unknown` routes to `BLOCKED`.

© uditgoenka · MIT · uditgoenka/autoresearch

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