bibtools
A bibliography toolkit for LaTeX, built as agent skills. Available for Claude Code and Codex.
bibtidy — Cross-check BibTeX entries against Google Scholar, CrossRef, and conference/journal sites. Upgrades arXiv/bioRxiv preprints to published versions (even when the title changed upon publication), corrects metadata (authors, pages, venues), and flags duplicate entries.

Install
Installation differs by platform. Claude Code uses the plugin marketplace; Codex uses native skill discovery.
Claude Code
Add the marketplace in Claude Code:
/plugin marketplace add mathpluscode/bibtools
Install the plugin:
/plugin install bibtools@mathpluscode-bibtools
Reload plugins:
/reload-plugins
To update later, refresh the marketplace and reload:
/plugin marketplace update mathpluscode-bibtools
/reload-plugins
Codex
Tell Codex:
Fetch and follow instructions from https://raw.githubusercontent.com/mathpluscode/bibtools/main/.codex/INSTALL.md
To update later, ask Codex to pull the latest version:
Reinstall/update my `bibtidy` skill from https://github.com/mathpluscode/bibtools, discarding local changes in `~/.codex/bibtools` and replacing `~/.codex/skills/bibtidy` with the correct symlinked setup.
Start a new Codex session afterwards so the refreshed SKILL.md is loaded into context.
bibtidy
In both Claude Code and Codex, use:
/bibtidy refs.bib
bibtidy verifies each entry against Google Scholar and CrossRef, fixes errors, and upgrades stale preprints to published versions. Every change includes the original entry commented out above so you can compare or revert, plus one or more % bibtidy: URL lines for verification. We recommend using git to track changes. If using Overleaf, this can be done with git sync. To remove bibtidy comments after review, ask your agent to remove all bibtidy comments from the file.
bibtidy's output is non-deterministic: the same .bib file can yield different fixes across runs, and Claude Code and Codex may reach different conclusions on the same entry. See the FAQ section below for more on why, and always verify changes via the % bibtidy: URLs before accepting them.
Note that bibtidy assumes standard brace-style BibTeX like @article{...}. Parenthesized forms like @article(...) are not supported. Special blocks such as @string, @preamble, and @comment are ignored by the parser.
How it works
Each entry goes through the following pipeline. A web search is used at most once per entry to keep runs fast. Each entry ends in one of four states: Clean (no change, no comment), Fix (patch applied with URLs + explanation), Not found (hallucinated, entry commented out), or Review (budget spent, entry unchanged, comment added for human attention).
flowchart LR
P1["Deduplicate"]
P2["Query CrossRef"]
HAS{"Found?"}
WA["Web search"]
P3{"Confident?"}
BUDGET{"Web searched?"}
WB["Web search"]
PATCH["Patch or no-op"]
REVIEW["Flag for review"]
P4["Post-fix deduplicate"]
P1 --> P2 --> HAS
HAS -- Y --> P3
HAS -- N --> WA --> P3
P3 -- Y --> PATCH
P3 -- N --> BUDGET
BUDGET -- N --> WB --> PATCH
BUDGET -- Y --> REVIEW
PATCH --> P4
REVIEW --> P4
Examples
Example 1: Hallucinated reference flagged and commented out (source)
Before:
@article{wang2021identity,
title={On the identity of the representation learned by pre-trained language models},
author={Wang, Zijie J and Choi, Yuhao and Wei, Dongyeop},
journal={arXiv preprint arXiv:2109.01819},
year={2021}
}
After:
% bibtidy: NOT FOUND — no matching paper on CrossRef or web search; verify this reference exists
% @article{wang2021identity,
% title={On the identity of the representation learned by pre-trained language models},
% author={Wang, Zijie J and Choi, Yuhao and Wei, Dongyeop},
% journal={arXiv preprint arXiv:2109.01819},
% year={2021}
% }
Example 2: Hallucinated metadata corrected (source)
Before:
@inproceedings{aichberger2025semantically,
title={Semantically Diverse Language Generation},
author={Aichberger, Franz and Chen, Lily and Smith, John},
booktitle={International Conference on Learning Representations},
year={2025}
}