kmshihab7878/claude-code-setup/autoresearch
Claude Code and agent skill by kmshihab7878/claude-code-setup
- community
Checking that the SKILL.md file is still in the repository.
Autonomous self-improvement loop — iteratively modify a target, evaluate against a scoring function, keep improvements, revert failures. Adapted from Karpathy's autoresearch pattern. Use for strategy optimization, code quality improvement, prompt engineering, config tuning, or any domain with an objective evaluation function.
Install
npx vskill@latest install kmshihab7878/claude-code-setup/autoresearchSKILL.md
Autoresearch: Autonomous Improvement Loop
An AI-driven methodology where you iteratively modify a single target, evaluate changes against an objective scoring function, and compound improvements. Based on Karpathy's autoresearch pattern, proven on 103 experiments achieving 7.6x score improvement.
When to Use
- Optimizing trading strategies against a backtest harness
- Improving code quality metrics (test pass rate, coverage, performance)
- Tuning configuration parameters against benchmarks
- Prompt engineering with measurable evaluation
- Any domain where you have: a mutable target + an objective score
The 5 Pillars
1. Single Mutable Surface
Only ONE file (or narrow set of files) can change per experiment. Everything else is frozen. This constrains the search space and makes experiments reproducible.
2. Immutable Evaluation Harness
The test/scoring system NEVER changes during the loop. If you change both the target and the evaluator, you can't tell what improved.
3. Composite Scoring Function
Reduce multi-dimensional quality to a single number. The scoring function should:
- Reward the primary objective (Sharpe ratio, test pass rate, accuracy)
- Penalize failure modes (drawdown, flakiness, latency)
- Have hard cutoffs for degenerate outputs (crashes, zero results)
4. Git as Experiment Ledger
Every experiment is one commit. If the score improves, keep the commit. If not, git reset --hard HEAD~1. The git history becomes a complete, reproducible record of every hypothesis tested.
5. Autonomous Loop
Once started, the loop runs until interrupted. No human approval per iteration. The scoring function IS the approval.
The Loop Protocol
Results Tracking
results.tsv format
Evolution Log (EXPERIMENTS.md)
For significant experiments, document:
Research Direction Tiers
Always prioritize experiments by expected impact:
Tier 1 — High probability, proven patterns
- Parameter tuning within known-good ranges
- Adding signals that have worked in related domains
- Simplification (removing features that don't contribute)
Tier 2 — Worth exploring
- New signal types or indicators
- Regime-adaptive behavior
- Cross-asset or cross-domain signals
Tier 3 — Novel / speculative
- Fundamentally different approaches
- Complex feature interactions
- Machine learning components
The Simplicity Principle
From 103 experiments on Nunchi's auto-researchtrading:
The biggest gains came from REMOVING complexity, not adding it."The Great Simplification" produced +2.0 score by eliminating pyramiding,funding boost, BTC filter, and correlation weighting.
Apply this: After every 10-20 experiments, run a "simplification pass" — systematically remove features one at a time and test if the score improves without them.
Domain Adaptations
Trading Strategy Optimization
- Target:
strategy.py - Eval:
uv run backtest.pyor equivalent - Score:
grep "^score:" output - See:
~/.claude/skills/autoresearch/templates/aster-trading.md
Code Quality Improvement
- Target: source file(s) under test
- Eval:
pytest --tb=short -qor project test command - Score: Parse pass/fail counts, compute
pass_rate * coverage_factor - Hard cutoffs: any test that previously passed now fails = -999
Prompt Engineering
- Target: prompt template file
- Eval: Run prompt against test cases, score responses
- Score:
accuracy * consistency - latency_penalty - cost_penalty - Log: Track each prompt version with its scores
Configuration Tuning
- Target: config file (YAML, JSON, TOML)
- Eval: Integration test or benchmark suite
- Score:
success_rate * performance_factor - error_penalty
Agent Definition Improvement
- Target: agent
.mdfile - Eval: Run agent against benchmark prompts, score outputs
- Score:
relevance * quality - hallucination_penalty
Integration with Existing Skills
| Skill | How It Connects | |
|---|---|---|
finance-ml | Scoring functions, backtesting methodology, risk metrics | |
aster-trading | Live data via MCP tools, Aster-specific fee structures | |
testing-methodology | Test-as-evaluator patterns, coverage metrics | |
coding-workflow | Incremental development, git branch management | |
experiment-tracker agent | Experiment design, statistical analysis | |
workflow-optimizer agent | Process improvement measurement |
Anti-Patterns
- Changing the evaluator mid-loop — Invalidates all prior comparisons
- Keeping changes without score improvement — "It looks better" is not evidence
- Multiple changes per experiment — Can't attribute improvement to any single change
- Stopping too early — The best improvements often come after 50+ experiments
- Ignoring the simplification pass — Complexity accumulates; periodically prune
- Over-fitting to the scoring function — If score seems too good, check for degenerate behavior
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/autoresearch/SKILL.md
Popularity
- Repository stars
- 6
- Repository forks
- 1
- 7-day trend score
- 10
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/kmshihab7878/claude-code-setup/autoresearch)