research-mode
Skill2 starsChanged 7 months agoMITView on GitHub
Toggle persistent research mode on/off. When on, hook support can remind the agent to keep the research document updated throughout the conversation, with manual fallback if unavailable. Use with a research topic to start, with "continue" to resume an existing research doc, or with "off" to stop.
5 other projects use a version of this.
Adopted by
Most recently taken up by
- zi-yue-1129/research-lab-skillstheir own version, first seen Oct 27, 2026
- VKambulov/research-modetheir own version, first seen Jun 17, 2026
- nelebertling/claude-skillstheir own version, first seen May 26, 2026
- Naoray/skillstheir own version, first seen May 22, 2026
- assafkip/research-modetheir own version, first seen Apr 3, 2026
Other versions5 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 5
- assafkip/research-mode★ 150same name
- zi-yue-1129/research-lab-skills★ 9same name
- VKambulov/research-mode★ 4same name
- Naoray/skills★ 2same name
- nelebertling/claude-skills★ 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 repository23 other files it gives its agents.
- .claude/CLAUDE.mdCLAUDE.md
- .copilot/copilot-instructions.mdCopilot instructions
- ahaSkill
- explain-prSkill
- fetch-planSkill
- generate-pr-descriptionSkill
- grill-meSkill
- improve-a-planSkill
- improve-codebaseSkill
- persistSkill
- planning-modeSkill
- planningSkill
- review-prSkill
- rust-bevy-standardsSkill
- rust-bevy-test-conventionsSkill
- rust-standardsSkill
- tddSkill
- unslopSkill
- update-agentsSkill
- update-planSkill
- update-skillsSkill
- write-a-skillSkill
- wtfSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
24 rules. 0 are common, 10 are distinctive, and 14 are very specific to this project.
0
Common
Most of the 5 edited versions we read keep these.
10
Distinctive
This author's own choices. Worth a look.
14
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 26
If you cannot determine which tool you are, ask the user.
- Very specific: line 36
No output: use local-ai-folder-markdown, the default for this skill group
- Very specific: line 39
Read ../persist/persistence/{implementation}.md and follow it whenever this skill lists, opens or updates a research document.
- Distinctive: line 45
If the argument is "off", skip this step and go directly to Step 2.
- Very specific: line 49
If running in Claude Code, run bash {skill-dir}/scripts/check-hooks.sh and parse the structured output.
- Very specific: line 50
If running in Copilot, run bash {skill-dir}/scripts/check-hooks.sh copilot and parse the structured output.
- Very specific: line 77
When the user provides a topic, update the flag file's topic: line, then continue to Step 3b.
- Very specific: line 81
If the flag file doesn't exist yet, create {repo root}/.ai/.active-mode with:
- Very specific: line 88
If it already exists (from Step 3a), update the topic: line.
- Very specific: line 90
After the persist skill creates the research document, update the flag file's document: line with the document's location.
- Very specific: line 92
If running in Copilot, also include in the confirmation: "You can run /rename {task-name} to rename this conversation." where {task-name} …
- Very specific: line 93
If running in Claude Code or Pi, instead include: "You can run /name {task-name} to name this conversation." where {task-name} is the …
- Very specific: line 98
If there are none, stop and tell the user: "No existing research docs found.
- Distinctive: line 107
If the input is a number, resolve it against the numbered list.
- Distinctive: line 108
If the input is text, try exact document-name match first.
- Distinctive: line 109
If no exact match, allow a single unambiguous case-insensitive partial match.
- Distinctive: line 110
If the input is invalid, ambiguous, or out of range, stop and tell the user the selection was invalid.
- Very specific: line 121
If running in Copilot, also include in the confirmation: "You can run /rename {task-name} to rename this conversation." where {task-name} …
- Very specific: line 122
If running in Claude Code or Pi, instead include: "You can run /name {task-name} to name this conversation." where {task-name} is {topic}.
- Distinctive: line 128
If you've learned something new since the last update, update the research document
- Distinctive: line 129
If you haven't learned anything new, carry on — don't update for the sake of it
- Distinctive: line 130
Keep the document well-structured: add new sections, refine conclusions, note contradictions
- Distinctive: line 213
If that extension is installed, planning mode gets equivalent reminder and stale-flag cleanup behaviour automatically.
- Very specific: line 225
If you need to persist research mode across sessions, re-enable it with /research-mode at the start of the new session.
“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
Usage
/research-mode— Enable research mode, then prompt for a topic/research-mode <topic>— Enable research mode and start researching the topic/research-mode continue— List existing research docs and resume one/research-mode off— Disable research mode
Configuration
Hook configuration by tool
| Tool | Hook config location / equivalent | Script format argument |
| Claude Code | ~/.claude/settings.json | (none — default) |
| Copilot | ~/.copilot/hooks.json | copilot |
| Pi | Bundled active-mode extension in .pi/agent/extensions/active-mode/ | (extension-driven) |
Claude Code and Copilot support the bundled PostToolUse and SessionStart hook scripts directly. Pi does not use the same standalone hook configuration files in this repository's starter config. Instead, this starter config now ships a Pi-native active-mode extension that reads .ai/.active-mode, clears stale flags on fresh session start, injects reminder context before LLM calls, and shows mode status in the UI. If that extension is not installed, fall back to manual document updates.
If you cannot determine which tool you are, ask the user.
Persistence
This skill belongs to the research skill group. A persistence implementation decides where and how research documents are stored. The persist skill creates them; this skill lists, opens and updates them. Before Step 3c or Step 4, find the setting:
R="$(git rev-parse --show-toplevel 2>/dev/null)/.ai/config.properties"; { cat "$R" ~/.ai/config.properties | grep '^persistence\.research[[:space:]]*=[[:space:]]*[^[:space:]]'; cat "$R" ~/.ai/config.properties | grep '^persistence[[:space:]]*=[[:space:]]*[^[:space:]]'; } 2>/dev/null | head -1 | tr -d ' \t\r'- No output: use
local-ai-folder-markdown, the default for this skill group persistence.research={value}orpersistence={value}: use{value}. If../persist/persistence/{value}.mddoes not exist, tell the user theresearchskill group has no{value}implementation and uselocal-ai-folder-markdown
Read ../persist/persistence/{implementation}.md and follow it whenever this skill lists, opens or updates a research document. The .ai/.active-mode flag file is not part of this and always stays in the repository.
Workflow
Step 1: Check hook configuration
If the argument is "off", skip this step and go directly to Step 2.
Otherwise:
- If running in Claude Code, run
bash {skill-dir}/scripts/check-hooks.shand parse the structured output. - If running in Copilot, run
bash {skill-dir}/scripts/check-hooks.sh copilotand parse the structured output. - If running in Pi, skip the standalone hook check. Explain that this repository's Pi starter config uses the bundled
active-modeextension instead of standalone hook files. If that extension is installed, research mode gets equivalent reminder/cleanup behaviour automatically. Otherwise research mode will rely on manual update discipline only. Then continue to Step 2.
For Claude Code and Copilot:
- If
STATUS: YES: continue to Step 2. - If
STATUS: NOorSTATUS: PARTIAL: offer to install the missing hooks now (see Hook Setup below) before proceeding. If the user declines, note that research mode will rely on manual update discipline only — no PostToolUse reminders and no SessionStart cleanup — then continue.
Step 2: Determine action
Parse the arguments:
- No arguments → go to Step 3a
- "off" → go to Step 5
- "continue" → go to Step 3c
- Any other text → treat as the research topic, go to Step 3b
Step 3a: Enable without topic
- Create
{repo root}/.ai/.active-modewith:mode: research topic: (awaiting input) document: (pending) started: {yyyy-mm-dd HH:mm} - Tell the user: "Research mode is on. What would you like to research?"
- When the user provides a topic, update the flag file's
topic:line, then continue to Step 3b.
Step 3b: Enable with topic
- If the flag file doesn't exist yet, create
{repo root}/.ai/.active-modewith:
If it already exists (from Step 3a), update themode: research topic: {the research topic} document: (pending) started: {yyyy-mm-dd HH:mm}topic:line. - Invoke the
persistskill to begin researching the topic. - After the
persistskill creates the research document, update the flag file'sdocument:line with the document's location. - Confirm to the user: "Research mode is on. I'll keep updating {document location} as we go. Use
/research-mode offwhen done. Research mode will be auto-disabled by starting a new session when supported by your harness configuration." - If running in Copilot, also include in the confirmation: "You can run
/rename {task-name}to rename this conversation." where{task-name}is the document's{topic}. - If running in Claude Code or Pi, instead include: "You can run
/name {task-name}to name this conversation." where{task-name}is the document's{topic}.
Step 3c: Continue an existing research doc
- List research documents.
- If there are none, stop and tell the user: "No existing research docs found. Use
/research-mode <topic>to start a new one."
- If there are none, stop and tell the user: "No existing research docs found. Use
- Sort newest first.
- Show the document names exactly as stored in a numbered list. Example:
1. 2026-04-10 auth-middleware-analysis 2. 2026-04-08 retry-strategies - Prompt the user to reply with either the list number or the document name.
- Resolve the selection:
- If the input is a number, resolve it against the numbered list.
- If the input is text, try exact document-name match first.
- If no exact match, allow a single unambiguous case-insensitive partial match.
- If the input is invalid, ambiguous, or out of range, stop and tell the user the selection was invalid. Do not re-prompt.
- Open the selected document so its contents are in context.
- Derive
{topic}from the document name by removing the{yyyy-mm-dd}prefix. - Create
{repo root}/.ai/.active-modewith:mode: research topic: {topic} document: {location of the selected doc} started: {yyyy-mm-dd HH:mm} - Confirm to the user: "Research mode is on. Continuing
{document location}. Use/research-mode offwhen done. Research mode will be auto-disabled by starting a new session when supported by your harness configuration." - If running in Copilot, also include in the confirmation: "You can run
/rename {task-name}to rename this conversation." where{task-name}is{topic}. - If running in Claude Code or Pi, instead include: "You can run
/name {task-name}to name this conversation." where{task-name}is{topic}.
Step 4: Keep the research document updated
While research mode is active, if your harness has PostToolUse hook support configured, the hook outputs reminders after each tool use. When you see these reminders:
- If you've learned something new since the last update, update the research document
- If you haven't learned anything new, carry on — don't update for the sake of it
- Keep the document well-structured: add new sections, refine conclusions, note contradictions
Step 5: Disable
- Delete
{repo root}/.ai/.active-mode - Confirm: "Research mode is off."
Step 6: Session startup cleanup
For harnesses with SessionStart hook support configured, stale flag files from previous sessions are cleared automatically. In Pi, the bundled active-mode extension clears stale flags on fresh session start when installed. Without that extension, delete a stale .ai/.active-mode file before re-enabling research mode if one is left behind.
Hook Setup
Research mode relies on two hooks to function fully. Without the PostToolUse hook, only the persist skill's built-in continuous update behaviour and Step 4 above apply.
Step 1 runs scripts/check-hooks.sh to verify configuration automatically for Claude Code and Copilot. If that reports STATUS: NO or STATUS: PARTIAL, offer to add the missing hooks using the appropriate format below.
Claude Code
Merge into ~/.claude/settings.json:
{
"hooks": {
"PostToolUse": [
{
"matcher": "",
"hooks": [
{
"type": "command",
"command": "bash ~/.claude/skills/research-mode/scripts/research-mode-hook.sh"
}
]
}
],
"SessionStart": [
{
"matcher": "",
"hooks": [
{
"type": "command",
"command": "bash ~/.claude/skills/research-mode/scripts/clear-mode.sh"
}
]
}
]
}
}Copilot
Merge into ~/.copilot/hooks.json:
{
"hooks": {
"postToolUse": [
{
"type": "command",
"bash": "~/.copilot/skills/research-mode/scripts/research-mode-hook.sh copilot"
}
],
"sessionStart": [
{
"type": "command",
"bash": "~/.copilot/skills/research-mode/scripts/clear-mode.sh copilot"
}
]
}
}Note: The
copilotargument tells the scripts to output JSON withadditionalContextfor Copilot's context injection format.
Pi
This repository's Pi starter config includes the active-mode extension under .pi/agent/extensions/active-mode/. That extension uses Pi lifecycle events:
- fresh-session cleanup via
session_start - per-turn / post-tool-style reminders via
before_agent_startandcontext - visible mode state via
ctx.ui.setStatus()
If that extension is installed, planning mode gets equivalent reminder and stale-flag cleanup behaviour automatically. If it is not installed, use manual document updates.
Bundled scripts
- scripts/research-mode-hook.sh — PostToolUse reminder
- scripts/clear-mode.sh — SessionStart cleanup
- scripts/check-hooks.sh — verifies the two hooks above are configured in the relevant settings file
Notes
- For harnesses with SessionStart hook support configured, the flag file is automatically cleared at session startup.
- In Pi, the bundled
active-modeextension provides the equivalent behaviour without standalone hook files. - If you need to persist research mode across sessions, re-enable it with
/research-modeat the start of the new session. - Both hook scripts are silent when the flag file doesn't exist — no impact on normal conversations.
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.

