Terminal LLMs already write solid first-pass code, so the next bottleneck is getting an agent to keep editing, testing, and rolling back on its own until a measurable target passes. Claude Autoresearch, a skill package running inside Claude Code, automates that exact loop.

An 8-Step Loop Inspired by Karpathy’s Autoresearch

Claude Autoresearch repeats mechanical verification and automatic rollback indefinitely against a single user-defined metric. Modeled after overnight ML training runs that keep only checkpoint improvements, the package executes an 8-step cycle covering code edit, metric check, and commit-or-revert decisions.

Each iteration changes one thing at a time. If the target metric regresses, Git immediately reverts the working tree to the prior clean commit, appending a single-line outcome record to a TSV log.

Six Purpose-Built Slash Commands and Regression Guards

Beyond generic metric loops, the package ships 6 slash commands tailored to engineering workflows including planning, security auditing, debugging, and release prep. Running /autoresearch:plan defines the target metric and verification command first, while /autoresearch:security hunts vulnerabilities and patches them iteratively.

For bug hunting, /autoresearch:debug forms hypotheses and traces root causes step by step, while a Guard option runs secondary checks alongside the primary metric so optimizations never break existing features.

Setup and Real-World Test Coverage Gains

Registering the repository path in your Claude Code plugin config activates the skill right away, or you can copy the skill files directly into a local project directory. Applied to raising test coverage into the 72-90% range, a single command kicks off the loop, discards failed edits, and leaves only verified improvements in Git history.

Handing repetitive edit-and-test cycles over to a guarded loop lets developers start the terminal run and focus elsewhere.

Summary

  • Runs an automated 8-step edit, verify, and Git-rollback loop driven by a single quantitative metric.
  • Includes 6 specialized slash commands covering planning, security audits, hypothesis-driven debugging, and release checks.
  • Supports a Guard option so optimizing a target metric never breaks surrounding functionality.