AI4Scholar Skill
Use this skill when the task is about literature discovery or citation work and the user wants AI4Scholar inside Codex rather than OpenClaw.
What this skill provides
- Semantic Scholar search, title match, paper detail, citations, references
- PubMed search and paper detail
- Google Scholar search
- arXiv, bioRxiv, and medRxiv search
- AI4Scholar auto-citation
Invocation
Run the bundled script:
node /Users/rr/.codex/skills/ai4scholar/scripts/ai4scholar.js <tool> '<json>'
If the JSON argument is omitted, the script reads JSON from stdin.
Supported tools
search_semanticsearch_semantic_snippetssearch_semantic_paper_matchget_semantic_paper_detailget_semantic_citationsget_semantic_referencessearch_pubmedget_pubmed_paper_detailget_pubmed_relatedsearch_google_scholarsearch_arxivsearch_biorxivsearch_medrxivdownload_arxivauto_cite
Examples
Semantic Scholar search:
node /Users/rr/.codex/skills/ai4scholar/scripts/ai4scholar.js search_semantic '{"query":"EGFR NSCLC brain metastases","max_results":5,"year":"2020-"}'
PubMed search:
node /Users/rr/.codex/skills/ai4scholar/scripts/ai4scholar.js search_pubmed '{"query":"non-small cell lung cancer brain metastases","max_results":5,"sort":"date"}'
Google Scholar search:
node /Users/rr/.codex/skills/ai4scholar/scripts/ai4scholar.js search_google_scholar '{"query":"osimertinib CNS efficacy brain metastases","max_results":5,"year_from":2020}'
Auto-citation:
node /Users/rr/.codex/skills/ai4scholar/scripts/ai4scholar.js auto_cite '{"text":"<academic paragraph>","citationStyle":"vancouver","field":"oncology"}'
Workflow
- Pick the narrowest AI4Scholar tool that matches the task.
- Prefer
search_semanticorsearch_pubmedfor standard literature discovery. - Use
search_semantic_paper_matchwhen the user gives a likely exact title. - Use
get_semantic_citationsorget_semantic_referencesfor citation chaining. - Use
search_arxiv,search_biorxiv, orsearch_medrxivfor preprints. - Use
auto_citeonly when the user wants citations inserted into prose. - Summarize results for the user instead of dumping raw JSON unless they ask for the raw output.
Notes
- The API key is loaded from
config.jsonin this skill directory, orAI4SCHOLAR_API_KEYif set. auto_citecan take 20-60 seconds.- If a tool call fails, include the API error in your reasoning and fall back to adjacent tools only when that still serves the user's request.