Skip to main content
NEW · APP STORE Now on iOS · macOS · iPad Android & Windows soon GET IT
Prompts DeepXiv Academic Paper Search Workflow

agent research skill risk: low

DeepXiv Academic Paper Search Workflow

Instructs the model to parse arguments for paper topics or IDs, resolve a DeepXiv fetcher adapter, execute commands for search/brief/head/section/trending modes, present compact ta…

  • External action: medium

SKILL 1 file

SKILL.md
---
name: deepxiv
description: "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."
---
# DeepXiv Paper Search & Progressive Reading

Search topic or paper ID: $ARGUMENTS

## Role & Positioning

DeepXiv is the progressive-reading literature source:

| Skill | Best for |
|------|----------|
| `/arxiv` | Direct preprint search and PDF download |
| `/semantic-scholar` | Published venue metadata, citation counts, DOI links |
| `/deepxiv` | Layered reading: search → brief → head → section, plus trending and web search |

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

## Constants

- **DEEPXIV_FETCHER** — canonical name `deepxiv_fetch.py`, resolved per
  [`shared-references/integration-contract.md`](../shared-references/integration-contract.md) §2
  (Codex-side chain: `$ARIS_REPO/tools/` → `tools/` → `~/.codex/skills/deepxiv/`).
  Policy D1 — if unresolved (canonical chain exhausted), fall back to raw `deepxiv` CLI.
- **MAX_RESULTS = 10** — Default number of search results.

> 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:

```bash
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:

- a paper topic, arXiv ID, or Semantic Scholar ID
- `- max: N`
- `- brief`
- `- head`
- `- section: NAME`
- `- trending`
- `- days: 7|14|30`
- `- web`
- `- sc`

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 [`shared-references/integration-contract.md`](../shared-references/integration-contract.md) §2):

```bash
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

```bash
[ -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:

```bash
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 [`shared-references/integration-contract.md`](../shared-references/integration-contract.md). If the wiki path or schema is unclear, ask before writing.

## Key Rules

- Prefer the adapter script over raw `deepxiv` commands when available.
- If DeepXiv is missing, give the install command and suggest `/arxiv` or `/research-lit "topic" - sources: web`.
- Use DeepXiv as an additive source, not a replacement for existing ARIS literature tooling.
- If the result overlaps with a published venue paper from Semantic Scholar, keep the richer venue metadata in the final summary.

INPUTS

$ARGUMENTS REQUIRED

search topic, paper ID or mode flags

e.g. agent memory - max: 5

REQUIRED CONTEXT

  • $ARGUMENTS (topic, arXiv ID, or Semantic Scholar ID)

OPTIONAL CONTEXT

  • max results
  • mode flags (-brief, -head, -section, -trending, -web, -sc)

TOOLS REQUIRED

  • deepxiv_fetch.py
  • deepxiv CLI

ROLES & RULES

  1. Prefer the adapter script over raw `deepxiv` commands when available.
  2. If DeepXiv is missing, give the install command and suggest `/arxiv` or `/research-lit "topic" - sources: web`.
  3. Use DeepXiv as an additive source, not a replacement for existing ARIS literature tooling.
  4. If the result overlaps with a published venue paper from Semantic Scholar, keep the richer venue metadata in the final summary.

EXPECTED OUTPUT

Format
markdown
Schema
table · title, authors, date, TLDR, next recommended depth step
Constraints
  • present compact literature table for search results
  • summarize title, authors, date, TLDR and next depth step for paper reads
  • escalate depth only when needed

SUCCESS CRITERIA

  • Present a compact literature table for search results.
  • Summarize title, authors, date, TLDR, and next depth step for paper reads.
  • Escalate depth only when needed using the defined progression.
  • Add findings to research wiki with IDs and next step when active.

EXAMPLES

Includes multiple command examples for overrides, argument parsing, adapter resolution, execution commands, and fallbacks.

CAVEATS

Dependencies
  • $ARGUMENTS
  • shared-references/integration-contract.md
  • DEEPXIV_FETCHER
  • ARIS_REPO
Missing context
  • Content or key excerpts from integration-contract.md §2
  • Exact expected JSON schema or output format for each adapter command
Ambiguities
  • References external file `shared-references/integration-contract.md` without including its relevant content.
  • Step 3 shows multiple independent command examples rather than a single conditional execution flow.

QUALITY

OVERALL
0.61
CLARITY
0.65
SPECIFICITY
0.88
REUSABILITY
0.32
COMPLETENESS
0.78

IMPROVEMENT SUGGESTIONS

  • Replace the long shell snippet in Step 2 with a concise pseudocode block or function call.
  • Add a short 'Success Criteria' subsection after Step 6 that defines what a good result looks like for each mode.

USAGE

Copy the prompt above and paste it into your AI of choice — Claude, ChatGPT, Gemini, or anywhere else you're working. Replace any placeholder sections with your own context, then ask for the output.

MORE FOR AGENT