Runs deep-research CLI to investigate questions across the web, producing fact-checked reports with cited claims and verdicts. Also searches and retrieves past run results.
Ships in deep-research. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
drsh plans sub-topics, searches them in parallel, analyzes the
evidence, fact-checks every claim against the fetched page text, and writes a
report. One run takes minutes and spends model requests; run it once per
question, not as a quick lookup.
When the user asks what earlier runs found ("what sources did I have on
X?"), search the saved runs instead of starting one; for "did I research
this exact question before?", drsh kb check (section 0) answers. This needs no model, key, search engine or network, so skip the
preflight below; it needs drsh 0.44.0 or newer (an older one says unknown command "kb": offer drsh update).
drsh kb search --reports "$HOME/.deep-research/runs" --json -- "QUERY"
$HOME/.deep-research/runs is where this skill keeps each completed run
(section 3); for runs saved elsewhere, pass that folder. Its immediate
subdirectories are searched too, no deeper, and only complete runs are
ever found: a run that ended incomplete or failed is not. Check error
first: when it is not null, say what it says rather than reading
results. Each entry of results is one page; its
best capture gives the run it came from (best.run.question,
best.run.run_date), whether that run's report cited it (best.cited,
null when the run did not record it), and what text was kept
(best.text_kind: page_text, search_snippet when the page could not be
read, unknown, or null for none). Report the
title, URL and run date; say "run date", since no run records when the page
itself was fetched.
drsh kb show ID --reports DIR --json, with
ID from best.id (a source with no web address has null there and
cannot be shown), gives the saved text (capture.text) and the
fact-check's quotes from it (capture.passages[]), each with its
verdict and the run's conclusion on the claim. Pass on what was not
fact-checked (capture.run.fact_checked: false) or not located.results: []): say so, and that only runs saved under
that folder are searched; offer a new run.--revisit ID (repeatable, up to 10, each a best.id from the search)
with --kb "$HOME/.deep-research/runs" added to the run command of
section 2, and only with the user's say-so for each page. The run reads
each page now; nothing the earlier run saved of it goes in. Revisited
pages share the run's page budget, an instant run takes none, and an ID
whose run changed since the search fails the start (search again). Each
page's outcome is an info line with a revisit object whose outcome
is read, gone, refused, unreadable, out_of_scope, duplicate,
budget_skipped, … and is in the run's .json under revisits: report the ones not
read. A read one carries text: same or differs from the text the
earlier run saved, or not_comparable with text_reason. Say "the
extracted text matches" or "differs", never that the page changed: it
compares what drsh extracted.error.code stale_capture: the run's file changed since the search;
search again.If the skill was invoked without a question, run the preflight below and then ask for one, along with any constraints that change the answer (dates, region, versions, budget). Do not invent a question to test the setup; a run spends the user's model requests.
Before starting a run, look for an earlier one that covers the question, whether or not the user mentions one (offline, no model; drsh 0.44.0 or newer). Skip this when the user already asked for a fresh run, gave pages to revisit, or the call continues a run (section 6). Search the question's key words first, which can find a run worded differently:
drsh kb search --reports "$HOME/.deep-research/runs" --json -- "KEY WORDS"
Judge by each entry's best.run.question, and by the file names in
other_captures[].path, which start with the other runs' questions, cut
short (drsh kb show on that capture's id gives the whole question, in
capture.run.question). Pages
that only share words with the question do not make their run cover it. When
none covers it, check for the same question, which search can miss when no
saved page has its words:
drsh kb check --reports "$HOME/.deep-research/runs" --json -- "QUESTION"
It matches the same question only, ignoring case and spacing. When either
finds a run, tell the user its question, its date and where it is (from a
check also its state: complete; failed, its report incomplete; or
stopped, a checkpoint that section 6 resumes), and ask whether to use it
or research afresh before launching. Only runs kept in that folder are found:
one that failed or stopped was left where it ran (section 6). A fresh run takes nothing from the
earlier one. When neither finds one, go on. When error is not null or a
command fails, say you could not look and go on. Never read that as "not
researched before", nor an empty answer of either whose unread is above 0
(whose skipped is not empty, from a drsh without unread): a run may be
among those files, so say how many could not be read.
drsh --version
If it is not installed, tell the user and offer the installer:
curl -fsSL https://raw.githubusercontent.com/juanhuttemann/deep-research/main/scripts/install.sh | bashiex (irm https://raw.githubusercontent.com/juanhuttemann/deep-research/main/scripts/install.ps1)If drsh is missing but deep-research --version answers, it is an install
from before the command was renamed drsh. Its update cannot install the
renamed release; offer the installer above, which replaces it. Config, keys
and past runs are kept.
This skill needs version 0.13.0 or newer: older releases lack flags it uses
(--domains) and fail with "unknown flag". If the version is older, run
drsh update (it verifies the release checksum and replaces the
binary in place; no key or config needed), then check the version again.
update refuses a binary built from source (dev or a git describe
version); say so and leave that build alone.
Then check the model, key, search and scraper (no model tokens spent; the search check can take up to a minute):
drsh doctor
Each line starts with ✓ (fine), ! (works, at lower quality) or ✗
(broken). A → line under a ! or ✗ gives the next step: the command to
run or the setting to change.
Exit status non-zero (a ✗): show the user each ✗ line and the →
line under it, and stop. Do not start a run.
Exit status zero with ! lines: the run will work, but say what each
warning costs and pass on its → line, then go on. The scraper is the
exception below.
No scraper (the scraper line says "none"): do not start the run yet.
Without one, every claim is checked against a search snippet, not the
page, every source is marked degraded, and the report's confidence drops.
Ask the user to choose, as a multiple-choice question when the client
offers one:
drsh setup scraper themselves and picks
one; it asks for the key.Start only after they choose. With no one to ask (a non-interactive session), go on and say in the answer that no scraper was used.
A missing or rejected model key is fixed by the user running
drsh setup, which is interactive: do not run it for them, and
never ask them to paste a key into the conversation. The same goes for any
→ step that needs an API key (Exa, Tavily, hosted Firecrawl): the user
enters it in drsh setup search or drsh setup scraper themselves.
Search through public instances (the search line says "a public
instance"): recommend the user's own SearXNG in Docker. It is free, keeps
queries on their machine, and queries more engines than public instances
usually allow. Search engines still rate-limit by IP address, so a long
run can be throttled even locally (see section 6). Setup is
drsh init --docker, which writes the files into the config
directory and points the config at them, then the
docker compose -f ... up -d command it prints. Offer to run both; they
change only deep-research's config directory and start a container, so
ask first.
Settings are read only from the config directory (the config line names
it), never from the folder a run starts in. An ! config line names a
file in the working directory whose deep-research settings are no longer
read: tell the user to move them, and do not edit or move a file that
may hold their keys yourself.
Always use --jsonl and a fresh reports directory. (Artifact names come from
the question; the same question into a shared directory is saved beside the
earlier run as <name>-2, never over it.)
dir=$(mktemp -d)
drsh -p "QUESTION" --jsonl --reports "$dir" > "$dir/events.jsonl"
PowerShell: redirect through cmd. Windows PowerShell's own > re-encodes
a program's output (UTF-16 or a byte-order mark), which leaves the first
line unparseable and mangles non-ASCII text. The same goes for any other
output saved to a file, such as --plan-only's.
$dir = (New-Item -ItemType Directory (Join-Path $env:TEMP "dr-$(Get-Random)")).FullName
cmd /c "drsh -p ""QUESTION"" --jsonl --reports ""$dir"" > ""$dir\events.jsonl"""
--mode quick|standard|deep sets the budget (default standard). Use
quick for a narrow factual question, deep only when the user asks for
thoroughness; it spends more requests. All three are fact-checked.
--mode instant is one search and one answer call in seconds, cited but
not fact-checked: use it only when the user wants a fast lookup and says
so, and tell them the answer was not checked.--topics N asks for exactly N (1-8) when the user names
the facets to cover.--no-follow-ups skips the follow-up searches after the planned ones:
one model request fewer, for a question the plan already covers.--format brief|detailed|table shapes the report (default standard):
brief for a quick answer (about 300 words), table when the user wants
a comparison laid out, detailed when they ask for depth. --words N
and --tables none|some|many adjust it. The answer, fact-check and
citations are in every format.--domains go.dev,pkg.go.dev confines the search to those sites. Each
site is checked first; one that fails is dropped with a reason (a
source event). drsh doctor --domains LIST checks a list
without starting a run.--jsonl cannot be combined with --silent.To let the user review sub-topics before searching, make the plan first:
drsh -p "QUESTION" --plan-only > plan.json # one model request
# edit sub_topics; clear query and terms of a renamed one
drsh --plan plan.json --jsonl --reports "$dir" > "$dir/events.jsonl"
--plan carries its own question, tier, follow-up setting
(no_follow_ups), report shape (report) and clarifications, so it takes
no -p, --mode, --sources, --topics, --no-follow-ups, --format,
--words, --tables, --clarify, --clarify-only or --answers.
A --jsonl run asks no clarifying questions. When the question is
ambiguous (which market, product, period or audience) and the user can
answer, ask first, one model request:
drsh -p "QUESTION" --clarify-only > questions.json
Put its questions to the user, then pass their answers back in the same
JSON with "answers": [{"question": "...", "answer": "..."}] filled in:
drsh -p "QUESTION" --answers "$(cat questions.json)" --jsonl .... An empty
questions list means the question is clear: run it as it is.
done lineRead only the last line of events.jsonl. Progress arrives as info,
phase, subagent, search and read lines. Search and scraping have no
heartbeat, and an unstreamed search call can be silent until its timeout,
so silence alone does not mean the run is stuck.
Every run ends on exactly one line with "type":"done":
status | Meaning | What to do |
|---|---|---|
complete | report written | read it |
incomplete | a late phase failed, or most searches found nothing; a report was saved | read it, and tell the user it is incomplete and why (detail) |
failed | the run errored (detail says why) | report detail; resume if a checkpoint exists |
cancelled | interrupted | resume if a checkpoint exists |
When the status is complete, keep the run: move its directory into the
lasting folder that "Looking up earlier runs" searches, and use the moved
paths from then on (in the report back, for ask). Copy, not Move-Item,
on Windows: the temp folder and the home folder can be on different
drives, which Move-Item cannot cross. If the copy fails, keep using the
run where it is and say it was not kept. Only complete runs are
kept; any other run stays where it is, so its checkpoint can still be
resumed.
mkdir -p "$HOME/.deep-research/runs" && kept="$HOME/.deep-research/runs/$(date +%Y%m%d-%H%M%S)-$(basename "$dir")" && mv "$dir" "$kept" && dir="$kept"
$runs = Join-Path $HOME ".deep-research\runs"; New-Item -ItemType Directory -Force $runs | Out-Null
$kept = Join-Path $runs "$(Get-Date -Format yyyyMMdd-HHmmss)-$(Split-Path $dir -Leaf)"
Copy-Item -Recurse -ErrorAction Stop -LiteralPath $dir $kept; Remove-Item -Recurse -LiteralPath $dir; $dir = $kept
artifacts lists the .md, .pdf and .json written, under the
directory the run wrote to. The exit status is
non-zero for incomplete and failed. A stream that ends without a done
line means the process was killed.
Event fields: references/jsonl-events.md.
Answer from the .md artifact. Keep its citations; it already separates
sources the report cites from those it only retrieved.
For anything the Markdown summarizes (per-claim verdicts, quotes, which
sources were fetched in full), read the .json artifact:
references/result-json.md. Its pages field
holds the full text of every fetched page and can be large; search it
rather than reading it whole.
When the answer may already be in the pages the run fetched, ask the run instead of starting a new one. Nothing is searched again:
drsh ask "$dir/<name>.json" -p "Which source gives the price?"
Answers from ask are not fact-checked. Pass that on. A question the run's
pages do not answer needs a new run. ask needs a model that supports tool
calls; if the first question fails saying so, tell the user rather than
switching their model.
A run stopped after its plan was confirmed leaves a checkpoint beside its reports. Resume it; finished searches are not repeated:
drsh --resume "$dir/<name>.<id>.partial.json" --jsonl --reports "$dir" > "$dir/events-resume.jsonl"
An incomplete run whose detail names failed searches (rate-limited,
challenge) also has a checkpoint. Search engines suspend a client for a
few minutes, so a resume right away meets the same limits. Tell the user,
and offer to resume after about ten minutes: only the failed searches run
again, and the model phases run once more (doctor's budget line gives
their count).
--resume takes no -p, --plan, --mode, --sources or --domains;
the checkpoint carries them. The done line names it in checkpoint
(drsh 0.30.0 and newer; with an older one, look for *.partial.json in the
reports directory). A run stopped before its plan was confirmed has no
checkpoint: run it again. Stopping a run with SIGINT (kill -INT) ends it
as cancelled with its checkpoint kept.
drsh list: past runs, their findings and tokens.drsh serve: a local page to launch runs and audit claims, for a
user who wants to look at the evidence themselves.--replay TRACE re-runs only the model phases on a run recorded with
--trace. It is for comparing models or prompts on the same evidence, not
for answering a question.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Other plugins' skills for the same job
/deep-research:deep-researchfrom deep-research
npx claudepluginhub juanhuttemann/deep-research --plugin deep-research