Research Literature Review
Research topic: $ARGUMENTS
Constants
- PAPER_LIBRARY — Local directory containing user's paper collection (PDFs). Check these paths in order:
1. papers/ in the current project directory
2. literature/ in the current project directory
3. Custom path specified by user in AGENTS.md under ## Paper Library
- MAX_LOCAL_PAPERS = 20 — Maximum number of local PDFs to scan (read first 3 pages each). If more are found, prioritize by filename relevance to the topic.
- SOURCES =
all— Which literature sources to search. Options:zotero,obsidian,local,web,semantic-scholar,deepxiv,exa,gemini,openalex,all. Full source table and selection rules: see## Data Sourcesbelow. - ARXIV_DOWNLOAD = false — When
true, download top 3-5 most relevant arXiv PDFs to PAPER_LIBRARY after search. Whenfalse(default), only fetch metadata (title, abstract, authors) via arXiv API — no files are downloaded. - ARXIV_MAX_DOWNLOAD = 5 — Maximum number of PDFs to download when
ARXIV_DOWNLOAD = true. - REVIEWER_BACKEND =
codex— Default reviewer route for optional literature synthesis cross-checks. Use--reviewer: oracle-proonly when explicitly requested; if Oracle is unavailable, warn and continue with Codex xhigh or local synthesis.
💡 Overrides:
-
/research-lit "topic" — paper library: ~/my_papers/— custom local PDF path
-
/research-lit "topic" — sources: zotero, local— only search Zotero + local PDFs
-
/research-lit "topic" — sources: web— only search the web (skip all local)
-
/research-lit "topic" — sources: web, semantic-scholar— also search Semantic Scholar for published venue papers
-
/research-lit "topic" — sources: all, deepxiv— use default sources plus DeepXiv
-
/research-lit "topic" — arxiv download: true— download top relevant arXiv PDFs
-
/research-lit "topic" — arxiv download: true, max download: 10— download up to 10 PDFs
Data Sources
This skill checks multiple sources in priority order.
Source Selection
Parse $ARGUMENTS for a — sources: directive:
- If
— sources:is specified: Only search the listed sources (comma-separated). Valid values:zotero,obsidian,local,web,semantic-scholar,deepxiv,exa,gemini,openalex,all. - If not specified: Default to
all— search every available source in priority order (semantic-scholar,deepxiv,exa,gemini, andopenalexare excluded fromall; they must be explicitly listed).
Examples:
/research-lit "diffusion models" → all (default)
/research-lit "diffusion models" — sources: all → all
/research-lit "diffusion models" — sources: zotero → Zotero only
/research-lit "diffusion models" — sources: zotero, web → Zotero + web
/research-lit "diffusion models" — sources: local → local PDFs only
/research-lit "topic" — sources: obsidian, local, web → skip Zotero
/research-lit "topic" — sources: web, semantic-scholar → web + Semantic Scholar API
/research-lit "topic" — sources: deepxiv → DeepXiv only
/research-lit "topic" — sources: all, deepxiv → default sources + DeepXiv
/research-lit "topic" — sources: all, semantic-scholar → default sources + Semantic Scholar API
/research-lit "topic" — sources: exa → Exa only (broad web + content extraction)
/research-lit "topic" — sources: all, exa → default sources + Exa web search
/research-lit "topic" — sources: gemini → Gemini only (AI-powered broad discovery)
/research-lit "topic" — sources: all, gemini → default sources + Gemini discovery
/research-lit "topic" — sources: openalex → OpenAlex only (open citation graph + institutions)
/research-lit "topic" — sources: all, openalex → default sources + OpenAlex citation graph
Source Table
| Priority | Source | ID | How to detect | What it provides |
|----------|--------|----|---------------|-----------------|
| 1 | Zotero (via MCP) | zotero | Try calling any mcp__zotero__* tool — if unavailable, skip | Collections, tags, annotations, PDF highlights, BibTeX, semantic search |
| 2 | Obsidian (via MCP) | obsidian | Try calling any mcp__obsidian-vault__* tool — if unavailable, skip | Research notes, paper summaries, tagged references, wikilinks |
| 3 | Local PDFs | local | Glob: papers/**/*.pdf, literature/**/*.pdf | Raw PDF content (first 3 pages) |
| 4 | Web search | web | Always available (WebSearch) | arXiv, Semantic Scholar, Google Scholar |
| 5 | Semantic Scholar API | semantic-scholar | $S2_FETCHER resolves (canonical name semantic_scholar_fetch.py, per integration-contract §2 Codex chain) | Published venue papers (IEEE, ACM, Springer) with structured metadata: citation counts, venue info, TLDR. Only runs when explicitly requested |
| 6 | DeepXiv CLI | deepxiv | $DEEPXIV_FETCHER resolves (canonical name deepxiv_fetch.py, per integration-contract §2) and deepxiv CLI present | Progressive paper retrieval: search, brief, head, section, trending, web search. Only runs when explicitly requested |
| 7 | Exa Search | exa | $EXA_FETCHER resolves (canonical name exa_search.py, per integration-contract §2); fetcher handles exa-py SDK + API key internally | AI-powered broad web search with content extraction (highlights, text, summaries). Covers blogs, docs, news, companies, and research papers beyond arXiv/S2. Only runs when explicitly requested |
| 8 | Gemini (MCP / CLI) | gemini | mcp__gemini-cli__ask-gemini is available, or gemini CLI is installed | AI-powered broad literature discovery that decomposes topics into sub-problems, aliases, and variants. Only runs when explicitly requested |
| 9 | OpenAlex | openalex | $OPENALEX_FETCHER resolves (canonical name openalex_fetch.py, per integration-contract §2 Codex chain) and Python requests is importable | Open citation graph with institutional affiliations, funding data, and broad work metadata. Only runs when explicitly requested |
If the user explicitly requests Zotero or Obsidian and that source is not configured, stop and tell the user how to enable it. Only sources that were not requested may be skipped silently.
Workflow
Per-source/per-paper fan-out
Retrieval and extraction are breadth-bound. Freeze and sort canonical paper IDs,
then partition them deterministically into max_shards: 8 or fewer batches.
The executor may use at most max_concurrency: 4 active shards and requests
max_turns: 8, read-only behavior, and recursion: false in every
leaf-equivalent prompt.
Stock Codex enforcement: prompt-only. Standard Codex spawn_agent exposes
no per-child tool allowlist, recursion flag, or child turn-cap parameter. These
worker restrictions are prompt conventions unless the active host supplies
structural enforcement, so stock Codex does not provide the same hard tool,
non-recursion, and turn boundary as the Claude leaf. The executor still enforces
fixed shard and concurrency limits, no replacement workers, and the coverage
receipt. A failed, malformed, or timed-out shard gets at most one executor-side
sequential fallback and no replacement agent. Each shard
returns `{shard_id, assigned_unit_ids, covered_unit_ids, status, entries,
errors}, with canonical DOI/arXiv/title IDs as dedup_key`.
Before synthesis, emit a coverage receipt that reconciles the frozen paper
IDs with covered IDs and lists every failed or uncovered paper explicitly. The
parent invokes every resolved source, unions results, mechanically dedups on
canonical IDs, and writes once. Source verification remains deterministic;
optional Codex synthesis review is same-family provisional. See