
Researcher Skill
One file. Your AI coding agent becomes a scientist.
Researcher turns your coding agent into an experiment loop: you agree on a metric, and the agent tries one change at a time on its own branch, keeps what moves the number and reverts what does not.
Ask an agent to make something faster and it changes things and tells you it is better. You have no baseline and no record of what it tried, so you can't check that.

What you install
In Claude Code:
/plugin marketplace add krzysztofdudek/ResearcherSkill
/plugin install researcher@researcher-marketplace
Then run /reload-plugins or restart Claude Code. No config, no API key.
| Piece | Where it lands | What it does | When it acts |
|---|
The Researcher skill, one Markdown file (skills/researcher/SKILL.md) | your Claude Code plugins | Runs the interview, sets up the lab and drives the loop. | On /researcher, or when you ask to make something measurable better. |
A branch research/<slug>, and more research/... branches when it forks | your local git | One commit per experiment; a discarded experiment is removed with git reset --hard HEAD~1, its commit id kept in the log. | During a run. |
.lab/ | repository root, untracked | The config, results.tsv, the log, the branch registry, the parking lot of ideas, a scratch workspace and, at the end, a summary. | From setup; it survives every git operation and lets the next session resume. |
Two lines in .gitignore | your .gitignore | Ignore .lab/ and run.log. | At setup. |
.lab/bin/ helpers and your tool's ignore file (for example .claudeignore) | .lab/bin/ and the repository root | Keep each run's output short, to save tokens. | Only if you say yes to this in the interview. |
- Never touches: files outside the scope you agree on in the interview; it asks you when an experiment would need to. The skill has no step that pushes.
- Needs: git, and a way to measure: a command that prints a number, or a rubric you define together.
- Costs: the loop runs until you stop it or it reaches your target, unless you set a number of experiments. Each experiment runs your command, killed after the time budget you set (five minutes by default). With a rubric instead of a number, three evaluator subagents score each experiment.
- In the agent's context: the skill's description always; the body (about 3,300 words) when it runs; the lab files it re-reads before each experiment.
Other agents: GitHub Copilot CLI, Cursor, a plain skill folder
GitHub Copilot CLI:
copilot plugin marketplace add krzysztofdudek/ResearcherSkill
copilot plugin install researcher@researcher-marketplace
Cursor:
git clone https://github.com/krzysztofdudek/ResearcherSkill.git
ln -s "$(pwd)/ResearcherSkill" ~/.cursor/plugins/local/researcher
Then Developer: Reload Window.
A plain skill folder: copy skills/researcher/SKILL.md to ~/.claude/skills/researcher/SKILL.md (user level) or .claude/skills/researcher/SKILL.md (project level), ~/.cursor/skills/researcher/SKILL.md for Cursor, or wherever your agent reads skills. Trigger it by asking for "researcher mode".
What changes on the first day
- Before any experiment, the agent asks what to optimise, how to measure it, what it may change and what is off limits, and reads the setup back for your yes.
- It records a baseline with no changes first.
- It commits before every experiment, logs the result, and keeps or resets the commit by the number.
- After three discards in a row it must write down why it continues; after five it forks to a different approach.
- When the session ends, the next one finds
.lab/ and asks whether to resume or start fresh.
Start
- Install with the two commands above, then run
/researcher and say what you want better, for example "make npm run build faster".