florianbruniaux/claude-code-ultimate-guide/autoresearch
Claude Code and agent skill by florianbruniaux/claude-code-ultimate-guide
- community
Checking that the SKILL.md file is still in the repository.
Autonomous improvement loop: scan codebase metrics, scaffold experiment files, run agent-driven iterations until metric improves
Install
npx vskill@latest install florianbruniaux/claude-code-ultimate-guide/autoresearchSKILL.md
Autoresearch: Autonomous improvement loop
Scan codebase quality metrics, propose improvement loops, and run autonomous agent iterations. Inspired by karpathy/autoresearch, adapted from ML research to code quality.
Concept: The agent proposes a code change, runs the measurement, keeps the change if the metric improved, reverts via git reset if not, and repeats until manually stopped.
Time: Scan ~30s | Per iteration: depends on scope | Loop: runs indefinitely until you stop it
Mode 1: Scan (default)
Measure current state, detect existing loops, propose next actions.
Instructions
Run the following metrics and display a prioritized proposal table.
Step 1: Measure codebase metrics
Adapt grep patterns to your project's conventions. These are TypeScript defaults, adjust for your stack.
Step 2: Detect existing loops
Step 3: Display
Mode 2: --scaffold <loop-name>
Generate the 3 mechanical files for a loop. Does not generate `program.md`: write that yourself to encode project-specific constraints.
Instructions
Create the following files under scripts/autoresearch/{loop-name}/:
`measure.sh`: the evaluation harness (single metric, returns an integer):
`direction.txt`: improvement direction:
(Use higher for metrics like test coverage or quality score.)
`files.txt`: scope the agent should operate on:
After creating the files, display:
Mode 3: --run <loop-name>
Execute the autonomous loop. The agent runs indefinitely: stop it manually when satisfied.
Instructions
Verify prerequisites:
Run the loop:
Read scripts/autoresearch/{loop-name}/program.md fully before starting. Then enter the following cycle, repeat until stopped:
Stopping criteria (from program.md):
- Metric reaches target (e.g., 0)
- No more mechanical changes possible
- User manually stops the process
Display each iteration:
Mode 4: --status
Show status of all loops in the project.
Instructions
Display:
Writing program.md: The most important file
program.md is the agent's behavior contract. Write it yourself, never auto-generate it. It must encode what the agent can/cannot touch for your specific codebase.
Minimal structure:
The pattern (background)
This command implements the autoresearch loop pattern from karpathy/autoresearch:
| ML Research (karpathy) | Code Quality (this command) | |
|---|---|---|
Modify train.py | Modify src/ files | |
Measure val_bpb | Measure grep count | |
| 5-minute GPU budget | One atomic change per iteration | |
| Keep if val_bpb improves | Keep if count decreases | |
git reset if not | git checkout -- . if not | |
program.md = agent skill | program.md = agent skill |
Key insight: a fixed, objective metric + git as rollback mechanism = safe autonomous iteration. The agent never needs human approval per-change because every bad change is automatically reverted.
Usage
Scan and propose loops:
Scaffold files for a specific loop:
Run the autonomous loop (after writing program.md):
Check status of all loops:
$ARGUMENTS
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingexamples/skills/autoresearch/SKILL.md
Popularity
- Repository stars
- 6,271
- Repository forks
- 815
- 7-day trend score
- 43
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/florianbruniaux/claude-code-ultimate-guide/autoresearch)