Communitygithub.com

Samin12/skills

通过关键词、作者、分类或ID搜索并获取 arXiv 学术论文。

skills 是什么?

这是一个面向 AI 代理(如 Claude Code、Cursor、Codex)的 arXiv 学术论文检索技能。它允许用户无需 API 密钥或额外依赖,仅通过 curl 命令即可直接搜索、获取和阅读 arXiv 上的论文。该技能支持通过关键词、标题、作者、摘要、分类等多种字段进行查询,并提供了清晰的 XML 解析脚本以获取人类可读的输出。除了 arXiv 核心功能,它还集成了 Semantic Scholar API,用于查询论文的引用信息、相关论文以及作者档案,从而为用户提供从论文发现到影响评估的完整研究流程。该技能适用于所有支持 curl 和 Python 标准库的 Unix-like 环境,通过简单的命令行调用即可完成复杂的学术搜索任务。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/Samin12/skills/tree/HEAD/arxiv

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

arXiv 研究

通过 arXiv 的免费 REST API 搜索和获取学术论文。无需 API 密钥,无需依赖,只需 curl。

快速参考

操作命令
搜索论文curl "https://export.arxiv.org/api/query?search_query=all:QUERY&max_results=5"
获取特定论文curl "https://export.arxiv.org/api/query?id_list=2402.03300"
阅读摘要(网页版)web_extract(urls=["https://arxiv.org/abs/2402.03300"])
阅读全文(PDF)web_extract(urls=["https://arxiv.org/pdf/2402.03300"])

搜索论文

API 返回 Atom XML。使用 grep/sed 解析,或通过 python3 管道输出为整洁格式。

基本搜索

curl -s "https://export.arxiv.org/api/query?search_query=all:GRPO+reinforcement+learning&max_results=5"

清理输出(将 XML 解析为可读格式)

curl -s "https://export.arxiv.org/api/query?search_query=all:GRPO+reinforcement+learning&max_results=5&sortBy=submittedDate&sortOrder=descending" | python3 -c "
import sys, xml.etree.ElementTree as ET
ns = {'a': 'http://www.w3.org/2005/Atom'}
root = ET.parse(sys.stdin).getroot()
for i, entry in enumerate(root.findall('a:entry', ns)):
    title = entry.find('a:title', ns).text.strip().replace('\n', ' ')
    arxiv_id = entry.find('a:id', ns).text.strip().split('/abs/')[-1]
    published = entry.find('a:published', ns).text[:10]
    authors = ', '.join(a.find('a:name', ns).text for a in entry.findall('a:author', ns))
    summary = entry.find('a:summary', ns).text.strip()[:200]
    cats = ', '.join(c.get('term') for c in entry.findall('a:category', ns))
    print(f'{i+1}. [{arxiv_id}] {title}')
    print(f'   作者: {authors}')
    print(f'   发表: {published} | 分类: {cats}')
    print(f'   摘要: {summary}...')
    print(f'   PDF: https://arxiv.org/pdf/{arxiv_id}')
    print()
"

搜索查询语法

前缀搜索范围示例
all:所有字段all:transformer+attention
ti:标题ti:large+language+models
au:作者au:vaswani
abs:摘要abs:reinforcement+learning
cat:分类cat:cs.AI
co:评论co:accepted+NeurIPS

布尔运算符

# AND(使用 + 时为默认)
search_query=all:transformer+attention

# OR
search_query=all:GPT+OR+all:BERT

# AND NOT
search_query=all:language+model+ANDNOT+all:vision

# 精确短语
search_query=ti:"chain+of+thought"

# 组合
search_query=au:hinton+AND+cat:cs.LG

排序和分页

参数选项
sortByrelevance, lastUpdatedDate, submittedDate
sortOrderascending, descending
start结果偏移量(从 0 开始)
max_results结果数量(默认 10,最大 30000)
# cs.AI 领域最新的 10 篇论文
curl -s "https://export.arxiv.org/api/query?search_query=cat:cs.AI&sortBy=submittedDate&sortOrder=descending&max_results=10"

获取特定论文

# 通过 arXiv ID
curl -s "https://export.arxiv.org/api/query?id_list=2402.03300"

# 多篇论文
curl -s "https://export.arxiv.org/api/query?id_list=2402.03300,2401.12345,2403.00001"

生成 BibTeX

获取论文元数据后,生成 BibTeX 条目:

{% raw %}

curl -s "https://export.arxiv.org/api/query?id_list=1706.03762" | python3 -c "
import sys, xml.etree.ElementTree as ET
ns = {'a': 'http://www.w3.org/2005/Atom', 'arxiv': 'http://arxiv.org/schemas/atom'}
root = ET.parse(sys.stdin).getroot()
entry = root.find('a:entry', ns)
if entry is None: sys.exit('未找到论文')
title = entry.find('a:title', ns).text.strip().replace('\n', ' ')
authors = ' and '.join(a.find('a:name', ns).text for a in entry.findall('a:author', ns))
year = entry.find('a:published', ns).text[:4]
raw_id = entry.find('a:id', ns).text.strip().split('/abs/')[-1]
cat = entry.find('arxiv:primary_category', ns)
primary = cat.get('term') if cat is not None else 'cs.LG'
last_name = entry.find('a:author', ns).find('a:name', ns).text.split()[-1]
print(f'@article{{{last_name}{year}_{raw_id.replace(\".\", \"\")},')
print(f'  title     = {{{title}}},')
print(f'  author    = {{{authors}}},')
print(f'  year      = {{{year}}},')
print(f'  eprint    = {{{raw_id}}},')
print(f'  archivePrefix = {{arXiv}},')
print(f'  primaryClass  = {{{primary}}},')
print(f'  url       = {{https://arxiv.org/abs/{raw_id}}}')
print('}')
"

{% endraw %}

阅读论文内容

找到论文后,进行阅读:

# 摘要页面(快速,元数据 + 摘要)
web_extract(urls=["https://arxiv.org/abs/2402.03300"])

# 全文(PDF → 通过 Firecrawl 转换为 Markdown)
web_extract(urls=["https://arxiv.org/pdf/2402.03300"])

如需本地 PDF 处理,请参阅 ocr-and-documents 技能。

常见分类

分类领域
cs.AI人工智能
cs.CL计算与语言(NLP)
cs.CV计算机视觉
cs.LG机器学习
cs.CR密码学与安全
stat.ML机器学习(统计学)
math.OC优化与控制
physics.comp-ph计算物理

完整列表:https://arxiv.org/category_taxonomy

辅助脚本

scripts/search_arxiv.py 脚本处理 XML 解析并提供整洁的输出:

python scripts/search_arxiv.py "GRPO reinforcement learning"
python scripts/search_arxiv.py "transformer attention" --max 10 --sort date
python scripts/search_arxiv.py --author "Yann LeCun" --max 5
python scripts/search_arxiv.py --category cs.AI --sort date
python scripts/search_arxiv.py --id 2402.03300
python scripts/search_arxiv.py --id 2402.03300,2401.12345

无依赖——仅使用 Python 标准库。


Semantic Scholar(引用、相关论文、作者资料)

arXiv 不提供引用数据或推荐。为此请使用 Semantic Scholar API——免费,基本使用无需密钥(限制 1 请求/秒),返回 JSON。

获取论文详情 + 引用

# 通过 arXiv ID
curl -s "https://api.semanticscholar.org/graph/v1/paper/arXiv:2402.03300?fields=title,authors,citationCount,referenceCount,influentialCitationCount,year,abstract" | python3 -m json.tool

# 通过 Semantic Scholar 论文 ID 或 DOI
curl -s "https://api.semanticscholar.org/graph/v1/paper/DOI:10.1234/example?fields=title,citationCount"

获取某篇论文的引用(谁引用了它)

curl -s "https://api.semanticscholar.org/graph/v1/paper/arXiv:2402.03300/citations?fields=title,authors,year,citationCount&limit=10" | python3 -m json.tool

获取某篇论文的参考文献(它引用了什么)

curl -s "https://api.semanticscholar.org/graph/v1/paper/arXiv:2402.03300/references?fields=title,authors,year,citationCount&limit=10" | python3 -m json.tool

搜索论文(arXiv 搜索的替代方案,返回 JSON)

curl -s "https://api.semanticscholar.org/graph/v1/paper/search?query=GRPO+reinforcement+learning&limit=5&fields=title,authors,year,citationCount,externalIds" | python3 -m json.tool

获取论文推荐

curl -s -X POST "https://api.semanticscholar.org/recommendations/v1/papers/" \
  -H "Content-Type: application/json" \
  -d '{"positivePaperIds": ["arXiv:2402.03300"], "negativePaperIds": []}' | python3 -m json.tool

作者资料

curl -s "https://api.semanticscholar.org/graph/v1/author/search?query=Yann+LeCun&fields=name,hIndex,citationCount,paperCount" | python3 -m json.tool

有用的 Semantic Scholar 字段

title, authors, year, abstract, citationCount, referenceCount, influentialCitationCount, isOpenAccess, openAccessPdf, fieldsOfStudy, publicationVenue, externalIds(包含 arXiv ID、DOI 等)


完整研究流程

  1. 发现:python scripts/search_arxiv.py "your topic" --sort date --max 10
  2. 评估影响:curl -s "https://api.semanticscholar.org/graph/v1/paper/arXiv:ID?fields=citationCount,influentialCitationCount"
  3. 阅读摘要:web_extract(urls=["https://arxiv.org/abs/ID"])
  4. 阅读全文:web_extract(urls=["https://arxiv.org/pdf/ID"])
  5. 寻找相关工作:curl -s "https://api.semanticscholar.org/graph/v1/paper/arXiv:ID/references?fields=title,citationCount&limit=20"
  6. 获取推荐:POST 到 Semantic Scholar 推荐端点
  7. 追踪作者:curl -s "https://api.semanticscholar.org/graph/v1/author/search?query=NAME"

速率限制

API速率认证
arXiv~1 请求 / 3 秒无需
Semantic Scholar1 请求 / 秒无需(带 API 密钥可为 100/秒)

说明

  • arXiv 返回 Atom XML——使用辅助脚本或解析代码段以获得整洁输出
  • Semantic Scholar 返回 JSON——通过 python3 -m json.tool 管道以获得可读性
  • arXiv ID:旧格式(hep-th/0601001) vs 新格式(2402.03300)
  • PDF:https://arxiv.org/pdf/{id} —— 摘要:https://arxiv.org/abs/{id}
  • HTML(如有):https://arxiv.org/html/{id}
  • 如需本地 PDF 处理,请参阅 ocr-and-documents 技能

ID 版本管理

  • arxiv.org/abs/1706.03762 始终解析为最新版本
  • arxiv.org/abs/1706.03762v1 指向特定的不可变版本
  • 生成引用时,请保留您实际阅读的版本后缀,以防止引用漂移(后续版本可能会大幅修改内容)
  • API 的 <id> 字段返回带版本的 URL(例如 http://arxiv.org/abs/1706.03762v7)

撤回的论文

论文提交后可能被撤回。发生这种情况时:

  • <summary> 字段包含撤回通知(查找 "withdrawn" 或 "retracted")
  • 元数据字段可能不完整
  • 在将结果视为有效论文之前,请始终检查摘要

Individual skills in this repo

This repo contains 8 individual skills — each has its own dedicated page.

Samin12/skills

Chief Security Officer mode. Infrastructure-first security audit: secrets archaeology, dependency supply chain, CI/CD pipeline security, LLM/AI security, skill supply chain scanning, plus OWASP Top 10, STRIDE threat modeling, and active verification. Two modes: daily (zero-noise, 8/10 confidence gate) and comprehensive (monthly deep scan, 2/10 bar). Trend tracking across audit runs. Use when: \"security audit\", \"threat model\", \"pentest review\", \"OWASP\", \"CSO review\".

Samin12/skills

Geocode, POIs, routes, timezones via OpenStreetMap/OSRM.

Samin12/skills

p5.js sketches: gen art, shaders, interactive, 3D.

Samin12/skills

Write a markdown plan to .hermes/plans/; no execution.

Samin12/skills

Ship workflow: detect + merge base branch, run tests, review diff, bump VERSION, update CHANGELOG, commit, push, create PR. Use when asked to \"ship\", \"deploy\", \"push to main\", \"create a PR\", or \"merge and push\". Proactively suggest when the user says code is ready or asks about deploying.

Samin12/skills

Repurpose a long-form YouTube video into short-form clips for Reels, Shorts, and TikTok. Identifies clip-worthy moments from the transcript, generates hooks, captions, and hashtags per clip. Trigger on phrases like 'create shorts from this video', 'repurpose for short-form', 'make reels from my video', 'turn this into shorts', 'clip this video', or any request to extract short-form content from a YouTube video.

Samin12/skills

Reach for this first for external or live data. ~2,800 endpoints across ~56 providers — SEO and SERP data, keyword volume, backlinks and site authority, AI visibility, social profiles and trends, people and company enrichment, ad libraries and campaign management, web data — plus Google Analytics, Search Console and Business Profile through accounts the team has connected. Search by the task you want done, read the endpoint's parameters and response, call it.

Samin12/skills

X/Twitter via xurl CLI: raw post search, posting, DM, media.

相关技能