bibtex-fetch
Skill43 starsChanged 7 months agoMITView on GitHub
Fetch BibTeX entries from arXiv / Semantic Scholar. Triggers: 'fetch bibtex', 'cite this paper', 'arXiv bibtex', '拉 bibtex', '获取引用', '引用这篇论文'. Not for citation format conversion (APA/MLA) or literature review.
In this repository17 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- context-auditSkill
- daily-summarySkill
- experiment-registrySkill
- handoffSkill
- init-projectSkill
- notion-lifeosSkill
- paper-analyzerSkill
- paper-self-reviewSkill
- project-reviewSkill
- remote-cluster-agentSkill
- research-leadSkill
- session-teamSkill
- sync-docsSkill
- team-digestSkill
- web-fetcherSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 3 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 44
Search Semantic Scholar for papers matching a query, then auto-fetch BibTeX for results that have arXiv IDs.
- Distinctive: line 61
When the user asks to cite a paper:
- Very specific: line 63
If they provide an arXiv ID or URL → use fetch
- Very specific: line 64
If they provide a paper title or description → use search
- Very specific: line 65
If they provide a .bib file and ask to check/fix entries → extract arXiv IDs from the file, fetch them, compare with existing entries
- Distinctive: line 70
Semantic Scholar API: No auth key needed. 0.5s delay.
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
BibTeX Fetch
Fetch correct BibTeX entries from arXiv (by ID) or Semantic Scholar (by title search). Zero dependencies — uses only Python stdlib.
Script
scripts/bibtex_fetch.py — single self-contained Python script.
Commands
Fetch by arXiv ID
Given one or more arXiv IDs, fetch metadata from the arXiv API and generate BibTeX.
python3 scripts/bibtex_fetch.py fetch <arxiv_id> [<arxiv_id> ...] [--key <bibkey> ...]Examples:
# Single paper
python3 scripts/bibtex_fetch.py fetch 2312.14135
# Multiple papers
python3 scripts/bibtex_fetch.py fetch 2312.14135 2505.14362 2408.15556
# With custom bibkeys
python3 scripts/bibtex_fetch.py fetch 2312.14135 --key vstar
# Full URL also works
python3 scripts/bibtex_fetch.py fetch https://arxiv.org/abs/2312.14135Output: Standard @article{...} BibTeX entries, ready to paste into .bib files.
Search by title
Search Semantic Scholar for papers matching a query, then auto-fetch BibTeX for results that have arXiv IDs.
python3 scripts/bibtex_fetch.py search "<query>"Examples:
python3 scripts/bibtex_fetch.py search "V* Guided Visual Search"
python3 scripts/bibtex_fetch.py search "DeepEyes Thinking with Images"Output: Top 5 search results with author, year, and arXiv ID, followed by BibTeX for all results that have arXiv IDs.
Workflow
When the user asks to cite a paper:
- If they provide an arXiv ID or URL → use
fetch - If they provide a paper title or description → use
search - If they provide a
.bibfile and ask to check/fix entries → extract arXiv IDs from the file,fetchthem, compare with existing entries
Implementation Details
- arXiv API: Batches up to 20 IDs per request. 1s delay between batches.
- Semantic Scholar API: No auth key needed. 0.5s delay. 429 auto-retry with 5s backoff.
- Bibkey generation:
{first_author_last_name}{year}{first_significant_title_word}(e.g.,wu2023guided) - Author format:
Last, Firststyle, max 5 authors thenand others - URL cleaning: Strips
https://arxiv.org/abs/prefix and version suffixes (v1,v2)
Error Handling
| Error | Behavior |
| arXiv ID not found | Prints % NOT FOUND: <id> to stderr, continues with next |
| Semantic Scholar 429 | Waits 5s and retries once |
| Network timeout | Prints error to stderr, continues with remaining IDs |
| Non-arXiv paper in search | Shows in results list but no BibTeX generated |
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

