Deepxiv

From wanshuiyin/Auto-claude-code-research-in-sleep · View interactive version

Deepxiv is an AI agent skill from the GitHub repository wanshuiyin/Auto-claude-code-research-in-sleep. 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.

How to use this skill

Skill file

DeepXiv Paper Search & Progressive Reading

Search topic or paper ID: $ARGUMENTS

Role & Positioning

DeepXiv is the progressive-reading literature source:

| Skill | Source | Best for |

|-------|--------|----------|

| /arxiv | arXiv API | Batch search, PDF download, metadata |

| /deepxiv | DeepXiv SDK | Progressive section-level reading |

| /semantic-scholar | S2 API | Published venue metadata, citation counts |

| /alphaxiv | www.alphaxiv.org | Instant LLM-optimized summary of one paper, with LaTeX source fallback |

Use DeepXiv when you want to inspect papers incrementally instead of loading the full text immediately.

Constants

CODE0 §2

(Codex-side chain: $ARIS_REPO/tools/ → tools/ → ~/.codex/skills/deepxiv/).

Policy D1 — if unresolved (canonical chain exhausted), fall back to raw deepxiv CLI.

Overrides (append to arguments):

- /deepxiv "agent memory" - max: 5

- /deepxiv "2409.05591" - brief

- /deepxiv "2409.05591" - head

- /deepxiv "2409.05591" - section: Introduction

- /deepxiv "trending" - days: 14 - max: 10

- /deepxiv "karpathy" - web

- /deepxiv "258001" - sc

Setup

DeepXiv is optional:

pip install deepxiv-sdk

Authentication is handled by the third-party deepxiv-sdk CLI using

DEEPXIV_TOKEN. In SDK 1.2.2,

a command that needs a token auto-registers one if none is configured and saves

it to ~/.env. With python-dotenv installed, the CLI also loads ~/.env and

the current project's .env on startup. Providing DEEPXIV_TOKEN in the CLI's

environment skips automatic registration and token saving, but does not disable

that file loading. This skill does not need to read those files or display tokens;

leave authentication to the CLI.

Workflow

Step 1: Parse Arguments

Parse $ARGUMENTS for:

If the input looks like an arXiv ID and no explicit mode is provided, default to brief.

Step 2: Locate the Adapter

Resolve $DEEPXIV_FETCHER via the canonical strict-safe Codex chain

(see CODE0 §2):

if [ -z "${ARIS_REPO:-}" ] && [ -f .aris/installed-skills-codex.txt ]; then
    ARIS_REPO=$(awk -F'\t' '$1=="repo_root"{print $2; exit}' .aris/installed-skills-codex.txt 2>/dev/null) || true
fi
DEEPXIV_FETCHER=""
[ -n "${ARIS_REPO:-}" ] && [ -f "$ARIS_REPO/tools/deepxiv_fetch.py" ] && DEEPXIV_FETCHER="$ARIS_REPO/tools/deepxiv_fetch.py"
[ -z "$DEEPXIV_FETCHER" ] && [ -f tools/deepxiv_fetch.py ] && DEEPXIV_FETCHER="tools/deepxiv_fetch.py"
[ -z "$DEEPXIV_FETCHER" ] && [ -f ~/.codex/skills/deepxiv/deepxiv_fetch.py ] && DEEPXIV_FETCHER="$HOME/.codex/skills/deepxiv/deepxiv_fetch.py"

# Smoke test (optional): resolved-but-non-functional adapter is not currently auto-demoted.
if [ -n "$DEEPXIV_FETCHER" ]; then
  echo "DeepXiv adapter resolved at: $DEEPXIV_FETCHER" >&2
else
  echo "DeepXiv adapter unresolved (canonical chain exhausted); raw deepxiv CLI fallback will be used." >&2
fi

If the adapter is unresolved, fall back to raw deepxiv commands.

Step 3: Execute the Minimal Command

[ -n "$DEEPXIV_FETCHER" ] && python3 "$DEEPXIV_FETCHER" search "QUERY" --max MAX_RESULTS
[ -n "$DEEPXIV_FETCHER" ] && python3 "$DEEPXIV_FETCHER" paper-brief ARXIV_ID
[ -n "$DEEPXIV_FETCHER" ] && python3 "$DEEPXIV_FETCHER" paper-head ARXIV_ID
[ -n "$DEEPXIV_FETCHER" ] && python3 "$DEEPXIV_FETCHER" paper-section ARXIV_ID "SECTION_NAME"
[ -n "$DEEPXIV_FETCHER" ] && python3 "$DEEPXIV_FETCHER" trending --days 7 --max MAX_RESULTS
[ -n "$DEEPXIV_FETCHER" ] && python3 "$DEEPXIV_FETCHER" wsearch "QUERY"
[ -n "$DEEPXIV_FETCHER" ] && python3 "$DEEPXIV_FETCHER" sc "SEMANTIC_SCHOLAR_ID"

Fallbacks:

deepxiv search "QUERY" --limit MAX_RESULTS --format json
deepxiv paper ARXIV_ID --brief --format json
deepxiv paper ARXIV_ID --head --format json
deepxiv paper ARXIV_ID --section "SECTION_NAME" --format json
deepxiv trending --days 7 --limit MAX_RESULTS --output json
deepxiv wsearch "QUERY" --output json
deepxiv sc "SEMANTIC_SCHOLAR_ID" --output json

Step 4: Present Results

For search results, present a compact literature table. For paper reads, summarize the title, authors, date, TLDR, and the next recommended depth step.

Step 5: Escalate Depth Only When Needed

Use the progression:

  1. search
  2. paper-brief
  3. paper-head
  4. paper-section

Only read the full paper when the user explicitly needs it.

Step 6: Update Research Wiki (if active)

If the project has an active research wiki and the user is building a literature set, add DeepXiv findings as source-backed entries with arXiv/Semantic Scholar IDs, retrieved sections, and the recommended next depth step.

Follow CODE0. If the wiki path or schema is unclear, ask before writing.

Key Rules

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.