English | 繁體中文
An agent skill that turns Claude (or Codex, or any capable LLM agent) into a rigorous literature assistant. Give it your draft — it finds supporting literature, and audits every citation you already have: does the paper exist, is the bibliography correct, and does it actually support the claim you attached it to?
Built by a grad student finishing a thesis, battle-tested on real thesis chapters. No API keys required to start.
Before you install: the working language is Traditional Chinese. The script messages can be switched to English; the instructions cannot. This README is English, but
SKILL.md— the file the model actually follows — is mostly Chinese, and so are the report templates. The two scripts (scripts/lit_api.py,scripts/cite_integrity.py) print their messages in Traditional Chinese by default (✅ 有合法免費全文,❓ 撤稿查詢不完整,查詢未完整完成…不可解讀為查無). SetLIT_LANG=en— in your environment, in.env, or for one run with--lang en— and the same messages come out in English (✅ Legal free full text available,❓ Retraction check incomplete …,The lookup did not finish completely … must not be read as not-found).What the switch changes: the explanatory text —
message,note/_note,recommendation,confidence_note,status,hint,absence_note,single_source_degraded,quality_warnings,downgrade_reasons,derivative_item_risk,journal_doi_status,s2_note,source_discrepancy,coverage_caveat,how_to_getandunsupported_style_notetexts, the-hhelp, and the text report ofcite_integrity.py; also three values that look like data —citations_source,labelandpublished_version.source(details inreferences/api-notes.md), which a program should not match on. What it never changes: JSON field names,verdict_hintvalues, error codes,basis/version_linkvalues, the status emoji prefixes (✅❌❓⚠️ 🚨🔒) and exit codes — a program that reads only these behaves the same in both languages. The Chinese output is byte-for-byte what it was before the switch existed, with two exceptions:-h/ usage gains the--langline, and argparse re-aligns the help columns accordingly; and the two citation-age flags inquality_warningswere later reworded to say what the code compares, calendar years (seereferences/api-notes.md).What it does not change:
SKILL.md,references/*.mdand the report templates stay Chinese. WithLIT_LANG=enthe scripts speak English, but the model is still following Chinese instructions, so its final report will usually still be Chinese, or Chinese-flavoured, unless you ask for English. That is the instructions, not a broken switch. Two smaller limits: error text that comes from an upstream service or the operating system (*_error/errorfields) is passed through verbatim, so on a non-English Windows it can be in the OS language; andquality_warningsare written in whatever language was active when a file was produced — a JSON or EndNote file made under Chinese keeps its Chinese flags when you read it later under English.What still works in English regardless: every search is run in English against Semantic Scholar, Crossref, arXiv and OpenAlex, and every bibliographic field comes back in the source language of the paper. So the literature layer is language-neutral; of the wrapper around it, the script messages are switchable and the instructions are not. The frozen tests pin Chinese for the whole run and assert the Chinese strings; English is covered by its own cases (
I18N-*).
(Diagram generated by assets/gen_diagram.py, which emits English and Chinese variants in light and dark — edit text or colors and re-run; the palette is CVD-validated. A Mermaid source lives below for quick in-browser edits.)
Mermaid version (editable in-browser)
flowchart TB
U["User input<br/>draft / topic / command"] --> R{"Mode router<br/>explicit command wins; otherwise inferred"}
R -->|find| A["Mode A<br/>Find literature"]
R -->|check| B["Mode B<br/>Audit citations"]
R -->|write| C["Mode C<br/>Grounded writing"]
R -->|"map / gap / matrix / notes / annotate<br/>counter / strength / claims / integrity"| G["Grad toolkit"]
A --> E
B --> E
C --> E
G --> E
subgraph E["Shared engine — scripts/lit_api.py (stdlib only)"]
direction LR
S2["Semantic Scholar"] -. "fallback on 429" .-> OA["OpenAlex"]
AX["arXiv"] -. "fallback" .-> S2
CR["Crossref<br/>bibliographic authority"]
end
E --> V["Verification<br/>dual-path identity gate · quality flags · adversarial self-audit<br/>evidence levels (abstract / full text p.X / unknown)"]
V --> O1["Audit report<br/>+ author fix list"]
V --> O2["RIS / BibTeX / EndNote XML"]
V --> O3["Cited article · matrix · note cards"]
Three honesty mechanisms run through every path: bibliographic fields come only from API responses (never from LLM memory), every verdict carries its evidence level, and generated output is audited by a fresh-context skeptic before delivery.
If you already found a paper and just want its citation string, use the Google Scholar Button (official, by Google) — it is faster and this tool does not compete there. It also finds full text through your university library, which is the proper licensed route and better than anything this tool can legitimately do.
This tool starts where that ends: with citations you already have — from an AI, a co-author, an old draft, or a copy-paste that went wrong.
| Task | Scholar Button | lit-review |
|---|---|---|
| Known paper → citation string | ✅ one click | slower, no advantage |
| Full text via institutional access | ✅ its core strength | out of scope by design |
| "Does this reference exist?" | — | ✅ cross-checks Crossref + Semantic Scholar |
| "Is the bibliography correct?" | — | ✅ field-by-field against Crossref |
| "Does it support this sentence?" | — | ✅ reads the abstract, flags overreach |
| "Was it retracted?" | — | ✅ every DOI, by default |
| 36 references at once | 36 manual clicks | ✅ one batch run |
Measured, not asserted: Scholar Button results carry no DOI and collapse volume/issue/pages into a truncated string, so they cannot drive bibliographic verification. Conversely, it surfaced a free repository PDF for a paywalled review that Unpaywall reported as closed — fulltext recovers the same URL via a fallback source, but the lesson stands: for getting the paper, use Scholar Button and your library.
Finding you a topic is also out of scope. gap <X and Y> verifies an intersection you have already named: two or three re-worded queries, the nearest neighbours, and an honest "not found ≠ nobody did it". It does not generate candidate directions and will not tell you what to research. If you have no X and Y yet, that is a different job — a separate skill, research-gap-hunter, does it, and lit-review works exactly the same whether or not that skill is installed.
Nor is surveying the techniques. map <topic> charts the literature: which papers are seminal, who the key authors are, where the last three years went. It does not chart the approaches — what methods are in play, what each one buys and costs, which are saturated. That is a technique survey, and research-gap-hunter's landscape does it. Wanting both for the same field is reasonable; they are not substitutes for each other.
Mode A — Find literature. Extracts claims from your draft, searches Semantic Scholar / OpenAlex / arXiv, snowballs through citation networks to find classics keyword search misses, judges candidates by their abstracts (not titles), and exports an EndNote/Zotero-ready .ris file.
Mode B — Audit citations. For every reference in your draft:
- Existence — cross-checks Crossref + Semantic Scholar; catches hallucinated references (and knows that not found ≠ fabricated)
- Retraction — every DOI is checked against Crossref update notices (incl. Retraction Watch data), by default, at zero LLM cost
- Bibliography — field-by-field diff against Crossref authoritative records (years, venues, author spelling, page numbers); arXiv IDs are cross-checked against their actual titles
- Claim support — reads the abstract and checks whether the paper supports the specific sentence citing it; flags overreach ("paper says correlation, you wrote causation"), null-result traps, and population mismatches
- Equations & technical details — when your text attributes a formula to a source, fetches the open-access PDF and compares term by term
Mode C — Grounded writing. Give it a topic; it retrieves first, writes second, and self-audits last — every cited claim traceable to retrieved evidence, expository passages explicitly uncited.
Grad toolkit. Thirteen thesis-lifecycle tools: literature matrix, field map, research-gap detection (for an intersection you name), note cards, citation-integrity check, terminology consistency, committee-question rehearsal, new-literature watch, citation-needed annotation, counter-evidence search, evidence-strength grading, claim–evidence ledger, retraction lookup.
Claude Code — as a plugin. The first line registers the marketplace; the second installs from it, so run both, in order:
claude plugin marketplace add Zachariah9420/claude-research-skillsclaude plugin install lit-review@zachariah-research-skillsOr clone it as a skill, if you would rather not add a marketplace:
git clone https://github.com/Zachariah9420/lit-review-skill ~/.claude/skills/lit-reviewThen just ask: "check the citations in my chapter2.docx" or "find literature for this paragraph: …" — the skill infers the mode from your input.
Or use explicit commands (same words work in Claude Code as /lit-review <cmd> and in Codex as plain chat):
| Command | Does |
|---|---|
check <draft/file> |
Audit citations (Mode B; auto-adds Mode A if references exist) |
find <paragraph/topic> |
Find supporting literature (Mode A) |
write <topic> |
Literature-grounded article with citations (Mode C) |
verify <one citation> |
Quick single-citation existence + bibliography check |
annotate <file> |
Mark which sentences need citations |
counter <claim> |
Deliberately search for null/contrary evidence |
strength <paper+claim> |
Evidence-quality grading (meta-analysis vs. small cross-sectional, at a glance) |
claims <file> |
Claim–evidence ledger: support/oppose counts and strength per claim |
fulltext <DOI> |
Locate legally available full text (Unpaywall + OA fields); tells you the institutional route when there is none |
matrix map gap notes integrity glossary rehearse watch retract versions export-xml |
Grad toolkit — see USAGE.md |
deep / quick / thorough |
Depth & verification-intensity modifiers |
bibtex / no-ris |
Reference-file format preference |
Codex / other agents: add one line to your AGENTS.md:
For literature search and citation auditing, read
<clone-path>/SKILL.mdand follow its workflow.
The helper script is pure Python 3.8+ standard library — no pip installs, works anywhere.
Full walkthrough: USAGE.md
Create a .env in your project directory:
# free from semanticscholar.org/product/api — avoids shared-pool 429s
S2_API_KEY=...
# Crossref/OpenAlex polite pools; also required by fulltext (Unpaywall needs a contact email)
CROSSREF_MAILTO=you@example.com
# optional: English script messages (default zh)
LIT_LANG=en
Never commit .env. The script reads it automatically (cwd first, then ~/.env).
LIT_LANG can also be set as an environment variable, or for a single run with --lang en / --lang=en (before or after the sub-command). Precedence: --lang > environment variable LIT_LANG > .env (cwd first, then ~/.env) > default zh. An empty LIT_LANG counts as unset (LIT_LANG only: any other key already set in the environment, even to an empty string, is not replaced from .env); in .env, a space and # after an unquoted value start an inline comment, which is ignored (LIT_LANG=en # note reads as en; a value in matching quotes keeps its #); an unrecognised value falls back to zh and prints one warning on stderr. Both lit_api.py and cite_integrity.py honour it.
A cloned folder is not directly uploadable — zipping it would include the
.git directory, and the top-level folder would be named after the repo rather
than the skill. One command produces a correct package:
python scripts/package_skill.py # → lit-review.zipIt takes the file list from git ls-files, so the package contains exactly what
a clone contains (nothing gitignored, no .git, no .env), wraps it in a
lit-review/ top-level folder so SKILL.md sits where the platform expects it,
then runs evals/zip_check.py for API keys, personal email addresses and
machine-specific paths. If that check fails the ZIP is deleted rather than
handed to you — a package that leaks is worse than no package.
The honesty claims above are enforced by tests, not by good intentions:
python evals/test_regression.py # 133 frozen cases, no network, seconds
python evals/mutation_check.py # re-introduces 76 fixed bugs; each must be caughttest_regression.py freezes every defect found so far — each case is tagged with where it came from (TS-* black-box stress test, CX-* independent Codex source review, DR-* design review). It calls the production functions directly with frozen candidate data, so it needs no API access and runs in seconds.
mutation_check.py answers the question a green test suite cannot: does it actually detect anything? It re-introduces each fixed bug one at a time and requires that a specific case fails. This caught two of my own tests that had quietly re-implemented the ranking logic instead of calling it — tests that would have passed forever while the real code rotted.
What has been exercised on real material: a planted-error draft (wrong year, wrong venue, fabricated reference, Chinese-language reference, uncited claim), two real thesis chapters, a labmate's 36-citation reference list (which turned up a misattributed author and a wrong page range), equation checking against an open-access PDF, and a cross-check of the same audit against an independent literature tool — which agreed on every verdict and surfaced one genuine gap (abstract coverage for publishers the free APIs do not index).
What has not been exercised: other people's fields (medicine, social science, humanities have different citation conventions and very different API coverage), author-year (APA) documents, longitudinal use across weeks, and a full audit driven by Codex rather than Claude. Those are the honest frontier.
- Honesty over polish. "Not found" is reported as not found; "can't judge" is ❓, never a guess. One wrong "verified" is worse than ten honest "unverified".
- No bibliography from memory. Every DOI, year, and page number comes from an API response — LLM memory of bibliographic data is unreliable by construction.
- Isolation firewalls. Evidence isolation (model memory may raise suspicion, only supplied evidence may convict), role isolation (the writer never audits itself), injection isolation (retrieved abstracts/PDFs are untrusted data — embedded instructions are reported, never followed).
- Quality red flags. Zero-citation papers published in an earlier calendar year are flagged automatically (age-gated, so new papers aren't punished for being new); a venue missing from DOAJ/CORE is a separate flag.
- Cost tiers.
quick(single agent, labeled "no independent audit") / default (one fresh-context skeptic, ~1.5–2×) /thorough(per-claim adversarial verification, 5–10×) — verification intensity follows the cost of being wrong. - Resilient. Automatic fallbacks for
search/snowball: Semantic Scholar → OpenAlex, arXiv → Semantic Scholar.verifyhas no fallback on purpose — a failed source is always surfaced (single_source_degradedwhen a plausible candidate survived,partial_failurewhen nothing plausible was found), never hidden as "not found". Rate limiting and 429 backoff built in.
Four fresh sessions ran this tool over medicine, pharmacy, social science and humanities literature with no prior knowledge of the project. The pattern they found is structural: reliability falls off with distance from CS/AI, because the tool's assumptions are CS/AI assumptions — that a work has a DOI, that its title is a unique key, that the author field is populated, that an abstract exists, and that venue-quality data comes back with the search.
| Field | Reliable | Needs your eyes |
|---|---|---|
| CS / AI | All five assumptions hold; this is the home field | — |
| Medicine / pharmacy | Retraction checks (the strongest feature here), paywall honesty, RIS export | verify results: correspondence and editorials reproduce the parent title verbatim, so check type and container before accepting a match. No PubMed/MEDLINE coverage, no NLM journal-abbreviation support |
| Social science | integrity refusing to judge APA documents, retraction, full-text location |
similar_found is often the tool's problem, not your citation's — reprints in edited collections carry new DOIs, APA-era DOIs use double slashes, and consortium authors (Open Science Collaboration, Many Labs) score zero author overlap by construction |
| Humanities | Journal articles verify correctly | Books are the weak spot: no ISBN lookup exists, and a review of a book can outrank the book. Chicago-style fields (place, edition, translator, volume) are simply not in Crossref. Chinese-language work is refused up front by design — treat the tool as a signpost to a Chinese index, not a checker |
Three things are trustworthy in every field tested: a positive retraction result, the paywall verdict from fulltext, and integrity refusing to judge a citation style it does not support. Outside CS/AI, a found verdict deserves one look at the candidate's type and container before you act on it.
- Default judgments are abstract-based; "gap" findings mean the abstract doesn't show it, not the paper doesn't contain it. For verdicts the abstract can't settle, the skill escalates to open-access full text when available (and labels the evidence level) — but paywalled papers stay honestly marked "cannot judge"
- Chinese-language literature: best-effort via Google Scholar when available, otherwise flagged for manual check (the structured APIs barely cover it)
- Books (especially pre-2010): APIs often only index their reviews — the skill uses reviews as indirect existence evidence and tells you to check the ISBN
- Industry proceedings (IPC/SMTA-style) are a blind spot for every database, including commercial ones — the skill says "not found in any index, verify with the publisher", never "fabricated"
- PubMed/MEDLINE is not searched. Drug package inserts, FDA/EMA approval documents, clinical databases (UpToDate, Micromedex, Lexicomp), pharmacopoeias and ClinicalTrials.gov are all out of range — a not-found there is expected, not a finding
- The tool makes bad citations harder to produce, but the selection and interpretation of literature remains the author's responsibility — it's a guardrail, not a chauffeur
examples/planted_errors_test.md is a test draft with five planted problems (wrong year, wrong venue, a fabricated reference, a Chinese-language reference, an uncited claim) — run the skill on it and see whether everything gets caught.
MIT License. Issues and PRs welcome.