agentleFS
AlpaZZAlpaZZ/office-agent-skills/skills/citation-verifier/SKILL.md

citation-verifier

Skill1 starsChanged 38 days agoMITView on GitHub

Verify citations and references in scientific documents to detect hallucinated, invalid, or mismatched sources. Extracts DOIs, arXiv IDs, PubMed IDs, ISBNs, and URLs from Word (.docx), BibTeX (.bib), Markdown (.md), LaTeX (.tex), and plain text, then validates them using CrossRef, arXiv, PubMed, and Open Library APIs. Detects AI hallucinations where real identifiers are paired with fabricated paper titles.

7 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

2 rules. 0 are common, 2 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 6 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Run the verification script against any manuscript or bibliography file:

    line 41
  2. Distinctive:

    When verifying DOIs or arXiv papers with title metadata (e.g.

    line 85

“Common” is measured: kept by at least 6 in 10 of the 6 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Citation & Reference Verifier

Detects and flags hallucinated, broken, or mismatched references in academic manuscripts and office documents.

Purpose

Large Language Models frequently invent convincing but nonexistent citations or pair real DOIs with fabricated paper titles. This skill scans documents, queries authoritative registries (CrossRef, arXiv, PubMed, Open Library), and produces structured audit reports.


When to Use

  • Verifying reference lists in research papers, theses, or technical reports.
  • Checking Word documents (.docx) containing native Zotero or legacy Mendeley Desktop CSL fields.
  • Validating BibTeX libraries (.bib) before submitting papers to journals.
  • Auditing Markdown (.md), LaTeX (.tex), or text drafts for broken URLs and hallucinated DOIs.
  • Running automated CI/CD citation checks on manuscripts.

Supported Identifiers and Registries

IdentifierVerification SourceDetection PatternNotes
DOICrossRef REST API10.xxxx/... or doi.org/...Checks registry existence and performs fuzzy title comparison.
arXiv IDarXiv APIarXiv:YYMM.NNNNN or arxiv.org/abs/...Checks official arXiv feed and resolves preprint titles.
PubMed PMIDNCBI E-utilitiesPMID: NNNNNNNQueries PubMed for biomedical literature.
ISBNOpen Library APIISBN: 978-...Validates books and monographs.
Publisher URLsHTTP GET/HEADNature, IEEE, Springer, ScienceDirect, etc.Verifies live HTTP 200/300 status codes.

Command Line Usage

Run the verification script against any manuscript or bibliography file:

# 1. Standard terminal check (compatible with Windows cp1252)
python scripts/verify_citations.py manuscript.docx

# 2. Generate a clean Markdown audit report for peer review
python scripts/verify_citations.py draft.md --format markdown --output audit_report.md

# 3. Export machine-readable JSON for CI/CD pipelines
python scripts/verify_citations.py library.bib --format json --output audit.json

# 4. Strict mode: exit code 1 on any failure or title mismatch
python scripts/verify_citations.py paper.tex --strict

# 5. Audit every cited sentence against retrieved abstract evidence
python scripts/verify_citations.py manuscript.docx --claim-audit \
  --strict-claims --format markdown --output claim-audit.md

# 6. Add lawful local full text for page/section evidence.
#    Filename must contain the normalized identifier, for example:
#    evidence/10.1234-example.pdf
python scripts/verify_citations.py manuscript.docx --claim-audit \
  --citation-map citation-map.json --evidence-dir evidence \
  --strict-claims --format markdown --output evidence-ledger.md

Options

  • --format {text,markdown,json}: Report format (default: text).
  • -o, --output PATH: Write report to file instead of stdout.
  • --email EMAIL: Contact email for the CrossRef polite API pool.
  • --strict: Return exit code 1 if any citation is missing or has a mismatched title.
  • --claim-audit: Map each cited sentence to evidence retrieved from the cited source. Numeric or author-year markers that cannot be mapped are reported as UNMAPPED_CITATION.
  • --strict-claims: Return exit code 1 unless every cited sentence reaches ABSTRACT_SUPPORT.
  • --evidence-dir PATH: Read user-supplied full-text PDF, Markdown, or text files and attach page/excerpt evidence to the ledger.
  • --citation-map PATH: Map numeric markers such as [1] to identifiers; unmapped markers remain failures.
  • --no-cache: Force live API requests bypassing .citation_cache.json.
  • --timeout SECONDS: Network timeout per request (default: 10).

Anti-Hallucination Logic

When verifying DOIs or arXiv papers with title metadata (e.g. from Zotero field codes or BibTeX entries), the verifier compares the local title against the authoritative title in CrossRef:

  1. [PASS]: Identifier exists and the paper title matches (similarity $\ge 0.65$).
  2. [WARN] METADATA_MISMATCH: Identifier exists, but the registry title differs significantly. This catches AI models that attach real DOIs to fake papers.
  3. [FAIL] NOT_FOUND: Identifier does not exist in the official registry.
  4. [ERR ] LOOKUP_ERROR: Temporary network failure or service downtime (never falsely marked as hallucinated).

Claim-to-evidence rule

Identifier verification and claim verification are separate gates. With --claim-audit, each sentence containing a DOI, PMID, arXiv identifier, numeric marker, or author-year marker is audited. The verifier only emits ABSTRACT_SUPPORT when the identifier is mapped in the same sentence and the sentence has conservative lexical overlap with retrieved abstract evidence. It emits ABSTRACT_NO_SUPPORT, EVIDENCE_UNAVAILABLE, or UNMAPPED_CITATION otherwise. These statuses are intentionally conservative: they never prove that a detailed, causal, quantitative, or negative claim is true. Those claims still require reading the full paper and recording page or section evidence.


Credits

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.