dabiggm0e/autoresearch-opencode/autoresearch
Claude Code and agent skill by dabiggm0e/autoresearch-opencode
- community
Checking that the SKILL.md file is still in the repository.
Set up and run an autonomous experiment loop for any optimization target. Use when asked to start autoresearch or run experiments.
Install
npx vskill@latest install dabiggm0e/autoresearch-opencode/autoresearchSKILL.md
Autoresearch
Autonomous experiment loop: try ideas, keep what works, discard what doesn't, never stop.
Setup
- Ask (or infer): Goal, Command, Metric (+ direction), Files in scope, Constraints.
git checkout -b autoresearch/<goal>-<date>- Read the source files. Understand the workload deeply before writing anything.
mkdir -p experimentsthen writeautoresearch.md,autoresearch.sh, andexperiments/worklog.md(see below). Commit all three.- Initialize experiment (write config header to
autoresearch.jsonl) → run baseline → log result → start looping immediately.
autoresearch.md
This is the heart of the session. A fresh agent with no context should be able to read this file and run the loop effectively. Invest time making it excellent.
Update autoresearch.md periodically — especially the "What's Been Tried" section — so resuming agents have full context.
autoresearch.sh
Bash script (set -euo pipefail) that: pre-checks fast (syntax errors in <1s), runs the benchmark, outputs METRIC name=number lines. Keep it fast — every second is multiplied by hundreds of runs. Update it during the loop as needed.
JSONL State Protocol
All experiment state lives in autoresearch.jsonl. This is the source of truth for resuming across sessions.
Config Header
The first line (and any re-initialization line) is a config header:
Rules:
- First line of the file is always a config header.
- Each subsequent config header (re-init) starts a new segment. Segment index increments with each config header.
- The baseline for a segment is the first result line after the config header.
Result Lines
Each experiment result is appended as a JSON line:
Fields:
run: sequential run number (1-indexed, across all segments)commit: 7-char git short hash (the commit hash AFTER the auto-commit for keeps, or current HEAD for discard/crash)metric: primary metric value (0 for crashes)metrics: object of secondary metric values — once you start tracking a secondary metric, include it in every subsequent resultstatus:keep|discard|crashdescription: short description of what this experiment triedtimestamp: Unix epoch secondssegment: current segment index
Initialization (equivalent of init_experiment)
To initialize, write the config header to autoresearch.jsonl:
To re-initialize (change optimization target), append a new config header:
Data Integrity Protocol
CRITICAL: JSONL data must never be corrupted or lost.
Pre-Write Validation (before appending to JSONL)
Before writing any new experiment result, validate the JSONL file:
Atomic Write Pattern
Never append directly to JSONL. Use atomic write pattern:
Post-Write Verification
After every write operation, verify the data was written correctly:
User-Confirmable Actions
Before any user-confirmable action (e.g., manual intervention, major changes, discarding multiple experiments), create a backup:
Always call `backup_before_confirm` before any operation that requires user approval.
Dashboard Data Consistency Check
When generating the dashboard, check for data consistency:
Data Consistency Check
If the number of runs in autoresearch.jsonl doesn't match the number of entries in experiments/worklog.md:
- Check for backups:
scripts/backup-state.sh list autoresearch.jsonl - If backups exist: Restore with
scripts/backup-state.sh restore-auto - If no backups: Manually recreate missing runs from worklog notes
- Note the discrepancy in the dashboard header
Add this warning banner to the dashboard when inconsistency is detected:
Running Experiments (equivalent of run_experiment)
Run the benchmark command, capturing timing and output:
After running:
- Parse
METRIC name=numberlines from the output to extract metric values - If exit code != 0 → this is a crash
- Read the output to understand what happened
Logging Results (equivalent of log_experiment)
After each experiment run, follow this exact protocol:
1. Determine status
- keep: primary metric improved (lower if
bestDirection=lower, higher ifbestDirection=higher) - discard: primary metric worse or equal to best kept result
- crash: command failed (non-zero exit code)
Secondary metrics are for monitoring only — they almost never affect keep/discard decisions. Only discard a primary improvement if a secondary metric degraded catastrophically, and explain why in the description.
2. Git operations
If keep:
Then get the new commit hash:
If discard or crash:
Use the current HEAD hash (before revert) as the commit field.
3. Append result to JSONL
4. Update dashboard
After every log, regenerate autoresearch-dashboard.md (see Dashboard section below).
5. Append to worklog
After every experiment, append a concise entry to experiments/worklog.md. This file survives context compactions and crashes, giving any resuming agent (or the user) a complete narrative of the session. Format:
Also update the "Key Insights" and "Next Ideas" sections at the bottom of the worklog when you learn something new.
On setup, create experiments/worklog.md with the session header, data summary, and baseline result. On resume, read experiments/worklog.md to recover context.
6. Secondary metric consistency
Once you start tracking a secondary metric, you MUST include it in every subsequent result. Parse the JSONL to discover which secondary metrics have been tracked and ensure all are present.
If you want to add a new secondary metric mid-session, that's fine — but from that point forward, always include it.
Dashboard
After each experiment, regenerate autoresearch-dashboard.md:
This is the start of the file. Read the full SKILL.md on GitHub.
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
- 127
- Repository forks
- 12
- 7-day trend score
- 24
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 16 Mar 2026, 7 months ago.
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/dabiggm0e/autoresearch-opencode/autoresearch)