You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A bibliography toolkit for LaTeX, built as agent skills. Explore the repo to understand the project structure before making changes.
4
+
5
+
## General principles
6
+
7
+
Bias toward action. Do not spend excessive time exploring files or asking clarifying questions when the task is clear. Start implementing and iterate.
8
+
9
+
## Code changes
10
+
11
+
- When fixing bugs or implementing changes, do NOT fix things that aren't actually broken. If you're unsure whether something is a real bug, ask before implementing a fix. Never apply fixes for theoretical issues that can't occur in practice given the actual workflow.
12
+
- When making changes, always check README.md and other documentation files for references that need updating. Check for hardcoded magic numbers that should use existing config values.
13
+
14
+
## Code review
15
+
16
+
When asked to do a code review, only flag real actionable issues. Do NOT over-engineer fixes or apply unnecessary changes. When in doubt, propose the fix and wait for user approval before implementing.
17
+
18
+
## How it works
19
+
20
+
### bibtidy
21
+
22
+
In Claude Code, invoke with `/bibtidy refs.bib`. In Codex, ask it to use the `bibtidy` skill on a `.bib` file. The agent reads the file, dispatches parallel subagents to verify entries against Google Scholar and CrossRef (bundled `crossref.py`), then applies fixes sequentially with targeted edits. Every change includes the original entry commented out and one or more source URLs for verification.
23
+
24
+
## Versioning
25
+
26
+
Version is tracked in three files (`.claude-plugin/marketplace.json`, `.claude-plugin/plugin.json`, `pyproject.toml`). Update all three, then run `uv lock` to sync `uv.lock`.
27
+
28
+
## Development
29
+
30
+
The skill's tools live under `skills/bibtidy/tools/` in this repo. At runtime, determine which agent platform you are (Claude Code, Codex, etc.) and resolve the installed tools directory accordingly (e.g. `~/.claude/skills/bibtidy/tools` for Claude Code, `~/.codex/skills/bibtidy/tools` for Codex). To test local changes:
31
+
32
+
- Run `./tests/run_bibtidy_cc_tests.sh` — this syncs local tools to `~/.claude/skills/bibtidy/` before invoking Claude
33
+
- Run `./tests/run_bibtidy_codex_tests.sh` for the Codex end-to-end path
34
+
- Unit tests only: `uv run pytest tests/`
35
+
36
+
## Code style
37
+
38
+
- Keep code and comments plain, direct, and easy to scan. Avoid decorative formatting or cleverness that does not add meaning.
39
+
- Add comments only when they clarify intent, constraints, or a non-obvious choice. Skip comments that just restate the next line.
40
+
- Prefer small shared helpers and simple structure over repeated logic.
Copy file name to clipboardExpand all lines: README.md
+25-11Lines changed: 25 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,13 +1,17 @@
1
1
# bibtools
2
2
3
-
A bibliography toolkit for LaTeX, built as a [Claude Code](https://docs.anthropic.com/en/docs/claude-code)plugin.
3
+
A bibliography toolkit for LaTeX, built as agent skills. Available for [Claude Code](https://docs.anthropic.com/en/docs/claude-code)and [Codex](https://openai.com/index/introducing-codex/).
4
4
5
-
**[bibtidy](#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 semantic duplicates (e.g. a preprint and its published version cited separately).
5
+
**[bibtidy](#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.
6
6
7
7

8
8
9
9
## Install
10
10
11
+
Installation differs by platform. Claude Code uses the plugin marketplace; Codex uses native skill discovery.
12
+
13
+
### Claude Code
14
+
11
15
Add the marketplace in Claude Code:
12
16
13
17
```bash
@@ -26,13 +30,23 @@ Reload plugins:
26
30
/reload-plugins
27
31
```
28
32
29
-
## bibtidy
33
+
### Codex
34
+
35
+
Tell Codex:
30
36
37
+
```text
38
+
Fetch and follow instructions from https://raw.githubusercontent.com/mathpluscode/bibtools/main/.codex/INSTALL.md
31
39
```
32
-
/bibtidy refs.bib
40
+
41
+
## bibtidy
42
+
43
+
```text
44
+
Use bibtidy to validate and fix refs.bib
33
45
```
34
46
35
-
bibtidy verifies each entry against [Google Scholar](https://scholar.google.com/) and [CrossRef](https://search.crossref.org/), 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 a `% bibtidy:` URL for verification. We recommend using git to track changes. If using [Overleaf](https://www.overleaf.com/), this can be done with [git sync](https://docs.overleaf.com/integrations-and-add-ons/git-integration-and-github-synchronization). To remove bibtidy comments after review, ask Claude: "remove all bibtidy comments from refs.bib".
47
+
Or in Claude Code, use the slash command: `/bibtidy refs.bib`
48
+
49
+
bibtidy verifies each entry against [Google Scholar](https://scholar.google.com/) and [CrossRef](https://search.crossref.org/), 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](https://www.overleaf.com/), this can be done with [git sync](https://docs.overleaf.com/integrations-and-add-ons/git-integration-and-github-synchronization). To remove bibtidy comments after review, ask your agent to remove all `bibtidy` comments from the file.
36
50
37
51
Note that bibtidy assumes standard brace-style BibTeX like `@article{...}`. Parenthesized forms like `@article(...)` are not supported; convert them to brace style first.
38
52
@@ -294,15 +308,15 @@ After:
294
308
295
309
### General
296
310
297
-
**Do I need Claude Code?**
311
+
**Do I need a paid subscription?**
298
312
299
-
Yes. bibtools is currently a Claude Code plugin only. If there's demand to support other platforms (e.g. Codex), we'll consider adding it.
313
+
Claude Code requires a paid plan (there is no free tier). Codex offers a free tier, so you can use bibtools with Codex at no cost.
300
314
301
-
**Why a Claude Code plugin instead of a Python package?**
315
+
**Why an agent skill/plugin instead of a Python package?**
302
316
303
-
Building on Claude Code keeps the codebase small, the plugin reuses existing search and editing capabilities rather than reimplementing HTTP clients, parsers, and retry logic.
317
+
Building on agent-native search and editing keeps the codebase small. The skill/plugin reuses existing web, editing, and subagent capabilities rather than reimplementing HTTP clients, parsers, and retry logic.
304
318
305
-
bibtidy needs to search Google Scholar, CrossRef, and conference/journal sites. Google Scholar has no official API and bans scrapers; Semantic Scholar's public API (1,000 req/s) is shared globally so availability is unpredictable. Claude Code's built-in web search sidesteps both problems, no API keys, no shared rate limits. Citation metadata (title, authors, venue, year) is almost never behind a paywall, so Claude can simply visit the publisher page and read the correct information.
319
+
bibtidy needs to search Google Scholar, CrossRef, and conference/journal sites. Google Scholar has no official API and bans scrapers; Semantic Scholar's public API (1,000 req/s) is shared globally so availability is unpredictable. Agent environments with built-in web access sidestep both problems, no API keys, no shared rate limits. Citation metadata (title, authors, venue, year) is almost never behind a paywall, so the agent can simply visit the publisher page and read the correct information.
306
320
307
321
### bibtidy
308
322
@@ -314,7 +328,7 @@ You shouldn't, and that's by design. The point of bibtidy is to surface potentia
314
328
315
329
[CiteAudit](https://arxiv.org/abs/2602.23452) verifies bibliographic metadata but is a closed system. bibtidy is fully open-source, transparent (every change includes the original entry commented out and a source URL so you can verify exactly what changed and why), and it fixes issues (wrong authors, stale preprints, incorrect pages) directly in your .bib file rather than just flagging them.
316
330
317
-
[refchecker](https://github.com/markrussinovich/refchecker) verifies references against Semantic Scholar, OpenAlex, and CrossRef, and uses LLM-powered web search to flag fabricated references. It reports problems but does not auto-fix them. bibtidy applies corrections in place so you review a diff, not a report. bibtidy also upgrades stale arXiv/bioRxiv preprints to their published versions (even when the title changed on publication), and requires no setup beyond installing the plugin.
331
+
[refchecker](https://github.com/markrussinovich/refchecker) verifies references against Semantic Scholar, OpenAlex, and CrossRef, and uses LLM-powered web search to flag fabricated references. It reports problems but does not auto-fix them. bibtidy applies corrections in place so you review a diff, not a report. bibtidy also upgrades stale arXiv/bioRxiv preprints to their published versions (even when the title changed on publication), and requires no setup beyond installing the skill.
318
332
319
333
[bibtex-tidy](https://github.com/FlamingTempura/bibtex-tidy) reformats and deduplicates .bib files but does not verify metadata against external sources. bibtidy checks correctness, not just formatting.
0 commit comments