# codex-autoresearch-loop

Runs an autonomous edit-test-revert loop against measurable repository metrics. It stacks working changes in git and rolls back regressions without manual supervision.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 1200 installs · ★ 88
- Author: reason-machines
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/reason-machines/trending-skills/tree/HEAD/skills/codex-autoresearch-loop/SKILL.md
- Updated: 2026-10-09
- HTML: https://affpapa.org/en/nevibecode/skills/codex-autoresearch-loop

## What it does

The skill sets up an automated iterative loop across your code. Before editing anything, the agent probes the repository, identifies the target metric, and prepares two validation steps. You review the inferred plan during an interactive confirmation prompt before execution starts.

Two separate gates validate every step. The verify command ensures the primary metric improves, while the guard command guarantees that unrelated code remains intact. Successful steps stay in git history; failures revert automatically. The loop never modifies files covered by the guard.

Without a defined iteration cap, the loop continues indefinitely until stopped. Discoveries from each step save to `lessons.md`, allowing subsequent or resumed sessions to avoid previously discarded strategies.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add reason-machines/trending-skills --skill codex-autoresearch-loop -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/codex-autoresearch-loop/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/codex-autoresearch-loop/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add reason-machines/trending-skills --skill codex-autoresearch-loop -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/codex-autoresearch-loop/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add reason-machines/trending-skills --skill codex-autoresearch-loop -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/codex-autoresearch-loop/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install reason-machines/trending-skills codex-autoresearch-loop
```

2. **Manually: put the files in place**
- File: `.github/skills/codex-autoresearch-loop/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add reason-machines/trending-skills --skill codex-autoresearch-loop -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/reason-machines/trending-skills --path skills/codex-autoresearch-loop
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/codex-autoresearch-loop/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add reason-machines/trending-skills --skill codex-autoresearch-loop -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/reason-machines/trending-skills/tree/HEAD/skills/codex-autoresearch-loop/SKILL.md

## When to use it
- eliminate explicit any types throughout TypeScript projects
- raise test coverage percentages across specified directories
- resolve failing test suites until all assertions pass
- diagnose intermittent API errors by testing falsifiable hypotheses

## Example prompts
- $codex-autoresearch eliminate all `any` types in TypeScript files
- $codex-autoresearch fix all failing tests after refactor

## Similar
- [setup-matt-pocock-skills](https://affpapa.org/en/nevibecode/skills/setup-matt-pocock-skills.md) — skill · 1052851 installs
- [ask-matt](https://affpapa.org/en/nevibecode/skills/ask-matt.md) — skill · 766587 installs
- [to-tickets](https://affpapa.org/en/nevibecode/skills/to-tickets.md) — skill · 711230 installs
- [writing-plans](https://affpapa.org/en/nevibecode/skills/writing-plans.md) — skill · 282859 installs
- [caveman-review](https://affpapa.org/en/nevibecode/skills/caveman-review.md) — skill · 411800 installs
- [caveman-compress](https://affpapa.org/en/nevibecode/skills/caveman-compress.md) — skill · 411500 installs

From the same set: [reason-machines/trending-skills](https://affpapa.org/en/nevibecode/by/reason-machines/trending-skills.md) — 139 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
