阿里斯
- 作者仓库星标 961
- 许可证 MIT
- 作者仓库 dr-claw
- 领域
- 数据
- 作者声明的智能体
- 未找到明确声明;不据此推断已兼容或已测试
- 静态检查
- 94 / 100 · 启发式扫描,不代表运行安全
- 运行环境证据
- 未执行;当前没有隔离运行测试证据
- 作者 / 版本 / 许可证
- @OpenLAIR · MIT
- 上下文用量评级
- 低消耗
- 接入复杂程度
- 即装即用
- 是否需要外部接口密钥
- 不需要
- 兼容的系统
- 未声明(默认跨平台)
- 运行环境要求
- Python
- 检测到的文件与系统行为
-
- 只读
- 允许写入 / 修改
- 网络行为
- 允许外网请求
- 安装命令数
- 无(仅作为资料)
需要注意: 未声明工具权限范围;实际权限由运行环境决定。
/aris-research-lit "topic" - multi-source review: Zotero + Obsidian + local PDFs + web
/aris-novelty-check "idea" - verify your idea is novel against these papers
第 1 步:解析参数
解析 `$ARGUMENTS` 指令: 查询或 ID:主要搜索词或裸 arXiv ID,例如 `2301.07041` 或 `cs/0601001` `- max: N`:覆盖 MAX_RESULTS(例如,`- max: 20`) `- dir: PATH`:覆盖 PAPER_DIR(例如, `- dir: literature/`) `- download`: 列出后下载第一个结果的PDF
第 2 步:搜索 arXiv
找到获取脚本: 如果找到 SCRIPT,则运行: 如果未找到 SCRIPT,则退回到内联 Python: 将结果显示为表格:
步骤 3:获取特定 ID 的详细信息
当请求单个论文 ID 时(直接或从步骤 2 请求):显示:标题、所有作者、类别、完整摘要、发布日期、PDF URL、摘要 URL。
第 4 步:下载 PDF
请求下载时,对于每个要下载的论文 ID: 每次下载后:确认文件大小 > 10 KB(拒绝较小的文件 - 可能是错误的 HTML 页面) 在连续下载之间添加 1 秒延迟以避免速率限制 报告:`Downloaded: papers/2301.07041.pdf (842 KB)`
第五步:总结
对于每篇论文(通过 API 下载或获取):
第6步:最终输出
总结一下所做的事情: `Found N papers for "query"` `Downloaded: papers/2301.07041.pdf (842 KB)`(针对每次下载) 任何警告(达到速率限制、文件太小、已存在) 建议后续技巧:
# 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.
- **FETCH_SCRIPT** - `tools/arxiv_fetch.py` relative to the ARIS install, or the same path relative to the current project. Fall back to inline Python if not found.
> Overrides (append to arguments):
> - `/aris-arxiv "attention mechanism" - max: 20` - return up to 20 results
> - `/aris-arxiv "2301.07041" - download` - download a specific paper by ID
> - `/aris-arxiv "query" - dir: literature/` - save PDFs to a custom directory
> - `/aris-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
Locate the fetch script:
```bash
SCRIPT=$(python3 -c "
import pathlib
candidates = [
pathlib.Path('tools/arxiv_fetch.py'),
pathlib.Path.home() / '.claude' / 'skills' / 'arxiv' / 'arxiv_fetch.py',
]
for p in candidates:
if p.exists():
print(p)
break
" 2>/dev/null)
```
**If SCRIPT is found**, run:
```bash
python3 "$SCRIPT" search "QUERY" --max MAX_RESULTS
```
**If SCRIPT is not found**, 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 = (entry.findtext(f"{{{NS}}}title", "") or "").strip().replace("\n", " ")
abstract = (entry.findtext(f"{{{NS}}}summary", "") or "").strip().replace("\n", " ")
authors = [a.findtext(f"{{{NS}}}name", "") for a in entry.findall(f"{{{NS}}}author")]
published = entry.findtext(f"{{{NS}}}published", "")[:10]
cats = [c.get("term", "") for c in entry.findall(f"{{{NS}}}category")]
papers.append({
"id": aid,
"title": title,
"authors": authors,
"abstract": abstract,
"published": published,
"categories": cats,
"pdf_url": f"https://arxiv.org/pdf/{aid}.pdf",
"abs_url": f"https://arxiv.org/abs/{aid}",
})
print(json.dumps(papers, ensure_ascii=False, indent=2))
PYEOF
```
Present results as a table:
```text
| # | arXiv ID | Title | Authors | Date | Category |
|---|------------|---------------------|----------------|------------|----------|
| 1 | 2301.07041 | Attention Is All... | Vaswani et al. | 2017-06-12 | cs.LG |
```
### Step 3: Fetch Details for a Specific ID
When a single paper ID is requested (either directly or from Step 2):
```bash
python3 "$SCRIPT" search "id:ARXIV_ID" --max 1
# or fallback:
python3 -c "
import urllib.request, xml.etree.ElementTree as ET
NS = 'http://www.w3.org/2005/Atom'
url = 'http://export.arxiv.org/api/query?id_list=ARXIV_ID'
with urllib.request.urlopen(url, timeout=30) as r:
root = ET.fromstring(r.read())
# print full details ...
"
```
Display: title, all authors, categories, full abstract, published date, PDF URL, abstract URL.
### Step 4: Download PDFs
When download is requested, for each paper ID to download:
```bash
# Using fetch script:
python3 "$SCRIPT" download ARXIV_ID --dir PAPER_DIR
# Fallback:
mkdir -p PAPER_DIR && python3 -c "
import pathlib
import sys
import urllib.request
out = pathlib.Path('PAPER_DIR/ARXIV_ID.pdf')
if out.exists():
print(f'Already exists: {out}')
sys.exit(0)
req = urllib.request.Request(
'https://arxiv.org/pdf/ARXIV_ID.pdf',
headers={'User-Agent': 'arxiv-skill/1.0'},
)
with urllib.request.urlopen(req, timeout=60) as r:
out.write_bytes(r.read())
print(f'Downloaded: {out} ({out.stat().st_size // 1024} KB)')
"
```
After each download:
- Confirm file size > 10 KB (reject smaller files - likely an error HTML page)
- Add a 1-second delay between consecutive downloads to avoid rate limiting
- Report: `Downloaded: papers/2301.07041.pdf (842 KB)`
### Step 5: Summarize
For each paper (downloaded or fetched by API):
```markdown
## [Title]
- **arXiv**: [ID] - [abs_url]
- **Authors**: [full author list]
- **Date**: [published]
- **Categories**: [cs.LG, cs.AI, ...]
- **Abstract**: [full abstract]
- **Key contributions** (extracted from abstract):
- [contribution 1]
- [contribution 2]
- [contribution 3]
- **Local PDF**: papers/[ID].pdf (if downloaded)
```
### Step 6: Final Output
Summarize what was done:
- `Found N papers for "query"`
- `Downloaded: papers/2301.07041.pdf (842 KB)` (for each download)
- Any warnings (rate limit hit, file too small, already exists)
Suggest follow-up skills:
```text
/aris-research-lit "topic" - multi-source review: Zotero + Obsidian + local PDFs + web
/aris-novelty-check "idea" - verify your idea is novel against these papers
```
## Key Rules
- Always show the arXiv ID prominently - users need it for citations and reproducibility
- Verify downloaded PDFs: file must be > 10 KB; warn and delete if smaller
- Rate limit: wait 1 second between consecutive PDF downloads; retry once after 5 seconds on HTTP 429
- Never overwrite an existing PDF at the same path - skip it and report "already exists"
- Handle both arXiv ID formats: new (`2301.07041`) and old (`cs/0601001`)
- PAPER_DIR is created automatically if it does not exist
- If the arXiv API is unreachable, report the error clearly and suggest using `/aris-research-lit` with `- sources: web` as a fallback
章节与文件索引
按说明文件中的顺序排列。
常数
第 1 步:解析参数
第 2 步:搜索 arXiv
步骤 3:获取特定 ID 的详细信息
第 4 步:下载 PDF
文件/命令 -> papers/ · tools/arxiv_fetch.py · /aris-arxiv "attention mechanism" - max: 20 · /aris-arxiv "2301.07041" - download · /aris-arxiv "query" - dir: literature/ · /aris-arxiv "query" - download: all · $ARGUMENTS · 2301.07041
内容校验值 -> fbb5e56770eb
当前原文的自动摘译,尚未人工审校。
常数
PAPER_DIR - 用于保存下载的 PDF 的本地目录。默认值:当前项目目录中的
papers/。 MAX_RESULTS = 10 - 默认搜索结果数。 FETCH_SCRIPT - 相对于 ARIS 安装的tools/arxiv_fetch.py,或相对于当前项目的相同路径。如果找不到,则退回到内联 Python。覆盖(附加到参数): -/aris-arxiv "attention mechanism" - max: 20- 最多返回 20 个结果第 1 步:解析参数
解析
$ARGUMENTS指令: 查询或 ID:主要搜索词或裸 arXiv ID,例如2301.07041或cs/0601001- max: N:覆盖 MAX_RESULTS(例如,- max: 20)- dir: PATH:覆盖 PAPER_DIR(例如,- dir: literature/)- download:列出后下载第一个结果的PDF第 4 步:下载 PDF
请求下载时,对于每个要下载的论文 ID: 每次下载后:确认文件大小 > 10 KB(拒绝较小的文件 - 可能是错误的 HTML 页面) 在连续下载之间添加 1 秒的延迟以避免速率限制 报告:
Downloaded: papers/2301.07041.pdf (842 KB)