Citation Verifier
Detect and verify citations in scientific documents to identify hallucinated, broken, or invalid references.
Purpose
AI-generated content sometimes includes plausible-looking but fake citations. This skill systematically extracts all citation identifiers from a document and verifies each one against authoritative sources, producing a detailed report with verification status and suggestions for fixing invalid citations.
When to Use
This skill should be invoked when:
- User asks to "verify citations" or "check references" in a document
- User suspects hallucinated citations in AI-generated content
- User wants to validate DOIs, URLs, or other identifiers in a paper
- User asks to audit a document for broken links or fake references
- User mentions "citation verification", "reference checking", or "DOI validation"
Supported Document Formats
- Markdown (.md): Inline links
[text](url), reference links [text][ref], bare URLs, DOIs
- LaTeX/BibTeX (.tex, .bib):
\cite{}, @article{}, DOI fields, URL fields
- Org-mode (.org):
[[url][text]] links, #+BIBLIOGRAPHY, cite links
- Plain text (.txt): Bare URLs, DOIs, arXiv IDs, author-year patterns
Citation Identifiers Detected
DOIs (Digital Object Identifiers)
- Pattern:
10.\d{4,}/[^\s]+ or doi.org/10.\d{4,}/[^\s]+
- Example:
10.1038/nature12373, https://doi.org/10.1126/science.abc1234
- Verification: CrossRef API at
https://api.crossref.org/works/{doi}
URLs to Papers
- Patterns: Links to known publishers and repositories
- Domains: nature.com, science.org, sciencedirect.com, springer.com, wiley.com, acs.org, rsc.org, pnas.org, cell.com, plos.org, mdpi.com, frontiersin.org, academic.oup.com, tandfonline.com
- Verification: HTTP HEAD/GET request, check for 200 status and paper metadata
arXiv IDs
- Pattern:
arXiv:\d{4}\.\d{4,5}(v\d+)? or arxiv.org/abs/\d{4}\.\d{4,5}
- Example:
arXiv:2301.07041, https://arxiv.org/abs/2301.07041v2
- Verification: arXiv API or direct URL check
PubMed IDs (PMIDs)
- Pattern:
PMID:\s*\d+ or pubmed.ncbi.nlm.nih.gov/\d+
- Example:
PMID: 12345678
- Verification: PubMed URL
https://pubmed.ncbi.nlm.nih.gov/{pmid}/
ISBNs
- Pattern:
ISBN[:\s]*[\d-]{10,17} (ISBN-10 or ISBN-13)
- Example:
ISBN: 978-0-13-468599-1
- Verification: Open Library API
https://openlibrary.org/isbn/{isbn}.json
Author-Year Citations
- Pattern:
([A-Z][a-z]+(?:\s+(?:et\s+al\.?|and|&)\s+[A-Z][a-z]+)?,?\s*\d{4})
- Example:
(Smith et al., 2023), (Johnson and Lee, 2022)
- Verification: WebSearch to find matching paper (lower confidence)
Verification Procedure
Step 1: Read and Parse Document
Use the Read tool to load the document. Extract all citation identifiers using pattern matching:
DOI patterns:
- https?://(?:dx\.)?doi\.org/(10\.\d{4,}/[^\s\])"'>]+)
- doi:\s*(10\.\d{4,}/[^\s\])"'>]+)
- (10\.\d{4,9}/[-._;()/:A-Z0-9]+) (bare DOI)
arXiv patterns:
- arXiv:(\d{4}\.\d{4,5}(?:v\d+)?)
- arxiv\.org/abs/(\d{4}\.\d{4,5}(?:v\d+)?)
PubMed patterns:
- PMID:\s*(\d+)
- pubmed\.ncbi\.nlm\.nih\.gov/(\d+)
URL patterns:
- https?://[^\s\])"'<>]+ (filter for academic domains)
ISBN patterns:
- ISBN[:\s-]*((?:\d[-\s]?){9}[\dXx]|(?:\d[-\s]?){13})
Step 2: Deduplicate and Categorize
Create a list of unique identifiers, categorized by type:
- DOIs
- arXiv IDs
- PubMed IDs
- ISBNs
- URLs (academic)
- Author-year citations (text-based)
Step 3: Verify Each Identifier
For each identifier, perform verification in order of reliability:
DOI Verification
- Construct CrossRef API URL:
https://api.crossref.org/works/{doi}
- Use WebFetch to check the API
- If successful, extract: title, authors, journal, year
- If 404 or error: mark as INVALID
arXiv Verification
- Construct URL:
https://arxiv.org/abs/{arxiv_id}
- Use WebFetch to verify page exists
- Extract: title, authors, abstract snippet
- If 404: mark as INVALID
PubMed Verification
- Construct URL:
https://pubmed.ncbi.nlm.nih.gov/{pmid}/
- Use WebFetch to verify
- Extract: title, authors, journal
- If 404: mark as INVALID
ISBN Verification
- Construct URL:
https://openlibrary.org/isbn/{isbn}.json
- Use WebFetch to check
- Extract: title, authors, publisher
- If 404: mark as INVALID
URL Verification
- Use WebFetch to access the URL
- Check for HTTP 200 and academic content indicators
- Look for: paper title, authors, DOI on page
- If unreachable or non-academic: mark as SUSPICIOUS
Author-Year Verification (lowest confidence)
- Use WebSearch with query:
"{author}" "{year}" paper
- Look for matching papers in results
- If found: mark as LIKELY VALID with source
- If not found: mark as UNVERIFIED
Step 4: Generate Report
Produce a structured verification report:
# Citation Verification Report
**Document:** [filename]
**Date:** [date]
**Total citations found:** [count]
## Summary
- Valid: [count]
- Invalid: [count]
- Suspicious: [count]
- Unverified: [count]
## Detailed Results
### Valid Citations
| ID | Type | Title | Source |
|----|------|-------|--------|
| 10.1038/xxx | DOI | Paper Title | CrossRef |
### Invalid Citations (HALLUCINATED)
| ID | Type | Error | Suggestion |
|----|------|-------|------------|
| 10.9999/fake | DOI | 404 Not Found | Remove or find correct DOI |
### Suspicious Citations
| ID | Type | Issue | Recommendation |
|----|------|-------|----------------|
| https://... | URL | Timeout | Verify manually |
### Unverified Citations
| Citation | Type | Notes |
|----------|------|-------|
| (Smith, 2023) | Author-year | No matching paper found via search |
Verification Status Definitions
- VALID: Identifier resolves to a real paper with matching metadata
- INVALID: Identifier does not exist or returns 404 (likely hallucinated)
- SUSPICIOUS: Could not fully verify; may be rate-limited, paywalled, or temporarily unavailable
- UNVERIFIED: Text-based citation that couldn't be confirmed (conservative approach)
Best Practices
- Batch similar requests: Group DOI checks together to minimize API calls
- Respect rate limits: Add delays between requests if hitting rate limits
- Cross-reference: If a URL contains a DOI, verify the DOI directly
- Context matters: Note where citations appear (methods vs. claims)
- Report uncertainty: Always distinguish between "confirmed invalid" and "could not verify"
Output Suggestions for Invalid Citations
For each invalid citation, provide actionable suggestions:
- Wrong DOI format: "DOI appears malformed. Check for typos or extra characters."
- Non-existent DOI: "No paper found. This may be hallucinated. Search for the actual paper title."
- Dead URL: "URL returns 404. Try searching for the paper title on Google Scholar."
- Suspicious journal: "Publisher not recognized. Verify this is a legitimate source."
- Author-year not found: "Could not verify. Add DOI or URL for confirmation."
Example Verification Session
User request: "Verify the citations in my-paper.md"
Expected behavior:
- Read my-paper.md
- Extract all DOIs, URLs, arXiv IDs, etc.
- Report: "Found 15 citations: 8 DOIs, 5 URLs, 2 arXiv IDs"
- Verify each identifier using appropriate API/fetch
- Generate report showing:
- 10 valid citations with metadata
- 3 invalid citations (404 errors) marked as likely hallucinated
- 2 suspicious citations (timeouts) requiring manual check
- Provide suggestions for fixing invalid citations
Limitations
- Rate limits: CrossRef and other APIs may rate-limit requests
- Paywalled content: Cannot verify full content behind paywalls
- New papers: Very recent papers may not be indexed yet
- Author-year citations: Low confidence without additional identifiers
- Non-English sources: Limited support for non-English citation formats
- Private/institutional URLs: Cannot access authenticated content
Related Skills
- literature-review: For conducting systematic literature searches
- scientific-reviewer: For reviewing scientific document quality
- scientific-writing: For writing with proper citations
1---2name: citation-verifier3description: |4 Verify citations and references in scientific documents to detect hallucinated or invalid sources.5 Extracts DOIs, URLs, arXiv IDs, PubMed IDs, and ISBNs from Markdown, LaTeX, org-mode, and plain text,6 then validates them using API lookups and web fetches.78 Use this skill when:9 - Reviewing AI-generated content for citation accuracy10 - Validating references in papers, reports, or documentation11 - Checking if DOIs/URLs resolve to actual papers12 - Auditing a document for broken or fake citations1314allowed-tools:15 - Read16 - WebFetch17 - WebSearch18 - Grep19 - Glob20 - TodoWrite21---2223# Citation Verifier2425Detect and verify citations in scientific documents to identify hallucinated, broken, or invalid references.2627## Purpose2829AI-generated content sometimes includes plausible-looking but fake citations. This skill systematically extracts all citation identifiers from a document and verifies each one against authoritative sources, producing a detailed report with verification status and suggestions for fixing invalid citations.3031## When to Use3233This skill should be invoked when:34- User asks to "verify citations" or "check references" in a document35- User suspects hallucinated citations in AI-generated content36- User wants to validate DOIs, URLs, or other identifiers in a paper37- User asks to audit a document for broken links or fake references38- User mentions "citation verification", "reference checking", or "DOI validation"3940## Supported Document Formats41421. **Markdown** (.md): Inline links `[text](url)`, reference links `[text][ref]`, bare URLs, DOIs432. **LaTeX/BibTeX** (.tex, .bib): `\cite{}`, `@article{}`, DOI fields, URL fields443. **Org-mode** (.org): `[[url][text]]` links, `#+BIBLIOGRAPHY`, cite links454. **Plain text** (.txt): Bare URLs, DOIs, arXiv IDs, author-year patterns4647## Citation Identifiers Detected4849### DOIs (Digital Object Identifiers)50- Pattern: `10.\d{4,}/[^\s]+` or `doi.org/10.\d{4,}/[^\s]+`51- Example: `10.1038/nature12373`, `https://doi.org/10.1126/science.abc1234`52- Verification: CrossRef API at `https://api.crossref.org/works/{doi}`5354### URLs to Papers55- Patterns: Links to known publishers and repositories56- Domains: nature.com, science.org, sciencedirect.com, springer.com, wiley.com, acs.org, rsc.org, pnas.org, cell.com, plos.org, mdpi.com, frontiersin.org, academic.oup.com, tandfonline.com57- Verification: HTTP HEAD/GET request, check for 200 status and paper metadata5859### arXiv IDs60- Pattern: `arXiv:\d{4}\.\d{4,5}(v\d+)?` or `arxiv.org/abs/\d{4}\.\d{4,5}`61- Example: `arXiv:2301.07041`, `https://arxiv.org/abs/2301.07041v2`62- Verification: arXiv API or direct URL check6364### PubMed IDs (PMIDs)65- Pattern: `PMID:\s*\d+` or `pubmed.ncbi.nlm.nih.gov/\d+`66- Example: `PMID: 12345678`67- Verification: PubMed URL `https://pubmed.ncbi.nlm.nih.gov/{pmid}/`6869### ISBNs70- Pattern: `ISBN[:\s]*[\d-]{10,17}` (ISBN-10 or ISBN-13)71- Example: `ISBN: 978-0-13-468599-1`72- Verification: Open Library API `https://openlibrary.org/isbn/{isbn}.json`7374### Author-Year Citations75- Pattern: `([A-Z][a-z]+(?:\s+(?:et\s+al\.?|and|&)\s+[A-Z][a-z]+)?,?\s*\d{4})`76- Example: `(Smith et al., 2023)`, `(Johnson and Lee, 2022)`77- Verification: WebSearch to find matching paper (lower confidence)7879## Verification Procedure8081### Step 1: Read and Parse Document8283Use the Read tool to load the document. Extract all citation identifiers using pattern matching:8485```86DOI patterns:87- https?://(?:dx\.)?doi\.org/(10\.\d{4,}/[^\s\])"'>]+)88- doi:\s*(10\.\d{4,}/[^\s\])"'>]+)89- (10\.\d{4,9}/[-._;()/:A-Z0-9]+) (bare DOI)9091arXiv patterns:92- arXiv:(\d{4}\.\d{4,5}(?:v\d+)?)93- arxiv\.org/abs/(\d{4}\.\d{4,5}(?:v\d+)?)9495PubMed patterns:96- PMID:\s*(\d+)97- pubmed\.ncbi\.nlm\.nih\.gov/(\d+)9899URL patterns:100- https?://[^\s\])"'<>]+ (filter for academic domains)101102ISBN patterns:103- ISBN[:\s-]*((?:\d[-\s]?){9}[\dXx]|(?:\d[-\s]?){13})104```105106### Step 2: Deduplicate and Categorize107108Create a list of unique identifiers, categorized by type:109- DOIs110- arXiv IDs111- PubMed IDs112- ISBNs113- URLs (academic)114- Author-year citations (text-based)115116### Step 3: Verify Each Identifier117118For each identifier, perform verification in order of reliability:119120#### DOI Verification1211. Construct CrossRef API URL: `https://api.crossref.org/works/{doi}`1222. Use WebFetch to check the API1233. If successful, extract: title, authors, journal, year1244. If 404 or error: mark as INVALID125126#### arXiv Verification1271. Construct URL: `https://arxiv.org/abs/{arxiv_id}`1282. Use WebFetch to verify page exists1293. Extract: title, authors, abstract snippet1304. If 404: mark as INVALID131132#### PubMed Verification1331. Construct URL: `https://pubmed.ncbi.nlm.nih.gov/{pmid}/`1342. Use WebFetch to verify1353. Extract: title, authors, journal1364. If 404: mark as INVALID137138#### ISBN Verification1391. Construct URL: `https://openlibrary.org/isbn/{isbn}.json`1402. Use WebFetch to check1413. Extract: title, authors, publisher1424. If 404: mark as INVALID143144#### URL Verification1451. Use WebFetch to access the URL1462. Check for HTTP 200 and academic content indicators1473. Look for: paper title, authors, DOI on page1484. If unreachable or non-academic: mark as SUSPICIOUS149150#### Author-Year Verification (lowest confidence)1511. Use WebSearch with query: `"{author}" "{year}" paper`1522. Look for matching papers in results1533. If found: mark as LIKELY VALID with source1544. If not found: mark as UNVERIFIED155156### Step 4: Generate Report157158Produce a structured verification report:159160```markdown161# Citation Verification Report162163**Document:** [filename]164**Date:** [date]165**Total citations found:** [count]166167## Summary168- Valid: [count]169- Invalid: [count]170- Suspicious: [count]171- Unverified: [count]172173## Detailed Results174175### Valid Citations176| ID | Type | Title | Source |177|----|------|-------|--------|178| 10.1038/xxx | DOI | Paper Title | CrossRef |179180### Invalid Citations (HALLUCINATED)181| ID | Type | Error | Suggestion |182|----|------|-------|------------|183| 10.9999/fake | DOI | 404 Not Found | Remove or find correct DOI |184185### Suspicious Citations186| ID | Type | Issue | Recommendation |187|----|------|-------|----------------|188| https://... | URL | Timeout | Verify manually |189190### Unverified Citations191| Citation | Type | Notes |192|----------|------|-------|193| (Smith, 2023) | Author-year | No matching paper found via search |194```195196## Verification Status Definitions197198- **VALID**: Identifier resolves to a real paper with matching metadata199- **INVALID**: Identifier does not exist or returns 404 (likely hallucinated)200- **SUSPICIOUS**: Could not fully verify; may be rate-limited, paywalled, or temporarily unavailable201- **UNVERIFIED**: Text-based citation that couldn't be confirmed (conservative approach)202203## Best Practices2042051. **Batch similar requests**: Group DOI checks together to minimize API calls2062. **Respect rate limits**: Add delays between requests if hitting rate limits2073. **Cross-reference**: If a URL contains a DOI, verify the DOI directly2084. **Context matters**: Note where citations appear (methods vs. claims)2095. **Report uncertainty**: Always distinguish between "confirmed invalid" and "could not verify"210211## Output Suggestions for Invalid Citations212213For each invalid citation, provide actionable suggestions:214215- **Wrong DOI format**: "DOI appears malformed. Check for typos or extra characters."216- **Non-existent DOI**: "No paper found. This may be hallucinated. Search for the actual paper title."217- **Dead URL**: "URL returns 404. Try searching for the paper title on Google Scholar."218- **Suspicious journal**: "Publisher not recognized. Verify this is a legitimate source."219- **Author-year not found**: "Could not verify. Add DOI or URL for confirmation."220221## Example Verification Session222223**User request:** "Verify the citations in my-paper.md"224225**Expected behavior:**2261. Read my-paper.md2272. Extract all DOIs, URLs, arXiv IDs, etc.2283. Report: "Found 15 citations: 8 DOIs, 5 URLs, 2 arXiv IDs"2294. Verify each identifier using appropriate API/fetch2305. Generate report showing:231 - 10 valid citations with metadata232 - 3 invalid citations (404 errors) marked as likely hallucinated233 - 2 suspicious citations (timeouts) requiring manual check2346. Provide suggestions for fixing invalid citations235236## Limitations237238- **Rate limits**: CrossRef and other APIs may rate-limit requests239- **Paywalled content**: Cannot verify full content behind paywalls240- **New papers**: Very recent papers may not be indexed yet241- **Author-year citations**: Low confidence without additional identifiers242- **Non-English sources**: Limited support for non-English citation formats243- **Private/institutional URLs**: Cannot access authenticated content244245## Related Skills246247- literature-review: For conducting systematic literature searches248- scientific-reviewer: For reviewing scientific document quality249- scientific-writing: For writing with proper citations