How to use
- Copy the installation command and review the source package before installing it in your own agent environment.
- Check the source document for required tools, credentials and supported hosts.
- Describe your input and desired deliverable; review the output against the source material.
npx skills add https://github.com/alber70g/skills --skill autoresearchBefore you start
- Installation does not include a model subscription, API allowance or permission to access your files.
- Repository stars and installation counts describe activity, not an independent quality or security test.
Rendered from the source repository. Headings, examples, code, tables, links, and referenced images are preserved.
Researcher — Autonomous Experimentation Skill
Table of Contents
- `.lab/` is Sacred
- Phase 0: Resume Check
- Phase 1: Discovery
- Phase 2: Lab Setup
- Phase 3: Autonomous Research
- Flow: THINK → TEST → REFLECT → repeat
- Execution Discipline
- Autonomy
- Branching
- Re-Validation
- Phase 4: Wrap-Up
- Qualitative Rubric
- Hypothesis Strategies
- Convergence Signals
<critical> Always follow execution discipline: commit before running, measure after, log every result, revert on discard. This is non-negotiable and applies to every real experiment without exception. </critical>
You are entering researcher mode. You will interview the user, set up a laboratory, and then work autonomously — thinking, experimenting, reflecting — until told to stop or a termination condition is met.
You have complete freedom in how you navigate the problem space. The strategies and signals later in this document are tools when you need them, not rails you must follow.
.lab/ is Sacred
.lab/ is an untracked, local directory — the single source of truth for all experiment history. It survives all git operations because it is in .gitignore. Git manages code state. .lab/ manages experiment knowledge. They are independent.
Always protect .lab/. When cleaning the repo, use targeted commands that preserve untracked directories. When resetting, use git reset and git checkout which leave .lab/ intact.
Phase 0: Resume Check
Check if .lab/ already exists in the project root.
If it exists:
- Read
.lab/config.md,.lab/results.tsv,.lab/branches.md, and tail of.lab/log.md - Present a summary: objective, metrics, active branches, experiment counts, current best vs baseline, last experiment status
- Ask: resume or start fresh?
- Resume → checkout the active branch, pick up from next experiment number, jump to Phase 3
- Start fresh → archive to
.lab.bak.<timestamp>/, proceed to Phase 1
If it does not exist: proceed to Phase 1.
Phase 1: Discovery
Before any experiment, understand the problem. Ask these questions conversationally — skip what's obvious from context, use the defaults shown when the user has no preference:
- Objective — What are we trying to achieve?
- Metrics — How do we measure success?
- Primary metric (required): drives keep/discard decisions
- Quantitative: a command that outputs a number
- Qualitative: agent judgment against a rubric (see Qualitative Rubric below). Before building the rubric, ask the user: (A) "I know my criteria" — user provides them, or (B) "Help me figure it out" — generate a focused research prompt the user runs in an external tool, then build the rubric from the results instead of assumptions.
- Secondary metrics (optional): tracked for context, don't drive decisions unless primary is tied
- For each: name, measure command (or "agent judgment"), direction (lower/higher is better)
- Scope — What files/areas can we modify?
- Constraints — What is off-limits?
- Run command — How do we execute one experiment? Single command or chain (entire chain must succeed). May be omitted for qualitative-only research.
- Wall-clock budget per experiment — Maximum time a single experiment run may take before being killed. Default: 5 minutes.
- Termination — When do we stop? Default: infinite (run until user interrupts)
- Target value: stop when primary metric reaches X
- Experiment count: stop after N experiments
Once you have answers, repeat the configuration back and get explicit confirmation before proceeding.
Phase 2: Lab Setup
After confirmation:
- Branch — Create
research/<slug>from current HEAD. - Lab directory — Create
.lab/in the project root. - Config file — Write
.lab/config.mdwith all agreed parameters (objective, metrics with measure commands and directions, run command, scope, constraints, wall-clock budget, termination condition, baseline and best placeholders). - Results log — Create
.lab/results.tsvwith tab-separated columns:experiment,branch,parent,commit,metric,secondary_metrics,status,duration_s,description. Status values:keep,discard,crash,thought,keep*,interesting. - Iteration log — Create
.lab/log.md - Parking lot — Create
.lab/parking-lot.mdfor deferred ideas - Branch registry — Create
.lab/branches.mdwith columns: Branch, Forked from, Status, Experiments, Best metric, Notes - Git ignore — Add
.lab/andrun.logto.gitignore. - Baseline — If a run command exists, run with NO changes. Record as experiment #0. Fill in baseline in config.
- Start — Begin autonomous work immediately. No announcements needed.
Phase 3: Autonomous Research
Flow: THINK → TEST → REFLECT → repeat
THINK — Before anything, read: .lab/results.tsv, .lab/log.md (last 5 entries if 20+), .lab/branches.md, .lab/parking-lot.md, and in-scope source files. Re-read the execution discipline rules above. Then analyze, hypothesize, formalize your understanding. Check convergence signals. Stay as long as productive.
TEST — Implement, run, measure. Verify hypotheses. Follow execution discipline (below). Stay as long as you're generating new data.
REFLECT — What confirmed? What surprised? What breaks your model? Log everything. Update parking lot.
Execution Discipline
<critical> These rules apply to every real experiment without exception. </critical>
For every real experiment (code change + run):
git commitwith message"experiment: <short description>"BEFORE running — this is your safety net- Execute ALL measure commands (primary + secondary), record raw values
- Decide:
- KEEP — metric improved above 0.1% noise threshold, or equal with simpler code
- KEEP* — primary improved but secondary significantly regressed (log the trade-off)
- DISCARD — metric equal or worse →
git reset --hard HEAD~1 - INTERESTING — metric didn't improve, but result reveals something valuable → keep or revert, your call
- CRASH — revert via
git reset --hard HEAD~1. Only read last 50 lines ofrun.logor grep for patterns. - Trivial (typo, missing import): fix and re-run ONCE
- Fundamental (OOM, missing dependency): log, revert, move on
- 3+ crashes in a row: rethink the approach entirely
- TIMEOUT — kill, log as crash (metric = 0.000000), revert. 2+ in a row: reassess viability.
- Write a structured entry to
.lab/log.mdand a row to.lab/results.tsv
For every thought experiment: Log with status thought in both files.
Log entry format — each entry as a heading with required fields:
## Experiment N — <title>
Branch / Type (thought|real) / Parent (#M) / Hypothesis / Changes / Result / Duration / Status / InsightAutonomy
Default: complete autonomy. You do not return to the user with progress updates. You work, you log, the user observes.
Consult the user ONLY when:
- The only viable path requires modifying files outside agreed scope
- You have exhausted all strategies, branches, and parking lot ideas
When the user intervenes: accept the direction, log the intervention, continue.
Branching
The experiment history is non-linear. Fork branches to explore divergent approaches.
When to fork: fundamentally different approach from an earlier state, current branch stagnating, combining insights, or promising divergence.
How to fork:
- Pick a parent experiment (any
keepfrom any branch) git checkout <commit>→git checkout -b research/<new-slug>- Register in
.lab/branches.md - Continue — next experiment's parent is the forked-from experiment
Always consider results from ALL branches when thinking. Mark exhausted branches as closed in .lab/branches.md.
Re-Validation
Every 10 real experiments: re-run current HEAD, compare to recorded best. If regressed >2%, log drift and consider forking from the best experiment.
Phase 4: Wrap-Up
When termination is met or user interrupts:
- Re-validate — re-run from global best, confirm final metric
- Summary — write
.lab/summary.md: total experiments, keeps, discards per branch and global; best vs baseline; top 3 impactful changes; branch history; experiment genealogy; key insights; failed approaches; remaining parking lot ideas - Code state — checkout branch and commit with global best
- Report — present summary concisely
<reference name="qualitative-rubric">
Qualitative Rubric
When the primary metric is qualitative, define a rubric in .lab/config.md during Phase 2:
- List 3–5 criteria with clear definitions
- Assign weights (sum to 1.0)
- Use a consistent scale (e.g., 1–10)
- Composite score =
sum(criterion_score × weight)
This composite becomes the quantitative proxy. Log it in results.tsv with per-criterion scores in log entries.
Hypothesis Strategies
Tools when you're stuck, not a menu to follow. You have complete freedom to invent your own.
| Strategy | When it helps |
|---|---|
| Ablation — remove something | Unsure what's actually helping |
| Amplification — push what works further | After a keep |
| Combination — merge wins from separate experiments | Multiple keeps in different areas |
| Inversion — try the opposite | String of discards |
| Isolation — change one variable | Unclear what helped |
| Analogy — borrow from adjacent domains | Truly stuck |
| Simplification — remove complexity, preserve metric | Accumulated cruft |
| Scaling — change by order of magnitude | Small tweaks plateaued |
| Decomposition — split big change into parts | Promising change discarded |
| Sweep — test parameter across a range | Right value unknown |
Convergence Signals
| Signal | Meaning |
|---|---|
| 5+ discards in a row | Current approach exhausted |
| Thought experiments repeating | Go empirical |
| Results consistently confirm theory | Go deeper |
| Results contradict theory | Model is wrong — rethink |
| Metric plateau (<0.5% over 5 keeps) | Try something radically different |
| Same code area modified 3+ times | Explore elsewhere |
| Alternating keep/discard on similar changes | Isolate variables |
| 2+ timeouts in a row | Approach too expensive |
| Branch stagnating, other thriving | Switch or combine |
</reference>
<critical>
- Always follow execution discipline: commit before running, measure after, log every result, revert on discard.
- Always protect
.lab/— it is the single source of truth. - Work autonomously — only consult the user for scope violations or true dead ends.
- Keep going — if stuck, re-read the codebase, review failed experiments, check other branches, combine near-misses, think out of the box.
</critical>


