skills/deep-research/SKILL.md
This skill should be used when the user asks to "deep research", "comprehensive research on", "thorough investigation of", "research report on", "deep dive into", "literature review on", or needs Gemini Deep Research for web-grounded multi-source synthesis beyond what Google Scholar and Consensus provide.
npx skillsauth add edwinhu/workflows deep-researchInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Web-grounded deep research via Gemini Interactions API.
NEVER call the Gemini Interactions API manually. ALWAYS use bun deep-research.ts. This is non-negotiable.
cd "${CLAUDE_SKILL_DIR}" && bun deep-research.ts "research query"
The script handles model selection, interaction submission, polling with retries, timeout enforcement, and report formatting. Calling the Interactions API by hand means you skip retry logic, miss the 65-minute timeout guard, and lose the saved report file.
Deep Research is the LAST RESORT in the librarian's source hierarchy. It costs $1-7 per query, takes minutes not seconds, and produces a broad web-grounded report rather than precise academic citations.
User needs information on a topic
|
v
Check curated sources FIRST (all must be exhausted):
1. Paperpile bib (local library)
2. Google Scholar (scholar search/lookup)
3. Consensus (consensus search)
4. NLM notebooks (existing sources)
5. Readwise (highlights/full-text)
|
v
Are there still significant gaps?
|
+-- NO --> Stop. Curated sources are sufficient.
|
+-- YES
|
v
Has the user explicitly asked for broader/deeper research?
|
+-- NO --> Report gaps, suggest deep research, WAIT for approval.
|
+-- YES --> Run deep-research.ts
--bibtexcd "${CLAUDE_SKILL_DIR}" && bun deep-research.ts "What is the current state of mandatory climate disclosure regulation worldwide?"
cd "${CLAUDE_SKILL_DIR}" && bun deep-research.ts --fast "ESG disclosure enforcement mechanisms"
cd "${CLAUDE_SKILL_DIR}" && bun deep-research.ts --status <interaction-id>
cd "${CLAUDE_SKILL_DIR}" && bun deep-research.ts --json "corporate governance reform trends"
| Model | Flag | Queries | Time | Cost | Use when |
|-------|------|---------|------|------|----------|
| deep-research-max | (default) | ~160 web queries | 5-20 min | ~$3-7 | Thorough reports, literature reviews, multi-faceted questions |
| deep-research | --fast | ~80 web queries | 2-10 min | ~$1-3 | Quick scans, narrow questions, time-sensitive requests |
$1-7 per query. NEVER auto-invoke. Always ask the user first.
This is the most expensive tool in the librarian's toolkit. Before every invocation:
--fast costs $1-3 and takes 2-10 minutes; Scholar, Consensus, Paperpile, NLM, and Readwise are free and return in seconds. Reaching for deep research because it seems "faster than searching multiple sources" is counterproductive on its own terms.Paperpile bib --> Scholar --> Consensus --> NLM / Readwise
(local) (free) (free) (free)
|
v
[GAPS IDENTIFIED + USER ASKS]
|
v
Deep Research (THIS SKILL)
$1-7, 2-20 min
|
v
Curate results to NLM
(save report, extract key sources)
After deep research completes:
/tmp/deep-research-<id>.md for reference| # | Action | Why Wrong | Do Instead |
|---|--------|-----------|------------|
| 1 | Using before checking curated sources | Scholar, Consensus, Paperpile, NLM, Readwise are free and fast | Exhaust all five curated sources first |
| 2 | Using for known paper lookup | Deep Research returns web-grounded reports, not citation metadata | Use scholar lookup --bibtex or scholar cite |
| 3 | Launching without user's explicit request | $1-7 per query; unauthorized spending violates trust | Report gaps, state cost, wait for go-ahead |
| 4 | Calling Interactions API directly (without the script) | Skips retry logic, timeout guard, report file save | Always use bun deep-research.ts |
| 5 | Ignoring the report and re-searching the same topic | Wastes another $1-7 for information you already have | Read the saved report at /tmp/deep-research-<id>.md |
| Variable | Required | Description |
|----------|----------|-------------|
| GOOGLE_API_KEY | Yes | Gemini API key with Deep Research access |
Timeout: 65 minutes maximum polling duration (covers the API's 60-min hard limit plus buffer).
Polling interval: 10 seconds between status checks.
Retries: Up to 3 retries on transient errors (503, 429, service_unavailable, rate_limit).
The script prints the research report to stdout as Markdown. It also saves the report to /tmp/deep-research-<interaction-id>.md for later reference.
With --json, it prints the full interaction object as JSON (useful for debugging or extracting structured metadata).
On failure, it prints the error to stderr and exits non-zero.
development
Build the meeting-level proxy-voting × ownership panel on the WRDS SGE grid — ISS N-PX fund votes reduced to (item × block) direction cells, joined to institutional and mutual-fund ownership. Use when working with risk.voteanalysis_npx, N-PX fund-level votes, ISS→CRSP fund linking, index/passive/active voting blocks, or a proxy-voting panel that needs ownership attached.
development
Use when "CRSP CIZ", "CRSP v2", "CRSP flat file format 2.0", "crsp.dsf_v2 / msf_v2", "StkDlySecurityData", "StkMthSecurityData", "StkSecurityInfoHist", "stocknames_v2", "DlyRet / MthRet / DlyPrc / MthPrc", "SHRCD or EXCHCD equivalent in new CRSP", "SIZ to CIZ migration", "CRSP data after 2024", "CRSP delisting returns", "CRSP cumulative adjustment factors", "CRSP index INDNO / INDFAM", or any CRSP stock/index query where the legacy SIZ column names no longer exist.
development
Use when linking or deduping datasets by entity name rather than a shared key — 'fuzzy match', 'fuzzy name matching', 'entity resolution', 'record linkage', 'match company/person names', 'dedupe entity names', 'name-based join', 'bridge identifiers' (CIK ↔ permno ↔ gvkey ↔ wficn ↔ EIN ↔ personid), or any use of char n-gram TF-IDF, cosine similarity on names, `sparse_dot_topn`, or RapidFuzz at scale.
development
Use when building a publication-quality table in Python — 'regression table', 'results table', 'summary statistics table', 'etable', 'coefplot', 'great_tables', 'GT', 'gt table', 'format a table for the paper', 'export table to LaTeX/HTML', significance stars, spanners, or column formatting for a table headed into a paper, slide deck, or notebook.