This project has been archived by its maintainers, and is no longer receiving any updates.
CitePair
An Agent Skill that checks whether each citation in a LaTeX paper is backed by the source it cites. It works with any AI agent that supports skills, such as Claude Code, Codex, and Cursor.
For every sentence with a citation, it opens the cited PDF and quotes the passage that supports the claim, with its page number, or says that it found none. It also flags references that are missing fields, that look made up, or that were retracted.
It never edits your paper. When something should change, it suggests the wording and you apply it.
Set up
git clone https://github.com/shiven2001/citepair.git
mkdir -p ~/.agents/skills
ln -sfn "$PWD/citepair/skills/citepair" ~/.agents/skills/citepair # Codex and other agents
~/.agents/skills is the shared folder many agents read. Some use their own folder instead, so link there too:
ln -sfn "$PWD/citepair/skills/citepair" ~/.claude/skills/citepair # Claude Code
ln -sfn "$PWD/citepair/skills/citepair" ~/.cursor/skills/citepair # Cursor
For any other agent, link skills/citepair into its skills folder. An agent without skill support can still use it: ask it to read skills/citepair/SKILL.md and follow it.
It needs Python 3.9 or later with pypdf, or uv. Nothing else has to be installed.
Use
- Compile the paper once, so the
.auxor.bblfile exists. - Put the PDFs of the cited works in a
references/folder inside the paper. File names do not matter: each PDF is matched by its bib key or its title. - Ask in plain words:
- "Does [12] support the sentences it's cited in?"
- "Check the citations in the second paragraph of the introduction."
- "Is mills2009defect a real reference? Was it retracted?"
- "Check every citation in the paper and write a report."
A question about one citation is answered in the conversation. A full check writes a report to reports/.
Verdicts
Each sentence gets its own verdict, because one source can support one sentence and not another.
- supported: the source states the claim (quoted, with its page number)
- partial: the source covers the topic, but the sentence says more than the source does
- not supported: the source says something else, or the work was retracted
- no data found: no PDF, or the PDF is a different work
References are looked up on Crossref, OpenAlex, Semantic Scholar, and arXiv. A reference counts as hallucinated only when its DOI or arXiv id points to a different paper, or when nothing close to it exists.
Command line (optional)
pip install citepair
citepair PAPER_DIR --ref 12 -o - # one reference, printed
citepair PAPER_DIR --file 1_intro.tex --paragraphs 2 -o -
citepair PAPER_DIR --online -o reports/paper.md # whole paper, with online lookups
The tool collects the evidence. The agent decides the verdict. citepair --help lists every option, and config.example.json shows the same settings as a config file. For faster online lookups, set CITEPAIR_MAILTO=you@example.org.
Tests
PYTHONPATH=skills/citepair/scripts python3 -m unittest discover -s tests
License
MIT. See LICENSE.
Metadata
Release files for citepair 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| citepair-0.1.0.tar.gz | 40.5 kB | Without provenance | Details for citepair-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| citepair-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for citepair-0.1.0-py3-none-any.whl |
Total release size: 76.2 kB
Release files / citepair-0.1.0.tar.gz
| Download URL | citepair-0.1.0.tar.gz |
|---|---|
| Size | 40.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c82a223d1a9014ec87d1c73bf3a53ce370bcbecf7cc2cd54269445938f9a5d0c
|
|
BLAKE2b-256 checksum How to use checksums |
362036ec5e83bfef1d4378eaf3b3bd683579be17548af52263b66e0ead899a59
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / citepair-0.1.0-py3-none-any.whl
| Download URL | citepair-0.1.0-py3-none-any.whl |
|---|---|
| Size | 35.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
37fc4c893ebae051d08754e48d5496c907bd77e6cef93583109eace538c68e5c
|
|
BLAKE2b-256 checksum How to use checksums |
e283b2a15bfad2df69c8740f6db3c173f56c7a7dd69b46fe1ac1b3e0982d2ccb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for citepair 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.