| name | ref-verify |
| description | Prevents citation hallucination in academic writing. Invoke when: finding papers to support a specific claim; verifying/checking/auditing existing citations or DOIs; confirming whether a paper actually says what the user claims it says ('is that what the paper says?', 'did they actually show X?'); adding a citation by describing a paper ('add a citation for the paper where X'); running a pre-submission reference sweep. Do NOT invoke for: formatting references in APA/IEEE style, general topic explanations, citation style questions, or prose editing. Selects Quick Screen (seconds per paper) or Full Audit (abstract fetch + claim check) automatically. |
ref-verify โ Reference Hallucination Guard
The specific failure this skill prevents: LLMs describe paper content from recalled training data rather than from what the abstract actually says. A paper gets attributed findings it doesn't contain, or cited for claims that appear nowhere in the text. The fix is one rule applied consistently:
Every content statement about a paper must come from a live-fetched abstract, quoted or paraphrased verbatim. If you cannot fetch the abstract, say so explicitly โ never fill the gap with recalled description.
Mode Decision
Pick the mode before doing any work. The choice controls cost and depth.
User provides DOI(s) for sanity check?
โโ โค10 refs โ Quick Screen all
โโ >10 refs โ Quick Screen all; Full Audit only MISMATCH/DEAD results
User says "find papers on X" or "cite papers supporting claim Y"?
โโ Full Audit (searching from scratch requires content verification)
User says "verify/check my reference list" or pre-submission audit?
โโ โค5 refs โ Full Audit all
โโ >5 refs โ Quick Screen all first; Full Audit MISMATCH/DEAD + any ref
cited for a specific factual claim
User is writing inline and adds a single citation from memory?
โโ Quick Screen minimum; Full Audit if citing for a specific claim
The expensive part is Full Audit (5-layer, abstract fetch). Quick Screen costs ~5s per paper. Only escalate to Full Audit when the task genuinely requires content verification.
Executable Engine
Use this as a skill-level workflow. Do not build or require MCP for this path.
The CLI is an execution engine the skill can call from the terminal; the manual
protocol remains the fallback and the source of truth for layers the CLI does
not yet cover.
CLI Availability Check
Before a DOI-backed check, see whether the executable engine is available:
ref-verify --help
npx skills add does not pip-install the Python CLI. If the console script is
unavailable, do not treat that as a verification result.
If the console script is unavailable but the repository source is present, use:
PYTHONPATH=src python3 -m ref_verify.cli --help
If both commands fail, follow the manual fallback protocol below. Do not pretend
the CLI ran, and do not invent a result from memory.
CLI-first workflow
Use the CLI first when the user provides a DOI or asks whether a DOI-backed
abstract supports a specific factual claim. Current CLI scope is CrossRef
metadata verification plus DOI-bound abstract claim checks. Claim checks use
CrossRef first, then DOI-bound OpenAlex, Semantic Scholar, and PubMed fallback when
CrossRef has no abstract.
CrossRef metadata screen:
ref-verify verify-doi <doi> \
--title "<provided title>" \
--first-author <provided-first-author-last-name> \
--year <provided-year> \
--json
Source-checkout fallback:
PYTHONPATH=src python3 -m ref_verify.cli verify-doi <doi> \
--title "<provided title>" \
--first-author <provided-first-author-last-name> \
--year <provided-year> \
--json
verify-doi exits 0 only for PASS; WARN and REJECT return non-zero.
Supplying only a DOI checks that CrossRef resolves but is not enough to pass
metadata verification.
Route the result:
PASS: report the metadata match, then continue Layer 4 DOI landing-page
resolution and Layer 5 retraction checks when the selected mode requires them.
WARN: report the missing or weak metadata, then continue manual fallback for
the missing layers instead of silently accepting the reference.
REJECT: stop using that citation as verified; report the mismatch and ask
for a corrected DOI or citation unless the user explicitly wants alternatives.
Single claim check against a DOI abstract:
ref-verify check-claim <doi> --claim "<specific factual claim>" --json
Source-checkout fallback:
PYTHONPATH=src python3 -m ref_verify.cli check-claim <doi> --claim "<specific factual claim>" --json
By default, check-claim uses CrossRef first. If CrossRef has no abstract, it
tries DOI-bound OpenAlex, Semantic Scholar, and PubMed fallback sources. Use
--source crossref, --source openalex, --source semantic-scholar, or --source pubmed for
source-specific debugging. Explicit non-CrossRef source selection bypasses
CrossRef, so it can isolate an OpenAlex, Semantic Scholar, or PubMed failure.
Route the result:
ACCEPT: quote the CLI evidence and continue any required manual DOI
resolution, second-source existence, and retraction layers.
WARN or PARTIAL: report what the selected abstract source did and did not
support, then continue manual fallback when more layers are required.
UNVERIFIABLE: no trusted DOI-bound abstract evidence was available from the
attempted CLI sources. Continue the manual fallback chain below instead of
treating the claim as rejected or supported.
For JSON output, use abstract_source, source_attempts, and error_code to
decide the next step:
CLAIM_SUPPORTED: explicit abstract support found.
CLAIM_NOT_EXPLICIT: an abstract was available, but the claim was not
explicitly supported.
CLAIM_AMBIGUOUS: numeric evidence or context exists, but binding is
ambiguous.
NO_ABSTRACT: attempted DOI-bound sources did not provide abstract text.
DOI_NOT_FOUND: selected source did not find a DOI-bound record.
DOI_MISMATCH: the primary or explicitly selected DOI-bound record did not
match the requested DOI.
SOURCE_API_ERROR, SOURCE_TIMEOUT, SOURCE_RATE_LIMITED, SOURCE_UNSUPPORTED: source lookup
failed, timed out, was rate-limited, or could not be used.
The CLI does not replace Layer 4 DOI landing-page resolution, two-source
existence checks, or retraction checks. Continue the manual protocol for those
layers when the selected mode requires them.
Quick Screen โ metadata + DOI sanity check
Use when the user provides a DOI or full citation and wants a sanity check.
- Hit CrossRef:
https://api.crossref.org/works/{DOI}
- Compare returned title + first-author last name against what user provided
- Fetch
https://doi.org/{DOI} โ confirm it resolves and lands on the right paper
- Report one line per reference:
Smith et al. (2021) 10.1234/example โ PASS (title/author match, DOI resolves)
Jones (2019) 10.5678/other โ MISMATCH (CrossRef: Jones & Lee 2019, not Jones alone)
Kim (2023) 10.9999/fake โ DEAD DOI
Escalate to Full Audit if: DOI resolves to a different paper, any field mismatches, or user is citing for a specific factual claim.
Full Audit โ for literature search or pre-submission check
Use when: searching for papers to support a claim, or doing a final citation sweep.
Run all five layers per paper. The layers are ordered by what they catch โ don't skip forward.
Layer 1 โ Existence
Search two sources independently:
- CrossRef:
https://api.crossref.org/works?query.bibliographic={title+author}&rows=5
- Semantic Scholar:
https://api.semanticscholar.org/graph/v1/paper/search?query={title+author}&fields=title,authors,year,externalIds,abstract&limit=5
- arXiv for preprints:
https://export.arxiv.org/api/query?search_query=ti:{title}&max_results=3
A paper is confirmed only if titles essentially match and first-author last name agrees across two sources.
- Two-source hit โ
CONFIRMED
- One-source โ
SINGLE-SOURCE โ โ proceed with caution, note in output
- Zero โ
NOT FOUND โ โ stop; report clearly; do not invent a substitute
Layer 2 โ Metadata
Extract from confirmed sources and compare: title, all authors (last names), year, journal full name, DOI, volume/pages (mark [NOT IN SOURCE] if absent). If any field differs between sources, show both โ do not silently pick one.
Layer 3 โ Content Traceability โ most important layer
This is where the skill's core value lies. The goal is not just "does this paper exist" but "does this paper actually contain the claim being attributed to it."
Fetch the abstract using this priority order:
- CrossRef raw JSON:
https://api.crossref.org/works/{DOI} โ check the abstract field
- OpenAlex:
https://api.openalex.org/works/doi:{DOI}?mailto=verify@ref-verify.local โ reconstruct abstract_inverted_index
- Semantic Scholar: append
&fields=abstract to your S2 DOI lookup
- Open-access fallback:
https://api.unpaywall.org/v2/{DOI}?email=verify@ref-verify.local โ check is_oa and oa_locations
- arXiv fallback for preprints:
https://export.arxiv.org/api/query?id_list={arxiv_id}
- PubMed Central for life/bio papers:
https://www.ncbi.nlm.nih.gov/pmc/articles/{PMCID}/
After fetching, check: does the abstract contain the specific claim being cited?
- Abstract explicitly contains the claim (quote it verbatim) โ
CONTENT: SUPPORTED
- Abstract is about the topic but doesn't make the specific claim โ
CONTENT: PARTIAL โ quote what it actually says
- Abstract contradicts the claim โ
CONTENT: CONTRADICTED โ do not use this citation
- Abstract not accessible after trying all 5 sources โ
CONTENT: UNVERIFIABLE โ user must check full text
The rule that cannot be relaxed: if you describe what a paper "shows" or "demonstrates" or "reports," you must quote or directly paraphrase the fetched abstract text. Summarizing from memory is not permitted even if you feel confident.
Layer 4 โ DOI Resolution
Fetch https://doi.org/{DOI}. Confirm the landing page matches the expected paper. A 403 (bot-blocked) from a URL slug containing the title and volume is not a dead link โ note it as paywalled. A redirect to an unrelated page is a critical failure.
Layer 5 โ Retraction
Search "{first author last name}" "{journal name}" retraction and check the DOI landing page for retraction banners. A retracted paper must not be used as a primary source.
Output Format
Quick Screen: one line per reference (see above).
Full Audit: one card per paper, then a summary table.
REFERENCE AUDIT
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Paper: [Title from live source โ not from memory]
DOI: [DOI] โ [โ Resolves | โ Dead | โ Wrong paper | โ Paywalled-403]
Authors: [Full list from CrossRef/OpenAlex/S2]
Year: [Year] โ Source: CrossRef | S2 | arXiv
Journal: [Full name]
EXISTENCE: โ Confirmed (sources) | โ Single-source | โ Not found
METADATA: โ Consistent | โ Discrepancy: [field: value-A vs value-B]
CONTENT: โ Supported โ "[verbatim abstract excerpt]"
โ Partial โ abstract says: "[what it actually says]"
โ Contradicted | โ Unverifiable (tried CrossRef/OpenAlex/S2/Unpaywall/arXiv/PubMed)
RETRACTION: โ None found | โ Retracted
VERDICT: ACCEPT | WARN | REJECT
Reason: [one sentence โ what's missing or wrong]
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
CONTENT field must show either a verbatim excerpt or an explicit "Unverifiable" โ never a summary written from memory.
ACCEPT: two-source confirmed, DOI resolves to right paper, content supported by fetched abstract, no retraction.
WARN: solvable issue โ single source, partial content match, or abstract inaccessible after trying all fallbacks. Safe to use if user verifies the flagged item.
REJECT: DOI dead or resolves to wrong paper, paper not found anywhere, content contradicted, or retraction confirmed.
Summary table after all cards:
SUMMARY
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
1. Smith et al. (2021) โ ACCEPT
2. Kim & Park (2019) โ WARN (abstract unverifiable; try PMC or institutional access)
3. Zhang (2023) โ REJECT (DOI resolves to different paper)
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
X / Y verified. Z need attention.
Anti-Hallucination Rules
- Never recall a DOI from memory โ fetch from CrossRef or S2.
- Never describe paper content without a fetched abstract to quote from.
- Never fill in missing metadata by guessing or pattern-matching.
- If two sources disagree, show both โ do not choose silently.
- If the abstract is inaccessible after all five fallback sources, mark UNVERIFIABLE and stop โ do not substitute a description from memory.
Edge Cases
Preprint vs. published: record both DOIs; prefer published for citation; note if title changed between versions.
Author name variants: "J. Smith" vs "John Smith" โ flag but do not merge; let user confirm.
Conference proceedings: volume/pages often absent from CrossRef; mark [NOT IN SOURCE], not guessed.
S2 rate limiting: wait 2s and retry once; if still failing, use CrossRef as primary and note single-source limitation.