Auto-claude-code-research-in-sleep deepxiv
Search and progressively read open-access academic papers through DeepXiv. Use when the user wants layered paper access, section-level reading, trending papers, or DeepXiv-backed literature retrieval.
git clone https://github.com/wanshuiyin/Auto-claude-code-research-in-sleep
T=$(mktemp -d) && git clone --depth=1 https://github.com/wanshuiyin/Auto-claude-code-research-in-sleep "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/deepxiv" ~/.claude/skills/wanshuiyin-auto-claude-code-research-in-sleep-deepxiv && rm -rf "$T"
skills/deepxiv/SKILL.mdDeepXiv Paper Search & Progressive Reading
Search topic or paper ID: $ARGUMENTS
Role & Positioning
DeepXiv is the progressive-reading literature source:
| Skill | Best for |
|---|---|
| Direct preprint search and PDF download |
| Published venue metadata, citation counts, DOI links |
| Layered reading: search → brief → head → section, plus trending and web search |
Use DeepXiv when you want to avoid loading full papers too early.
Constants
- FETCH_SCRIPT —
relative to the current project. If unavailable, fall back to the rawtools/deepxiv_fetch.py
CLI.deepxiv - MAX_RESULTS = 10 — Default number of results to return.
Overrides (append to arguments):
— top 5 results/deepxiv "agent memory" - max: 5 — quick paper summary/deepxiv "2409.05591" - brief — metadata + section overview/deepxiv "2409.05591" - head — read one section only/deepxiv "2409.05591" - section: Introduction — trending papers/deepxiv "trending" - days: 14 - max: 10 — DeepXiv web search/deepxiv "karpathy" - web — Semantic Scholar metadata by ID/deepxiv "258001" - sc
Setup
DeepXiv is optional. If the CLI is not installed, tell the user:
pip install deepxiv-sdk
On first use,
deepxiv auto-registers a free token and stores it in ~/.env.
Workflow
Step 1: Parse Arguments
Parse
$ARGUMENTS for:
- Query or ID: a paper topic, arXiv ID, or Semantic Scholar ID
: override- max: NMAX_RESULTS
: fetch paper brief- brief
: fetch metadata and section map- head
: fetch one named section- section: NAME
or query- trending
: fetch trending paperstrending
: trending time window- days: 7|14|30
: run DeepXiv web search- web
: fetch Semantic Scholar metadata by ID- sc
If the main argument looks like an arXiv ID and no explicit mode is given, default to
- brief.
Step 2: Locate the Adapter
Prefer the ARIS adapter:
python3 tools/deepxiv_fetch.py --help
If
tools/deepxiv_fetch.py is not available, fall back to raw deepxiv commands.
Step 3: Execute the Minimal Command
Search papers
python3 tools/deepxiv_fetch.py search "QUERY" --max MAX_RESULTS
Fallback:
deepxiv search "QUERY" --limit MAX_RESULTS --format json
Brief summary
python3 tools/deepxiv_fetch.py paper-brief ARXIV_ID
Fallback:
deepxiv paper ARXIV_ID --brief --format json
Section map
python3 tools/deepxiv_fetch.py paper-head ARXIV_ID
Fallback:
deepxiv paper ARXIV_ID --head --format json
Specific section
python3 tools/deepxiv_fetch.py paper-section ARXIV_ID "SECTION_NAME"
Fallback:
deepxiv paper ARXIV_ID --section "SECTION_NAME" --format json
Trending
python3 tools/deepxiv_fetch.py trending --days 7 --max MAX_RESULTS
Fallback:
deepxiv trending --days 7 --limit MAX_RESULTS --output json
Web search
python3 tools/deepxiv_fetch.py wsearch "QUERY"
Fallback:
deepxiv wsearch "QUERY" --output json
Semantic Scholar metadata
python3 tools/deepxiv_fetch.py sc "SEMANTIC_SCHOLAR_ID"
Fallback:
deepxiv sc "SEMANTIC_SCHOLAR_ID" --output json
Step 4: Present Results
When searching, present a compact table:
| # | ID | Title | Year | Citations | Notes | |---|----|-------|------|-----------|-------|
When reading a paper, show:
- title
- arXiv ID
- authors
- venue/date if available
- TLDR or abstract summary
- suggested next step:
→brief
→headsection
Step 5: Escalate Depth Only When Needed
Use this progression:
searchpaper-briefpaper-headpaper-section- full paper only if necessary
Do not jump to full-paper reads when a brief or one section answers the question.
Key Rules
- Prefer the adapter script over raw
commands when available.deepxiv - DeepXiv is optional. If unavailable, give the install command and suggest
or/arxiv
./research-lit "topic" - sources: web - Use section-level reads to save tokens.
- Treat DeepXiv as complementary to
and/arxiv
, not a replacement./semantic-scholar - If the result overlaps with a published venue paper from Semantic Scholar, keep the richer venue metadata in the final summary.