codex-autoresearch-loop — Codex skill: what it does, how to install
Runs an autonomous edit-test-revert loop against measurable repository metrics. It stacks working changes in git and rolls back regressions without manual supervision.
npx skills add reason-machines/trending-skills --skill codex-autoresearch-loop -a claude-codeWhat codex-autoresearch-loop 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.
What it helps with
- 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 for the agent
- $codex-autoresearch eliminate all
anytypes in TypeScript files - $codex-autoresearch fix all failing tests after refactor
How to install codex-autoresearch-loop
1Skills CLI (Vercel)
npx skills add reason-machines/trending-skills --skill codex-autoresearch-loop -a claude-code2Manually: put the files in place
~/.claude/skills/codex-autoresearch-loop/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/codex-autoresearch-loop/
1Skills CLI (Vercel)
npx skills add reason-machines/trending-skills --skill codex-autoresearch-loop -a codex2Manually: put the files in place
.agents/skills/codex-autoresearch-loop/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add reason-machines/trending-skills --skill codex-autoresearch-loop -a cursor2Manually: put the files in place
.cursor/skills/codex-autoresearch-loop/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install reason-machines/trending-skills codex-autoresearch-loop2Manually: put the files in place
.github/skills/codex-autoresearch-loop/SKILL.md1Skills CLI (Vercel)
npx skills add reason-machines/trending-skills --skill codex-autoresearch-loop -a gemini-cli2Platform CLI
gemini skills install https://github.com/reason-machines/trending-skills --path skills/codex-autoresearch-loopManually: put the files in place
.devin/skills/codex-autoresearch-loop/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add reason-machines/trending-skills --skill codex-autoresearch-loop -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about codex-autoresearch-loop
How to install codex-autoresearch-loop in Codex?
Run npx skills add reason-machines/trending-skills --skill codex-autoresearch-loop -a codex. It installs the skill file into .agents/skills/codex-autoresearch-loop/SKILL.md.
What does codex-autoresearch-loop do?
It runs an unattended loop that makes atomic changes, evaluates them against verification commands, and retains only measurable improvements in git.
What is the difference between verify and guard commands?
The verify command checks whether the target metric got better, triggering a rollback if it did not. The guard command ensures other project parts did not break, allowing up to two repair attempts before reverting.