research-loop
Skill4 starsChanged 20 days agoMITView on GitHub
Run a self-expanding research loop. Each cycle sends parallel researcher agents after open questions, each writes one linked Markdown note, and their follow-up questions refill the queue. Use to start a loop on a seed question, run a cycle, run a tool-assisted monitor cycle, or report loop status. Adapted from BitWonka's loop-engine (MIT).
- Reads credentials
5 other projects use a version of this.
Adopted by
Most recently taken up by
- Alex5350/arsenaltheir own version, first seen Nov 1, 2026
- Emlembow/skillstheir own version, first seen Oct 13, 2026
- junjunjunbong/research-looptheir own version, first seen Oct 11, 2026
- CrossStar/research-looptheir own version, first seen Aug 28, 2026
- sabrinaxfeng/marionettetheir own version, first seen Apr 20, 2026
Other versions5 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 5
- sabrinaxfeng/marionette★ 4same name
- Emlembow/skills★ 2same name
- junjunjunbong/research-loop★ 1same name
- Alex5350/arsenal★ 0same name
- CrossStar/research-loop★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository34 other files it gives its agents.
- AGENTS.mdAGENTS.md
- accepted-proof-exact-retuneSkill
- beachhead-ratchetSkill
- circuit-edit-integration-safetySkill
- computer-algebra-oraclesSkill
- constraint-construction-searchSkill
- cross-model-review-gateSkill
- deepseek-pressure-testSkill
- ecdsafail-fastevalSkill
- ecdsafail-lowq-playbookSkill
- ecdsafail-oracle-loopSkill
- ecdsafail-pareto-ratchetSkill
- ecdsafail-scratch-dietSkill
- elicit-researchSkill
- exact-search-engineeringSkill
- fast-lean-proof-loopSkill
- hard-problem-contractSkill
- invariant-chartSkill
- jev-second-perspectiveSkill
- lean-arklib-proofsSkill
- lean-finite-certificate-splittingSkill
- mission-commandSkill
- nasqret-playbookSkill
- pip-disciplineSkill
- portable-source-assertionsSkill
- proximity-prize-campaignSkill
- proximity-prize-frontier-archaeologySkill
- route-compare-probe-disciplineSkill
- rust-archive-build-bindingSkill
- send-to-claude-fableSkill
- shot-autopsySkill
- squares-in-squares-campaignSkill
- verify-paired-native-measurementsSkill
- verify-research-transferSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
15 rules. 0 are common, 2 are distinctive, and 13 are very specific to this project.
0
Common
Most of the 5 edited versions we read keep these.
2
Distinctive
This author's own choices. Worth a look.
13
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 66
When a seed was given, set it in Engine/Config.md frontmatter as a double-quoted string (escape " and \) and add it to Engine/Queue.md …
- Distinctive: line 69
When the user described how to research, replace the body of the Research method section with their description.
- Very specific: line 71
Only when the user wants Obsidian: open -a Obsidian "<loop>".
- Very specific: line 78
Do exactly one cycle, then stop.
- Very specific: line 80
Load config: Read Engine/Config.md: seed, notes_per_run (default 1), max_depth (default 3), max_breadth (default 3), continuous (default …
- Very specific: line 89
When the queue holds no items at all, add the seed as - [ ] [d=0] <seed> (parent:: seed).
- Very specific: line 102
When a note in Research/ already covers the question well, write nothing and return skipped: [[<that note>]].
- Very specific: line 107
Write exactly one note, <loop>/Research/<title>.md, in the shape below.
- Distinctive: line 157
When a cycle runs inside a subagent, Claude Code's Write tool can refuse loop files as "report files".
- Very specific: line 167
Read Engine/Config.md; status: paused → print ⏸ paused and stop.
- Very specific: line 168
Follow the Research method literally.
- Very specific: line 177
Keep it running with /loop 15m /research-loop run <loop-name> in Claude Code.
- Very specific: line 181
Read from disk. Loops are the folders under $LOOPS plus any loops/* folder in the campaign repo you are working in.
- Very specific: line 187
No loop name: one table | Loop | Status | Notes | Pending | Done | Skipped | Deepest/max | Last activity | Seed |, with Deepest - when …
- Very specific: line 192
No loops: say so and suggest research-loop new <name> <seed>.
“Common” is measured: kept by at least 6 in 10 of the 5 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Research loop
Usage: research-loop <new|cycle|run|status> [loop-name] [seed...] (Claude Code:
/research-loop ...; Codex: $research-loop ...). With no op, run status.
Converted from BitWonka's loop-engine commands
(/research-new, /research-cycle, /run-loop, /research-status, commit 8c133a7, MIT;
see LICENSE) and adapted to a local setup with Claude Code and Codex.
Where loops live
A loop is one folder, and optionally its own Obsidian vault:
- A loop that serves a campaign lives in that campaign's knowledge repo, at
<repo>/loops/<loop-name>, so its notes are committed with the lane's journal. - Any other loop lives under
LOOPS="${RESEARCH_LOOPS_ROOT:-$HOME/research-loops}".
<loop>/
├── Engine/Config.md # seed, caps, status (frontmatter); the Research method section
├── Engine/Queue.md # `- [ ] [d=N] question (parent:: [[Note]])` items
├── Engine/Log.md # one table row per researched topic
├── Engine/Map.md # `- [[Title]] · d<n> · <date>` index of notes
├── Findings.md # the digest: the one file a human reads
└── Research/ # one note per researched questionBelow, <loop> is that folder: for a loop name, <repo>/loops/<name> in the campaign repo you
are working in when it exists, else $LOOPS/<name>. <scratch> is
${TMPDIR:-/tmp}/research-loop/<loop-name> (create it with mkdir -p; it is disposable), the
only place for downloads and other working files. Take timestamps from
date "+%Y-%m-%d %H:%M" (set TZ once per machine); dates are +%Y-%m-%d. Obsidian
is optional; read and write the files directly. Each loop gets its own vault, so a personal
vault stays untouched.
Research methods available here
The Research method section of Engine/Config.md names one method; follow it, with any
instructions the user gives for this run taking precedence. These are the tools a
method can use:
| Method | Tool |
| Web pages | Find pages with web search (Claude Code: WebSearch, loaded via ToolSearch select:WebSearch when deferred; Codex: its built-in search). Read them with defuddle parse <url> --md (kepano's defuddle CLI, MIT). Use WebFetch or curl -sL for .md, raw, JSON and PDF URLs, and the built-in browser for signed-in pages |
| GitHub repos | gh api repos/<owner>/<repo>/contents/<path> or a shallow clone into <scratch>; gh is authenticated, the anonymous API is rate-limited |
| Papers | the elicit-research skill: python3 <elicit-research>/scripts/elicit.py POST /search/papers --body req.json --out resp.json. It reads ~/.config/elicit/api-key. Check GET /usage before a large job |
| Local code or a knowledge repo | read-only reads of the named folder; git log/git show for history |
| First principles | reason with no external sources, then self-question to deepen |
| Typed triage | the jev-second-perspective skill (TypeSafe Jev) to rank a long queue or citation-check the digest against the notes |
Keys stay where they already live (~/.config/<service>/, mode 600) or in the loop's own
.env inside the loop folder. Notes, logs, digests and reports carry no keys or tokens.
new: scaffold a loop
- Pick
<loop>per "Where loops live". If it exists, say so, point atcycle, and stop. With no name, ask for one (kebab-case; it is also the vault name). - Copy the template from this skill's base directory:
mkdir -p "$(dirname "<loop>")" && cp -R "<skill-dir>/assets/template" "<loop>". - When a seed was given, set it in
Engine/Config.mdfrontmatter as a double-quoted string (escape"and\) and add it toEngine/Queue.mdunder## Queueas- [ ] [d=0] <seed> (parent:: seed). - When the user described how to research, replace the body of the Research method section with their description; otherwise keep the default web method.
- Only when the user wants Obsidian:
open -a Obsidian "<loop>". - Report the path, seed and method, and how to run it: one cycle with
research-loop cycle <loop-name>; continuously with/loop /research-loop cycle <loop-name>in Claude Code. Codex has no/loop: each invocation runs one cycle.
cycle: one queue-expanding cycle
Do exactly one cycle, then stop; under /loop it is re-invoked.
- Load config. Read
Engine/Config.md:seed,notes_per_run(default 1),max_depth(default 3),max_breadth(default 3),continuous(default false),digest(defaultFindings.md),status, and the Research method section (the section only; the "Method examples" section after it is editing help).status: paused→ print⏸ pausedand stop. A seed passed in the arguments replaces the configured one: write it to the frontmatter and queue it as innewstep 3. - Build the worklist of up to
notes_per_runitems, taken top-down from the lines under## QueueinEngine/Queue.mdthat start with- [ ]:- Mark pending items deeper than
max_depthas skipped:- [-]. - When the queue holds no items at all, add the seed as
- [ ] [d=0] <seed> (parent:: seed). The first cycle therefore researches the seed alone; later cycles fill up from its follow-ups. - Still short, with
continuous: true: skimMap.mdand the notes, then add fresh[d=0]directions toward the seed that existing notes do not cover. - Still empty, with
continuous: false: print✅ research complete: queue drained; stop the /loopand stop. Done when the worklist holds the items this cycle will research.
- Mark pending items deeper than
Fan out, one researcher per worklist item. In Claude Code, launch them in a single message as
general-purposeAgent subagents (so they can Write). In Codex, or anywhere without a subagent tool, research the items yourself one after another. Each researcher gets the loop path, the Research method, its one question with its depth, the other worklist questions of this cycle (to avoid overlapping them), and these instructions:- When a note in
Research/already covers the question well, write nothing and returnskipped: [[<that note>]]. - Research it per the method and cite every source. A method with no external sources
writes
1. none (first principles)under Sources. Downloads and working files go to<scratch>only, and notes never link into it. - Write exactly one note,
<loop>/Research/<title>.md, in the shape below. Choose a title without? : / \ # | [ ] ^, so the file name, thetitle:line and every[[link]]are identical. If the Write tool refuses the file, write it with a shell heredoc. Touch no other file in the loop and no external repository. - Return the note title and at most
max_breadthfollow-up questions.
--- title: "<clear, specific title; equals the file name>" created: <TZ=Europe/Zurich date "+%Y-%m-%d %H:%M"> tags: [research, depth/<n>] depth: <n> parent: "<[[Parent Note]], or seed for a d=0 question>" status: complete --- # <title> > [!summary] TL;DR > 2-4 sentences. ## Key findings - ...with inline source refs; mark each as measured, cited or inferred ## Details ## Open questions - <the follow-ups it raises> ## Sources 1. [title](url or DOI): note (abstract-only or full text) ## Related - [[Parent Note]] / siblings- When a note in
- Collect and refill, as the orchestrator, serially (you alone write the Engine files
and the digest, so researchers never race on them). For every returned result:
- a skip: mark its item
- [-]and move on; - mark its item
[x]inQueue.md; - append its follow-ups as
- [ ] [d=<depth+1>] <question> (parent:: [[<title>]])whendepth+1≤max_depth, deduplicated against existing notes and queue items; deeper follow-ups go to the digest's Open questions instead; - append
- [[<title>]] · d<depth> · <date>toMap.md; - append
| <n> | <timestamp now> | <depth> | <question, with | replaced by /> | [[<title>]] | <k> queued |toLog.md, numbering rows from 1. Done when every written note appears inMap.mdandLog.md.
- a skip: mark its item
- Rewrite the digest (
digest, defaultFindings.md, shipped in the template): a ranked, deduplicated living summary that folds in this cycle's notes, drops stale items and links the[[notes]]. Follow the digest structure the Research method names; otherwise a ranked "Key findings" list plus "Open questions". Skimmable in about 30 seconds. When the top finding is about to drive a decision (kill a route, spend money, submit), have Claude Fable try to refute it first (Claude Code: an Agent call withmodel: fable; Codex: the send-to-claude-fable skill) and record the verdict in the digest. - Report in 3-5 lines: the loop, notes written this cycle, follow-ups queued, total notes, and whether it continues on the next tick or is complete.
When a cycle runs inside a subagent, Claude Code's Write tool can refuse loop files as "report files"; update them with Edit, or write them with a shell heredoc. They are loop state, not reports.
run: one tool-assisted cycle
For loops whose Research method names a private data tool kept in the loop folder (for
example <loop>/scan.py: a leaderboard fetch and diff, an API poll). The tool supplies cheap
raw data; the analysis is yours.
- Read
Engine/Config.md;status: paused→ print⏸ pausedand stop. - Follow the Research method literally. Typically run the helper from the loop folder with
its own env, so only its compact digest enters your context:
(cd "<loop>" || exit 1; set -a; if [ -f .env ]; then . ./.env; fi; set +a; python3 scan.py). - Find the signal (the largest changes, anything new; ignore noise), research the items no
note in
Research/covers yet, and write analytical notes with[[wikilinks]]plus any thesis or index file the method names. Interpret the data; a pasted digest is not a note. - Append a heartbeat row to
Engine/Log.md. - Report in 3-5 lines: the key moves, what you researched and concluded, the notes written.
Keep it running with /loop 15m /research-loop run <loop-name> in Claude Code.
status: overview of all loops
Read from disk. Loops are the folders under $LOOPS plus any loops/* folder in the
campaign repo you are working in. For each loop read Config.md frontmatter; count the lines
under ## Queue in Queue.md that start with - [ ] (pending), - [x] (done) and - [-]
(skipped); count the .md notes in Research/; take the deepest depth: among them; and
take the When of the last Log.md row.
- No loop name: one table
| Loop | Status | Notes | Pending | Done | Skipped | Deepest/max | Last activity | Seed |, with Deepest-when there are no notes and the seed without its quotes. - With a loop name: its seed, the caps (
max_depth,max_breadth,notes_per_run,continuous), a method summary, the pending items with depths, and the last few log rows. - No loops: say so and suggest
research-loop new <name> <seed>.
Running loops
A loop occupies the session it runs in. Run each one in a background agent or its own
session so the main session stays responsive; loops are independent, so several can run at
once. Pause one with status: paused in its Config.md, or by stopping its /loop.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

