/hallucite:hallucitefrom hallucite
Detects fabricated references in academic paper PDFs by extracting citations and verifying them against DBLP, CrossRef, DOI, arXiv, OpenAlex, and Semantic Scholar without an LLM, then triaging unverified residues via web search.
Ships in hallucite. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Detect fabricated references in academic paper PDF files. Three stages: extract and verify use no
LLM (verification queries the online databases unless --offline restricts it to the local ones);
triage is the only step that uses an LLM (cloud or local), run
on the references that no database could confirm.
This skill exists to catch fabricated references; it must never produce one. A hallucination
verdict is a serious accusation against named authors, so every claim you make must trace to real
tool output, not to your own reading of a .bib/.bbl/PDF.
db_verification record
the audit actually wrote, or (b) Stage 3 web-search evidence you actually gathered. Eyeballing a
bibliography is not a verification method and never yields a verdict.HALLUCITE_BOOTSTRAP_FAILED: line as a blocking error. Stop,
report the failure verbatim to the user, and do not work around it by inspecting the references
yourself. "The tool would not run" is the correct, honest outcome -- not a hand-written report.check-env) first. If it does not print HALLUCITE_OK, the environment is
not ready; surface its message and stop.HALLUCITE_EXTRACTION_UNSUPPORTED: <paper_id>: <problems> and exits 4. The problems it detects
are a References heading it did not recognize, no entries under the heading, an entry number the
bibliography prints that no extracted reference carries, a number the text cites beyond the last
extracted entry, and two entries merged into one. Stop there and tell the user that hallucite
does not support this paper's template, quote the problems, and say that the skill needs to be
updated to handle it. Check first that the installed hallucite is the current release, because an
older install can lack a fix the current one has. Do not triage that paper, read its bibliography
by hand, or patch the extraction to get past it: none of these yields a verdict. The paper is not
"without references" and its references are not "sound". The other papers in the same run were
extracted normally, and their results stand. If the user explicitly asks to go on with the
references that were extracted, triage them; the report then marks the paper as not fully
checked.Always invoke the pipeline through the run.sh wrapper. It resolves a Python 3.10 or newer, so
you never call a bare python/mise/uv that may be missing from the plugin's shell. It is the
single supported entry point.
resolve_hallucite_run() {
# 1. Claude Code plugin install.
if [ -n "${CLAUDE_PLUGIN_ROOT:-}" ]; then
candidate="${CLAUDE_PLUGIN_ROOT}/skills/hallucite/scripts/run.sh"
[ -x "$candidate" ] && { printf '%s\n' "$candidate"; return 0; }
fi
# 2. Codex repo-local skill discovery shim.
candidate=".agents/skills/hallucite/scripts/run.sh"
[ -x "$candidate" ] && { printf '%s\n' "$candidate"; return 0; }
# 3. Direct repo clone.
candidate="skills/hallucite/scripts/run.sh"
[ -x "$candidate" ] && { printf '%s\n' "$candidate"; return 0; }
# 4. Claude Code plugin cache (version-scan fallback for when CLAUDE_PLUGIN_ROOT
# is unset in the tool shell, which skips branch 1 even on a valid install).
# Choose the highest cached version (sort -V) so a marketplace update always
# wins here -- and so a stale Codex cache copy can never be preferred over a
# current Claude install.
claude_cache_root="${CLAUDE_CONFIG_DIR:-$HOME/.claude}/plugins/cache"
if [ -d "$claude_cache_root" ]; then
candidate="$(find "$claude_cache_root" -path '*/hallucite/hallucite/*/skills/hallucite/scripts/run.sh' -type f 2>/dev/null | sort -V | tail -n 1)"
[ -n "$candidate" ] && { printf '%s\n' "$candidate"; return 0; }
candidate="$(find "$claude_cache_root" -path '*/hallucite/*/skills/hallucite/scripts/run.sh' -type f 2>/dev/null | sort -V | tail -n 1)"
[ -n "$candidate" ] && { printf '%s\n' "$candidate"; return 0; }
fi
# 5. Codex plugin cache. Prefer the hallucite marketplace's hallucite, then any
# marketplace's hallucite, choosing the highest cached version (sort -V, so
# 1.10.0 beats 1.9.0 -- plain lexicographic sort would invert them).
cache_root="${CODEX_HOME:-$HOME/.codex}/plugins/cache"
if [ -d "$cache_root" ]; then
candidate="$(find "$cache_root" -path '*/hallucite/hallucite/*/skills/hallucite/scripts/run.sh' -type f 2>/dev/null | sort -V | tail -n 1)"
[ -n "$candidate" ] && { printf '%s\n' "$candidate"; return 0; }
candidate="$(find "$cache_root" -path '*/hallucite/*/skills/hallucite/scripts/run.sh' -type f 2>/dev/null | sort -V | tail -n 1)"
[ -n "$candidate" ] && { printf '%s\n' "$candidate"; return 0; }
fi
printf '%s\n' 'HALLUCITE_BOOTSTRAP_FAILED: cannot locate hallucite scripts/run.sh' >&2
return 3
}
RUN="$(resolve_hallucite_run)" || exit $?
Subcommands: run.sh check-env (preflight), audit ..., triage ..., lint ..., python ....
On success it is transparent (runs the script, forwards its exit code); on a setup failure it
prints HALLUCITE_BOOTSTRAP_FAILED: <reason> to stderr and exits non-zero -- that sentinel means
no audit ran, so there is nothing to interpret.
There is nothing to install: extraction, parsing, verification and the DBLP ingest are all
standard library. Set $HALLUCITE_PYTHON to pin a particular interpreter. (In a repo clone you
can equivalently use the mise run ... tasks.)
"$RUN" check-env # must print `HALLUCITE_OK: <python> (Python <version>)`
If it prints HALLUCITE_BOOTSTRAP_FAILED: instead, relay that line to the user and stop -- see the
stop conditions above.
check-env also warns when pdftotext is missing or when there is no offline DBLP mirror at
$HALLUCITE_DBLP. Neither is fatal, and both change what an audit can conclude: without the
mirror, every reference carries a DBLP failure rather than a clean negative.
pdftotext (poppler). Nothing else: the pipeline is standard library only.mise run fetch-dblp-dump downloads
dblp's newest monthly snapshot (about 1 GB, checked against the MD5 the release publishes; add
-- --daily for dblp.org's daily dump, which is fresher but needs a headed browser to answer
the bot check fronting it) and mise run build-dblp ingests it into a ~3.8 GB SQLite+FTS5 file
in about five minutes. Elsewhere, run build_dblp.py <dump> --out ~/hallucite/dblp.db directly. Keep it
outside protected dirs such as ~/Downloads; set $HALLUCITE_DBLP to store it elsewhere.A directory of PDF files, or a single <file>.pdf. Given a bare paper number or name, resolve it
against the directory the user means (ask if ambiguous).
"$RUN" audit <pdf-file-or-dir> --out <outdir>
Writes <outdir>/<paper_id>.json (every reference, parsed fields plus per-database verification)
and <outdir>/summary.json. The offline DBLP DB defaults to $HALLUCITE_DBLP (else
~/hallucite/dblp.db); override it with --dblp PATH. Flags: --offline (no network; the offline
DBLP mirror stays live), --disable-dbs LIST (disable named backends, comma-separated),
--no-verify (extraction only), --retry-degraded N (re-check references a backend failed to
answer for; default 1), --no-candidates (skip the CrossRef lookup that attaches candidate real
records to unverified references; implied by --offline). Extraction is lineno- and
two-column-aware and handles numeric, bracket-label, and author-year bibliographies; the target is
0 unparsed references. The offline DBLP file is the first backend asked, over every record
sharing the cited title rather than the one a search ranks first, and a reference the backends miss
is re-verified once with its line-break hyphens removed before it lands in the worklist.
Read the run's closing warnings. Verification stops at the first backend that matches, so later
backends are only ever asked about the residue -- the same references that reach triage -- and that
is where rate limiting lands. The audit therefore marks any reference a backend failed to answer
for as degraded and prints a per-backend tally at the end. A backend that answered nothing
weakens every not_found it should have had a say in; if the tally looks bad, re-run before
triaging rather than judging references on an incomplete check. Extraction problems are printed
per paper as they occur and repeated at the end as HALLUCITE_EXTRACTION_UNSUPPORTED: lines, and
each JSON record carries them under extraction.problems; see the stop conditions above.
References are named by the handle a reader can actually find. A numbered bibliography keeps its
printed [12]; an author-year one is named by its citation key (de Dieu et al. (2025c)), since
nothing is numbered in the paper. A trailing [#n] is hallucite's own index, appears nowhere in
the paper, and is only what triage record takes as its <number>.
If this exits non-zero, stop and report it, and do not infer verdicts by hand (see the stop
conditions above). Exit 3 with a HALLUCITE_BOOTSTRAP_FAILED: line means no usable Python, 1 means
a paper failed and produced no output, and 4 with HALLUCITE_EXTRACTION_UNSUPPORTED: lines means
hallucite does not support the named papers' bibliography layout.
"$RUN" triage worklist --out <outdir> # -> <outdir>/triage_worklist.json
"$RUN" triage worklist --pending --out <outdir> # only refs not yet recorded
"$RUN" triage worklist --paper <paper_id> --out <outdir> # one paper's slice
"$RUN" triage status --out <outdir> # per-paper done / pending counts
These read the per-paper JSON the audit has already written, so Stage 3 can run on finished
papers while Stage 1+2 is still processing the rest. Verdicts accumulate per <paper_id>:<number>,
and --pending surfaces only the references that have not been recorded yet.
To fan triage out across papers, give each worker its own slice with
worklist --paper <paper_id> (exact id match, written to triage_worklist-<paper_id>.json)
rather than the shared worklist -- a worker that self-filters the corpus-wide file by id can grab
the wrong paper (e.g. paper6 vs paper66); the per-paper slice removes that step and errors out
on an unknown id. record takes an exclusive lock on the verdicts file, so concurrent workers can
record in parallel without losing each other's verdicts.
For each entry (references whose db_verification.status is anything other than verified --
not_found, mismatch, or unparsed), investigate with parallel web queries and classify it:
candidates
(CrossRef's closest real records, with their DOIs and a title similarity), matched (what a
backend matched, and the authors it holds) and, for a mismatch, authors_absent (the cited
names no author of that record accounts for). Check those before searching: a high-similarity
candidate usually is the cited work, and confirming or rejecting it is faster and more reliable
than a blank-page search. For a mismatch, open the matched record first and diff it field by
field -- and confirm it is even the same work, since a backend can match a thesis, preprint, or
extended abstract that shares its paper's title.skipped_dbs lists the backends that were
never asked: a not_found with DBLP in that list is a title too short to query the mirror
with, not a mirror negative, and question 1 below is still wide open. dblp_record is the
mirror's own year, venue, pages and DOI where exactly one record carries the cited title.
dblp_nearest is offered where no record carries it: the mirror's nearest title, within two
word edits and with every cited author on it -- the shape of a slipped or added content word
("in-depth study" for "In-depth Empirical Study"), which you confirm rather than the matcher.
identifiers says what each cited DOI or arXiv id resolves to and whether that is the cited
title: a dead identifier is signal (D); one that resolves to a different work is a slipped digit
or a real record stapled to the wrong citation, and the resolved title tells you which; one that
resolves to the cited title says the work exists, whatever the databases made of its authors.degraded: true means the check was incomplete -- a backend errored or rate-limited, so the
databases that would have matched this reference may never have been asked. Its not_found is
not evidence of anything. A fabrication verdict on a degraded entry must rest entirely on your
own searches; if those are inconclusive, the answer is unclear, not likely-hallucinated.https://api.crossref.org/works/<doi>; a 404, or resolution to an unrelated
paper, is a strong fabrication signal), then the exact title in quotes plus the first-author
surname (and site:arxiv.org "<title>"), then the exact title in quotes alone and on Google
Scholar.title_match=no, run a fuzzy metadata query --
https://api.crossref.org/works?query.bibliographic=<title+first+authors>&rows=5&select=title,author,container-title,issued,DOI
-- and a plain-keyword pass. A cited "LLMs as assistants in software architecture design" that a
quoted search could not find resolves this way to "Large Language Models as Assistants in
Software Architecture Design" in IEEE Software, with a DOI.Classify title-first. Two independent questions, asked in order -- do not collapse them:
Match the title on meaning, not exact string, in two steps:
title_match=yes, normally real-*): a present
or absent subtitle or volume designation, spacing, hyphenation (including line-break hyphens such
as distribu-tional), capitalization, punctuation, & vs and, diacritics, ligatures, other
OCR/extraction artifacts, and British/American spelling. An abbreviation and its expansion of
the same term are the same title too -- LLMs for Large Language Models, ML for machine learning, an expanded or contracted venue acronym. These name the same thing, so they do not
change what the work is about; do not treat them as the wrong-content-word case below.PLS where
the real paper says cluster analysis) still counts as title_match=yes only if an independent
identifier pins the citation to one specific real publication: a DOI that resolves to it, or an
exact author+venue+year(+pages) match. Then record that publication as matched_title and use
partial-match -- the wrong title is the citation error. If only a loose resemblance links it to a
real work -- a shared title template, the same topic, or a single shared author, with no resolving
identifier -- the cited title names no real publication: title_match=no (likely-hallucinated,
or unclear if you cannot tell). The rescue covers one or two slipped words, never a wholly
different title: when the cited and the real title share little beyond a template, the
identifier is not pinning a garbled title to its work -- it is a real record stapled to an
invented title, and that is title_match=no.Then assign the category:
real-published / real-grey-literature / real-preprint-or-unpublished (low): a publication
with the cited title exists and the metadata matches.partial-match (citation error, medium): a publication with the cited title exists, but one
or two metadata fields are wrong -- wrong year, an off-by-one DOI digit, an abbreviated or
swapped venue, a misspelled/missing co-author, a wrong first name. State the matched
publication's actual title in the finding to prove the title matched. Regular human mistakes
look like this: a real, locatable work with a slipped field. They do not invent titles.likely-hallucinated (high): no publication bears the cited title after a thorough escalating
search. A real author (or real author group) or a real venue attached to a non-existent title is
the canonical case -- do not rescue it to partial-match because the authors/venue happen to
match some other real paper. State explicitly in the finding that no work bears the cited title.unclear (leave for a human): you cannot establish whether a work with the title exists (e.g. an
obscure/predatory venue, an embargoed artifact). A valid verdict -- use it rather than guessing
either way.Independent fabrication signals (note each that applies in the finding): (T) no publication has
the cited title -- the decisive one; (A) the author set/order never co-published, or
initials-only generic authors; (V) an impossible or non-existent venue/year/volume (e.g. a
proceedings entry and page range that do not exist, a defunct journal); (D) a DOI that 404s or
resolves to an unrelated paper, or a placeholder arXiv id such as 2310.XXXX. A non-existent
title (T) is itself a fabrication signature and grounds to flag the paper for desk-rejection --
even when the authors and venue are otherwise real (a real author group on an invented title is the
hardest case to catch); A, V, and D strengthen the case but are not required. Do not push borderline
cases to real-* to make the report look clean.
A mismatch whose authors_absent list names people is signal (A) already found for you: a
backend matched the cited title (matched carries the record and the authors it holds), and the
names in that list pair with no author of it. Confirm them against the publication itself, then say
in the finding which cited authors are not on the paper. A wrong
first name or a missing co-author is the ordinary slip behind a partial-match; a cited author who
did not write the work at all -- next to a real author group, a correct title, and correct volume
and pages -- is a fabricated author constellation, and the finding has to name it as one rather
than call it a slipped field. Record authors_match=no. The category still follows the title-first
rule: the work exists, so it is a partial-match, however serious the author fabrication is.
Record each verdict (it persists immediately and is resumable) with the structured signals that back the category:
"$RUN" triage record <paper_id> <number> <category> "<finding>" \
--signals '{"title_match":"no","authors_match":"yes","venue_match":"no","doi_status":"none"}' \
--out <outdir>
--signals is a JSON object: title_match (yes|no|unsure|na), matched_title (the real
publication's title), authors_match/venue_match (yes|no|partial|unsure|na), and
doi_status (resolves|404|mismatch|none|unsure). record enforces the title-first rule:
a partial-match requires title_match=yes (plus a matched_title) or na, and
likely-hallucinated requires title_match=no -- so a fabricated title cannot be filed as a mere
citation error, nor vice versa. Use unclear when title_match is unsure; unclear cannot
carry title_match=no, which asserts the likely-hallucinated finding while hedging the category.
record rejects a <paper_id> <number> that matches no audited reference (the verdict could
never appear in a report). Signals are optional for real-*. report then prints each flag's
matched title and signal summary and lists papers whose likely-hallucinated references have a
non-existent title under a Desk-reject candidates heading.
Each verdict is fingerprinted against the reference text it was recorded on. If a re-audit
changes that text (author-year numbering is extraction-order, so numbers can shift), report
marks the verdict stale and the reference pending -- it never reattaches the old category to the
new text -- and worklist --pending resurfaces the reference. Re-triage it; do not trust the old
category.
Then assemble the reports:
"$RUN" triage report --out <outdir>
<outdir>/reports/reference-check-<paper_id>.md: per paper, including a Repeated
bibliography entries section (see below).
<outdir>/reports/potential-hallucinations.md: corpus rollup for human review, led by a
per-paper severity table and a Desk-reject candidates section (references whose cited title
matches no real publication, compounded by a fabricated author constellation, venue, or DOI).
<outdir>/reports/verify-<paper_id>.md: for each paper with flags, a manual-verification
checklist (per-reference verdict line plus one-click Scholar/Google/DOI/arXiv links).
The per-paper reports and the rollup also list repeated bibliography entries: different citation keys carrying the same authors and title. Verification cannot find these -- each entry is a real reference that verifies on its own -- so only a whole-bibliography pass does. They come in two kinds, and each report separates them because the evidence differs:
Neither is a fabrication. Recommend only what the evidence carries: for a duplicate that is consolidation to a single key; for a conflict it is nothing yet, so report the disagreement and say what would settle it. Wrongly merging destroys distinct citations, while leaving them separate stays fixable -- so an unresolved conflict defaults to no action, not to a guess.
report auto-lints every file it writes with the bundled Markdown linter
(lint_markdown.py), so the reports are valid GFM without a manual pass.
scripts/_vendor/NOTICE (opens in a new tab)scripts/_vendor/_yaml/__init__.py (opens in a new tab)scripts/_vendor/application_file_scanner/__init__.py (opens in a new tab)scripts/_vendor/application_file_scanner/application_file_scanner.py (opens in a new tab)scripts/_vendor/application_file_scanner/git_processor.py (opens in a new tab)scripts/_vendor/application_file_scanner/py.typed (opens in a new tab)scripts/_vendor/application_file_scanner/version.py (opens in a new tab)scripts/_vendor/application_properties/__init__.py (opens in a new tab)scripts/_vendor/application_properties/application_properties.py (opens in a new tab)scripts/_vendor/application_properties/application_properties_config_loader.py (opens in a new tab)scripts/_vendor/application_properties/application_properties_facade.py (opens in a new tab)scripts/_vendor/application_properties/application_properties_json_loader.py (opens in a new tab)scripts/_vendor/application_properties/application_properties_loader_helper.py (opens in a new tab)scripts/_vendor/application_properties/application_properties_toml_loader.py (opens in a new tab)scripts/_vendor/application_properties/application_properties_utilities.py (opens in a new tab)scripts/_vendor/application_properties/application_properties_yaml_loader.py (opens in a new tab)scripts/_vendor/application_properties/multisource_configuration_loader.py (opens in a new tab)scripts/_vendor/application_properties/py.typed (opens in a new tab)scripts/_vendor/application_properties/version.py (opens in a new tab)scripts/_vendor/columnar/__init__.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub se-uhd/hallucite --plugin halluciteOther plugins' skills for the same job