arxiv
🤖 AI Summary
Searches arXiv by topic or paper ID, returns up to 10 results by default, and optionally downloads PDFs to a local directory (default `papers/`). Supports overrides for result count (`-max:`), paper download (`-download`), and custom output directory (`-dir:`).
How to Install
Claude Code:
git clone --depth 1 https://github.com/wanshuiyin/Auto-claude-code-research-in-sleep.git && cp Auto-claude-code-research-in-sleep/skills/arxiv ~/.claude/skills/arxiv -r# arXiv Paper Search & Download
Search topic or arXiv paper ID: $ARGUMENTS
## Constants
- **PAPER_DIR** - Local directory to save downloaded PDFs. Default: `papers/` in the current project directory.
- **MAX_RESULTS = 10** - Default number of search results.
- **ARXIV_FETCHER** — canonical name `arxiv_fetch.py`, resolved per
[`shared-references/integration-contract.md`](../shared-references/integration-contract.md) §2
(Codex-side chain: `$ARIS_REPO/tools/` → `tools/` → `~/.codex/skills/arxiv/`).
Policy D1 — if unresolved (canonical chain exhausted), fall back to inline Python.
> Overrides (append to arguments):
> - `/arxiv "attention mechanism" - max: 20` - return up to 20 results
> - `/arxiv "2301.07041" - download` - download a specific paper by ID
> - `/arxiv "query" - dir: literature/` - save PDFs to a custom directory
> - `/arxiv "query" - download: all` - download all result PDFs
## Workflow
### Step 1: Parse Arguments
Parse `$ARGUMENTS` for directives:
- **Query or ID**: main search term or a bare arXiv ID such as `2301.07041` or `cs/0601001`
- **`- max: N`**: override MAX_RESULTS (e.g., `- max: 20`)
- **`- dir: PATH`**: override PAPER_DIR (e.g., `- dir: literature/`)
- **`- download`**: download the first result's PDF after listing
- **`- download: all`**: download PDFs for all results
If the argument matches an arXiv ID pattern (`YYMM.NNNNN` or `category/NNNNNNN`), skip the search and go directly to Step 3.
### Step 2: Search arXiv
Resolve `$ARXIV_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
ARXIV_FETCHER=""
[ -n "${ARIS_REPO:-}" ] && [ -f "$ARIS_REPO/tools/arxiv_fetch.py" ] && ARXIV_FETCHER="$ARIS_REPO/tools/arxiv_fetch.py"
[ -z "$ARXIV_FETCHER" ] && [ -f tools/arxiv_fetch.py ] && ARXIV_FETCHER="tools/arxiv_fetch.py"
[ -z "$ARXIV_FETCHER" ] && [ -f ~/.codex/skills/arxiv/arxiv_fetch.py ] && ARXIV_FETCHER="$HOME/.codex/skills/arxiv/arxiv_fetch.py"
```
**If `$ARXIV_FETCHER` is non-empty**, run:
```bash
python3 "$ARXIV_FETCHER" search "QUERY" --max MAX_RESULTS
```
**If `$ARXIV_FETCHER` is empty** (Policy D1 cascade), fall back to inline Python:
```bash
python3 - <<'PYEOF'
import json
import urllib.parse
import urllib.request
import xml.etree.ElementTree as ET
NS = "http://www.w3.org/2005/Atom"
query = urllib.parse.quote("QUERY")
url = (f"http://export.arxiv.org/api/query"
f"?search_query={query}&start=0&max_results=MAX_RESULTS"
f"&sortBy=relevance&sortOrder=descending")
with urllib.request.urlopen(url, timeout=30) as r:
root = ET.fromstring(r.read())
papers = []
for entry in root.findall(f"{{{NS}}}entry"):
aid = entry.findtext(f"{{{NS}}}id", "").split("/abs/")[-1].split("v")[0]
title = (e
Details
| Category | Coding → generation |
| Source | wanshuiyin/Auto-claude-code-research-in-sleep |
| SKILL.md | View on GitHub → |
| Repo Stars | ★ 12.5K |
| Est. per Skill | N/A (shared across 74 skills from this repo) |
| Difficulty | Intermediate |
| Risk Level | N/A |
Related Skills
cc-skill-continuous-learning
cc-skill-continuous-learning Development skill skill. When to Use This skill is applicable to execut
git-hooks-automation
Git Hooks Automation Automate code quality enforcement at the Git level. Set up hooks that lint, for
simplify-code
Simplify Code Review changed code for reuse, quality, efficiency, and clarity issues. Use Codex sub-
swift-concurrency-expert
Swift Concurrency Expert Overview Review and fix Swift Concurrency issues in Swift 6.2+ codebases by
Works Well With
Skills from the same repository — often designed to work together
ablation-planner
Ablation Planner Systematically design ablation studies that answer the questions reviewers will ask
alphaxiv
AlphaXiv Paper Lookup Lookup paper: $ARGUMENTS > Quick single-paper reader with tiered source fallba
analyze-results
Analyze Experiment Results Analyze: $ARGUMENTS Workflow Step 1: Locate Results Find all relevant JSO