Skip to main content
Archived

This project has been archived by its maintainers, and is no longer receiving any updates.

CitePair: Does the cited paper actually say that?

PyPI Python License: MIT Agent Skill

"A citation is a promise. Check it."

  • CitePair is an open-source Agent Skill that checks every citation in a LaTeX paper against the PDF it cites, one sentence at a time.
  • For each sentence it quotes the passage that backs the claim, with its page number. If the source says less, says something else, or can't be found, it tells you that instead: partial, not supported, or no data found.
  • It looks every reference up on Crossref, OpenAlex, Semantic Scholar, and arXiv, and flags references that look hallucinated, are missing fields, or were retracted.
  • It works in Claude Code, Codex, Cursor, and any other agent that reads SKILL.md skills. Ask "does [12] support this sentence?" or "check every citation in the paper".
  • It never edits your paper. When something should change, it suggests the wording and you decide.
  • It is free and MIT licensed, and the evidence-gathering tool is plain Python with one dependency (pypdf).

Note: the verdict is the AI agent's judgment, so it can be wrong. Every verdict comes with the quote and page number, so you can check it in seconds.

CitePair checking five citations in the demo paper: two supported with quotes and page numbers, one partial, one not supported, and one hallucinated reference whose DOI points to a different paper.

The output above comes from the demo paper, which you can run yourself.

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

  1. Compile the paper once, so the .aux or .bbl file exists.
  2. 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.
  3. 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/.

To try it first, run examples/demo-paper/fetch-pdfs.sh and ask: "Check the citations in examples/demo-paper."

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.

Limitations

  • LaTeX only. Word, Google Docs, and Markdown papers are not supported.
  • You supply the PDFs. It does not download papers for you, so a reference without a local PDF gets no data found.
  • The agent can be wrong. The verdict is the AI agent's judgment. It always shows the quote and page number so you can check it in seconds.
  • Text only. A claim stated only in a figure, table, or equation, or a scanned PDF with no text layer, usually comes back as no data found.
  • Not every real reference has a record. Software, datasets, and standards often have none. They are marked not confirmed, never hallucinated.
  • What leaves your machine. Online lookups send only reference titles, DOIs, and arXiv ids, plus your email if you set CITEPAIR_MAILTO. Your paper's text is read by whichever AI agent you use.

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.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for citepair 0.1.1
File Size Uploaded Provenance Actions
citepair-0.1.1.tar.gz 42.5 kB Without provenance Details for citepair-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for citepair 0.1.1
File Interpreter ABI Platform Actions
citepair-0.1.1-py3-none-any.whl Python 3 none any Details for citepair-0.1.1-py3-none-any.whl

Total release size: 79.3 kB

Release files / citepair-0.1.1.tar.gz

Download URL citepair-0.1.1.tar.gz
Size 42.5 kB
Tags Source
SHA-256 checksum
How to use checksums
74b319edb613f344cb70b1ad421df770c502d349a051b08fd5bd4ea2df1c5c44
BLAKE2b-256 checksum
How to use checksums
e234168db3d39a835198b072ce59fce0259e4d6180d3912dba8b3e55514e8f2c
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.1-py3-none-any.whl

Download URL citepair-0.1.1-py3-none-any.whl
Size 36.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
89e0a0a131ba73f768f433cd20d3c1a9955fdaf69f1bbdeb219bb923a819d755
BLAKE2b-256 checksum
How to use checksums
1fe9e9aa19a0d1575283bd40c50f2b21dbfa5171dcd99dd587fdb83da79a1d86
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.1

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page