skills/59-shiquda-openalex-skill/openalex/SKILL.md
Use when the user asks about academic literature, research papers, scholarly works, authors, citations, institutions, journals, or any academic metadata. Trigger when users want to search for papers, find author profiles, track citations, discover related works, or explore academic topics. Also use when users mention DOIs, ORCIDs, h-index, publication venues, or research metrics.
npx skillsauth add brycewang-stanford/Awesome-Agent-Skills-for-Empirical-Research openalexInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use the openalex CLI to retrieve academic metadata from the OpenAlex API.
Invoke this skill when the user needs to:
First time using this skill? Read references/setup.md for installation and API key configuration.
The CLI must be built and available. Check with:
openalex --help
If openalex is not installed yet, install it first:
npm install -g openalex-skill
openalex --help
For installation, persistent API key setup, and first-run verification, see references/setup.md.
OpenAlex organizes data into 8 entity types:
works - research papers, articles, preprintsauthors - researchers and their profilessources - journals, conferences, repositoriesinstitutions - universities, research centerstopics - research areas and subjectspublishers - academic publishersfunders - funding organizationsconcepts - (legacy) subject classificationsID format: OpenAlex IDs start with W (e.g., W2626778328). The summary format displays reusable IDs on a secondary line:
- Attention Is All You Need (2017 | cited 6519)
id: W2741809807 | authors: Vaswani et al | doi: https://doi.org/10.48550/arXiv.1706.03762
Get ID from search results:
openalex works search "paper title" --per-page 1
# Copy the `id: Wxxxx` from the output
⚠️ ID usage restrictions:
cited-by, references, and related support both DOI and OpenAlex ID10.1038/nature12373 and doi:10.1038/nature12373 are normalized automatically for work lookups and helpersSearch for papers:
openalex works search "your query" --per-page 5
Get specific work by ID or DOI:
openalex works get W2741809807
openalex works get https://doi.org/10.1038/nature12373
openalex works get 10.1038/nature12373
Find author:
openalex authors search "Author Name" --per-page 3
Get author by ORCID:
openalex authors get https://orcid.org/0000-0002-3141-5845
Track citations:
# Papers that cite this work
openalex works cited-by W2741809807 --per-page 5
openalex works cited-by 10.1038/nature12373 --per-page 5
openalex works cited-by https://doi.org/10.1038/nature12373 --per-page 5
# Papers this work references
openalex works references W2741809807 --per-page 5
openalex works references https://doi.org/10.1038/nature12373 --per-page 5
# Related works
openalex works related W2741809807 --per-page 5
openalex works related https://doi.org/10.1038/nature12373 --per-page 5
Filter and sort:
openalex works list \
--filter publication_year:2024 \
--filter is_oa:true \
--sort cited_by_count:desc \
--per-page 10
Autocomplete (for non-works entities):
openalex institutions autocomplete "tsinghua"
openalex authors autocomplete "einstein"
Group by field:
openalex works group --by publication_year \
--filter author.id:A5070829652
Download full-text PDF:
# Download the best available open access PDF for a work
openalex works download https://doi.org/10.48550/arXiv.1706.03762
openalex works download 10.48550/arXiv.1706.03762
# Specify output filename
openalex works download W2741809807 -o paper.pdf
# Overwrite existing file
openalex works download W2741809807 --overwrite
The download command tries multiple sources in order:
primary_location.pdf_urlbest_oa_location.pdf_urlopen_access.oa_urlprimary_location.landing_page_urlbest_oa_location.landing_page_urllocations[].pdf_url or locations[].landing_page_urlDefault filename is based on DOI or OpenAlex ID (sanitized for filesystem safety).
The CLI defaults to summary format. For detailed format options, see references/output-formats.md.
Quick reference:
summary (default) - Concise one-line format, ~2KB for 5 resultsdetail - Human-readable with inline lists for repeated fieldsjson - Full structured payload, ~40KB-268KB per querybibtex - BibTeX entries for work records--field <path> - Client-side projection to extract specific fields--select <field> - Server-side selection to reduce network payloadCommon patterns:
# Extract specific fields
openalex works get W2741809807 --field title --field abstract
# Export a work as BibTeX
openalex works get 10.1038/nature12373 --format bibtex
# Combine server-side + client-side for efficiency
openalex works search "crispr" --select title --select cited_by_count \
--field title --field cited_by_count
Note: --field abstract and --select don't combine well; use --field abstract alone when you need abstract text.
# Start with summary to browse
openalex works search "graph neural networks" --per-page 5
# If user wants details on a specific paper, use detail format
openalex works get W2741809807 --format detail
# Or extract specific fields with inline author display
openalex works get W2741809807 \
--format detail \
--field title --field abstract --field authorships.author.display_name
# Find author
openalex authors search "Jacob Andreas" --per-page 3
# Get author details by ORCID to resolve stable identifier
openalex authors get https://orcid.org/0000-0002-3141-5845
# Then use author.orcid filter to get their works
openalex works list --filter author.orcid:0000-0002-3141-5845 \
--sort cited_by_count:desc --per-page 10
# Or use resolved author.id if available
openalex works list --filter author.id:A5070829652 \
--sort cited_by_count:desc --per-page 10
# Search for a paper, note the ID from the secondary line
openalex works search "attention is all you need" --per-page 3
# Use the ID (e.g., W2741809807) or DOI for citation commands
openalex works cited-by W2741809807 --per-page 10
openalex works references W2741809807 --per-page 10
If cited-by or references returns a 404, verify the work first with openalex works get <id-or-doi>.
A valid-looking W... id can still be missing upstream.
# Search for survey papers on a topic
openalex works search "LLM tool use survey" \
--filter publication_year:>2023 \
--filter type:review \
--sort cited_by_count:desc \
--per-page 5
# First, discover available fields
openalex works fields
# Then extract exactly what you need with detail format
openalex works search "retrieval augmented generation" --per-page 3 \
--format detail \
--field title \
--field abstract \
--field publication_year \
--field cited_by_count \
--field authorships.author.display_name
Search too broad? Add filters:
openalex works search "self-adaptive agent framework" \
--filter publication_year:>2022 \
--filter type:article \
--per-page 5
Have a DOI? Use direct lookup:
openalex works get https://doi.org/10.1038/nature12373
# Download by DOI or OpenAlex ID
openalex works download https://doi.org/10.48550/arXiv.1706.03762
openalex works download W2626778328 -o paper.pdf --overwrite
Download tries multiple sources in order: primary_location.pdf_url, best_oa_location.pdf_url, open_access.oa_url, then landing pages.
--select caveats:
select only supports root-level fieldsgroup and autocomplete do not support selectabstract and abstract_inverted_index are not selectable upstreamORCID format matters:
# Wrong: using full ORCID URL in filter
openalex works list --filter author.orcid:https://orcid.org/0000-0002-3141-5845
# Correct: bare ORCID value
openalex works list --filter author.orcid:0000-0002-3141-5845
# But ORCID URL works for 'authors get'
openalex authors get https://orcid.org/0000-0002-3141-5845
summary - no need to specify unless you want something else<entity> fields command to discover available field paths before querying--field projection to extract specific data efficiently--select for network efficiency when you know which fields you need--select and --field for optimal performance and presentation--per-page to control result count (default varies by endpoint)--all to auto-follow cursor pagination for list-style commands: syntax: field:value, field:>value, field:<value: syntax: field:asc or field:deschttps://orcid.org/ URL formauthor.orcid instead of author.idcited-by or references fails with 404, verify the work first with works getdetail or json when provenance mattersopenalex rate-limitThe CLI supports persistent configuration for API keys and other settings.
View current configuration:
openalex config show
Set API key (recommended):
openalex config set api-key your_key_here
Other config options:
openalex config set base-url https://api.openalex.org
openalex config set mailto [email protected]
View config file path:
openalex config path
Remove a setting:
openalex config unset api-key
Configuration is stored in ~/.openalex-skill/config.json. Environment variables (OPENALEX_API_KEY, OPENALEX_BASE_URL, OPENALEX_MAILTO) override stored config.
For works:
publication_year:2024 or publication_year:>2020is_oa:true (open access)type:article or type:reviewauthor.id:A5070829652author.orcid:0000-0002-3141-5845--format json if neededprimary_location.source.id:S123456 (journal)For authors:
last_known_institutions.id:I123456works_count:>100If a command fails:
works, authors, etc.): not =)--format json to see full error detailstools
Recommend AND run open-source AI tools, agents, Claude Code / Codex skills, and MCP servers for any stage of a literature review — searching, reading, extracting, synthesizing, screening, citation-checking, and paper writing. Use when the user asks "what tool should I use to..." OR "install/run/use <tool> to ..." for research/lit-review work: automating a survey or related-work section, PDF→Markdown extraction for LLMs (MinerU/marker/docling), PRISMA / systematic review (ASReview), citation-backed Q&A over PDFs (PaperQA2), wiring papers into Claude/Cursor via MCP (arxiv/paper-search/zotero servers), or chatting with a Zotero library. Ships a launcher (scripts/litrun.py) that installs each tool in an isolated venv and runs it. Curated catalog of 70+ vetted projects. 支持中英文(用于「文献综述工具选型」与「一键安装/运行」)。
development
Route empirical-research requests through the Auto-Empirical Research Skills catalog when this whole repository is installed as one skill in Codex, CodeBuddy, Claude Code, or another IDE. Use to choose and load the right vendored AERS skill for causal inference, econometrics, replication, data acquisition, manuscript writing, peer review and referee responses, citation checking, de-AIGC editing, or full empirical-paper workflows without reading the entire repository at once.
documentation
Use when the project collects primary data or runs a field, lab, or survey experiment, before the intervention begins — write the pre-analysis plan, size the sample from a power calculation, and register with the AEA RCT Registry. Apply after the design is chosen in aer-identification and before any outcome data are seen.
tools
Guide economists to authoritative data sources with explicit, confirmed data specifications before retrieval; interfaces with Playwright MCP to navigate portals and extract real data, not articles about data.