Coding

cite-check

Try it

Confirm every citation in a draft is real before it ships — extract each URL and arXiv ID and fetch it to prove it resolves (phase 1), then optionally check...

What it does

Confirm every citation in a draft is real before it ships — extract each URL and arXiv ID and fetch it to prove it resolves (phase 1), then optionally check the source actually backs the claim next to it via a local NLI model (phase 2). Exit non-zero on any failure so it drops into a publish pipeline as a blocking gate.

The skill document

cite-check

Agents fabricate citations — a plausible-looking link or an arXiv ID that does not exist, dropped into otherwise good copy that nobody checks. A rule a human has to remember ("verify every URL") is not a guard. This is the guard.

Two phases:

  • Phase 1 ({baseDir}/cite_check.py) — the resolve check. Is the source real?
  • Phase 2 ({baseDir}/claim_check.py) — the support check. Does the source actually back the claim beside it? Catches misattribution.

Phase 1 needs only httpx (pip install httpx). Phase 2 additionally needs beautifulsoup4, pymupdf, and a local NLI cross-encoder (via sentence-transformers/transformers) — heavier, first run downloads the model.

When to use this

Run it as a blocking gate before publishing anything with citations — a research note, a post, an email. Phase 1 catches dead links and fabricated arXiv IDs; phase 2 catches a real source cited for something it never says.

How to use it

Phase 1 — do the citations resolve?

python3 {baseDir}/cite_check.py draft.md          # check a file
cat draft.md | python3 {baseDir}/cite_check.py     # stdin
python3 {baseDir}/cite_check.py draft.md --json    # machine-readable
python3 {baseDir}/cite_check.py draft.md --strict  # also fail if NO citations

Exit 0 when every citation resolves, 1 when any fail — drops into a pipeline:

python3 {baseDir}/cite_check.py "$DRAFT" || { echo "unverified citation"; exit 1; }

URLs: HEAD then streamed-GET fallback, status < 400 passes, redirects followed. arXiv IDs: looked up against the official arXiv API (an abs/ page can 200 for a non-existent paper), so a fabricated ID fails.

Phase 2 — does each source back its claim?

python3 {baseDir}/claim_check.py draft.md
python3 {baseDir}/claim_check.py draft.md --json

Decomposes the draft into (claim, citation) pairs, fetches the real source text (arXiv full text/abstract; HTML via BeautifulSoup; PDF via pymupdf), scores claim-vs-source with a local NLI cross-encoder. Verdicts: SUPPORTED / PARTLY / UNSUPPORTED / UNVERIFIABLE. Exit 1 if anything is not SUPPORTED. Swap the model with CITE_CHECK_NLI_MODEL.

Notes for the agent

  • Reference the scripts as {baseDir}/cite_check.py / {baseDir}/claim_check.py.
  • Phase 1 is fast and light; run it always. Phase 2 is heavier (model load) — use it when misattribution matters.
  • PARTLY / UNVERIFIABLE are "a human should read this", not hard fails.
  • Built by Workloft (https://workloft.ai/labs).

Related skills

Cite Holmes — deep research that interrogates its own sources (Verified Deep Research). Calibrates scope first (asks 3-5 sharp questions), plans sub-questions, searches iteratively across sources and languages, then machine-verifies every citation (five states: verified/partial/unverified/unreachable/invalid) before a confidence-graded report ships. Never outputs unverified references; treats fabricated DOIs, dead links and missing sources as first-class catch targets. Use whenever the user asks to "deep research", "look into", "investigate", "compare A vs B", "fact check", "verify this claim", "is it true that...", "check these references", "are these citations real", wants a research report with sources, or needs reliable multi-source answers — even if they never say the word "research".

2 installs

Audit and fix provenance in knowledge base notes. Ensure every factual claim has an inline citation with date and source.

1 installs

AI citability scoring and optimization. Analyzes web page content to determine how likely AI systems (ChatGPT, Claude, Perplexity, Gemini) are to cite or quote passages from the page. Provides a citability score (0-100) with specific rewrite suggestions.

Use when a paper is being shared or presented in a group meeting, lab seminar, or reading club and the user wants to vet it before diving in — e.g. says '这篇靠...

1 installs

Strictly judge whether a research paper is worth following, reading, or recommending. Use for paper triage, paper reviews, literature evaluation, arXiv scree...

3 installs

Scan markdown files and verify that all hyperlinks (both local files and remote URLs) resolve correctly. Use when you need to: (1) verify documentation before publishing, (2) check a repo README or wiki links, (3) audit markdown files for broken links before generating static sites or releasing content, (4) validate links in collected digital assets before archiving.