Communitygithub.com

V4TIME/V4SKILL

キーワード、著者、カテゴリ、IDでarXivの論文を検索・取得するスキル。

V4SKILL とは?

このスキルは、学術論文プレプリントサーバーarXivのREST APIを介して論文検索・取得を実現します。APIキーや外部依存パッケージは不要で、curlコマンドとPythonの標準ライブラリのみで動作します。キーワード検索、著者検索、カテゴリ検索、ID指定による個別取得が可能で、結果はAtom XML形式で返されます。また、被引用数や関連論文の検索ができるSemantic Scholar APIとの連携もサポートしており、発見から被引用影響度の評価、アブストラクトの読解、PDF全文の取得、関連研究の発見、著者のトラッキングに至る完全な研究ワークフローを提供します。レート制限はarXivが約3秒に1リクエスト、Semantic Scholarが1秒に1リクエスト(APIキーで100/秒)で、論文IDのバージョン管理や撤回論文への注意点も記載されています。

対応~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/V4TIME/V4SKILL/tree/HEAD/research/arxiv

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

arXiv Research

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)web_extract(urls=["https://arxiv.org/abs/2402.03300"])
論文全文を読む(PDF)web_extract(urls=["https://arxiv.org/pdf/2402.03300"])

論文を検索する

APIはAtom XMLを返します。grep/sedでパースするか、pythonにパイプしてきれいな出力を得てください。

基本検索

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" | python -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(+を使用するとデフォルトで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エントリを生成します。

curl -s "https://export.arxiv.org/api/query?id_list=1706.03762" | python -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('}')
"

論文の内容を読む

論文を見つけたら、読みます。

# アブストラクトページ(高速、メタデータ+アブストラクト)
web_extract(urls=["https://arxiv.org/abs/2402.03300"])

# 論文全文(PDF→Firecrawlでマークダウン)
web_extract(urls=["https://arxiv.org/pdf/2402.03300"])

ローカルでのPDF処理については、ocr-and-documentsスキルを参照してください。

よく使われるカテゴリ

カテゴリ分野
cs.AI人工知能
cs.CL計算言語学と自然言語処理
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 req/sec)、JSONを返します。

論文の詳細+引用数を取得

# arXiv IDで
curl -s "https://api.semanticscholar.org/graph/v1/paper/arXiv:2402.03300?fields=title,authors,citationCount,referenceCount,influentialCitationCount,year,abstract" | python -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" | python -m json.tool

ある論文の参考文献を取得(何を引用しているか)

curl -s "https://api.semanticscholar.org/graph/v1/paper/arXiv:2402.03300/references?fields=title,authors,year,citationCount&limit=10" | python -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" | python -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": []}' | python -m json.tool

著者プロファイル

curl -s "https://api.semanticscholar.org/graph/v1/author/search?query=Yann+LeCun&fields=name,hIndex,citationCount,paperCount" | python -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 "あなたのトピック" --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. 推薦を取得: Semantic Scholarの推薦エンドポイントにPOST
  7. 著者を追跡: curl -s "https://api.semanticscholar.org/graph/v1/author/search?query=NAME"

レート制限

APIレート認証
arXiv約3秒に1リクエスト不要
Semantic Scholar1秒に1リクエスト不要(APIキーで100/秒)

注意事項

  • arXivはAtom XMLを返します — ヘルパースクリプトかパース用スニペットを使ってクリーンな出力を得てください
  • Semantic ScholarはJSONを返します — python -m json.tool にパイプして読みやすくしてください
  • arXiv ID: 旧形式 (hep-th/0601001) と新形式 (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 12 individual skills — each has its own dedicated page.

関連スキル