From kingbob
Generate and verify a citation for a piece of prose. Pass a link (DOI, doi.org URL, arXiv, or publisher page) and optionally the paragraph or line it should support — or pass prose alone and the skill spawns parallel web-search agents to discover candidate citations, flagging each one's semantic relevance to the claim. Fetches BibTeX via doi2bib, verifies the entry against Crossref, then reads the cited source to check it actually supports the prose. Use when the user asks to cite something, find a citation for a claim, verify a citation, or says "/cite ...".
How this skill is triggered — by the user, by Claude, or both
Slash command
/kingbob:cite [link-or-doi] [prose to cite, or file:line][link-or-doi] [prose to cite, or file:line]This skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Turn a link into a verified BibTeX citation — or, given only prose, discover
Turn a link into a verified BibTeX citation — or, given only prose, discover candidate citations with web-search agents — and check that the cited source actually supports that prose (or whether it better fits the prose nearby).
The arguments may contain, in any order:
10.1038/nature12373), a
https://doi.org/... URL, an arXiv link/ID, a bioRxiv/medRxiv link, or a
publisher landing page.path/to/file.tex:123-style reference
into a manuscript in the working directory.Pick the mode from what was given:
| Given | Mode |
|---|---|
| link + prose | Verify mode: Steps 1 → 5 |
| link only | Verify mode, but skip the prose-support check in Step 4 |
| prose only | Discovery mode: Step 1b first, then Steps 2 → 5 for the chosen source |
| neither | Ask the user for one or the other |
https://doi.org/ prefix.10.48550/arXiv.<id>. But first
check whether a published version exists — query
curl -s "http://export.arxiv.org/api/query?id_list=<id>" and look for a
<arxiv:doi> element or journal reference. If a published DOI exists,
prefer it and tell the user you swapped the preprint for the published
version (offer the preprint DOI as the alternative).citation_doi / dc.identifier meta tags or a doi.org link near the
title. As a fallback, search Crossref by title:
curl -s "https://api.crossref.org/works?query.bibliographic=<title>&rows=3"
and pick the matching record — confirm with the user if the top hit is not
an obvious match.Only when prose was given without a link.
Get the prose in context. If the user gave a file:line reference,
Read the surrounding paragraph. Distill the prose into its core claim(s) —
that claim, not the raw sentence, is what the agents search for.
Spawn search agents in parallel (a single message with multiple Task tool calls — small, focused agents, not one mega-search). Give each agent the claim verbatim, a distinct search modality, and the same return format:
<claim keywords> paper study),
following promising hits with WebFetch.https://api.crossref.org/works?query.bibliographic=<keywords>&rows=10,
https://api.semanticscholar.org/graph/v1/paper/search?query=<keywords>&fields=title,year,venue,abstract,externalIds&limit=10,
and https://api.openalex.org/works?search=<keywords>&per-page=10.Each agent must return up to 5 candidates, one per line:
DOI | title | year | venue | one-line abstract snippet | why it matches the claim
— and must only return papers it actually saw evidence for (a real DOI and
a real abstract/snippet). No guessed or "probably exists" papers:
hallucinated references are the one unforgivable failure of this skill.
Merge and dedupe candidates by DOI (an arXiv DOI and its published DOI count as the same paper — keep the published one).
Judge semantic relevance of each candidate (cap at the top ~5) against
the claim. Fetch the abstract if the agent didn't return one (Semantic
Scholar DOI:<doi> lookup). Topical overlap is NOT support — flag the
difference explicitly. Rate each candidate:
Present the candidates in a ranked table (rating, title, year, venue, one-line evidence) and ask the user which to cite via AskUserQuestion (offer multi-select when several 🎯 candidates genuinely co-support the claim). If nothing rates 🎯, say so plainly and recommend either weakening the prose or searching again with a reformulated claim — do not pass off a 🟡 as a real citation without the user opting in.
Continue to Step 2 with the chosen DOI(s), running Steps 2–5 for each.
curl -s -L --max-time 10 -H "Accept: text/bibliography; style=bibtex" "https://doi.org/<DOI>"
Quote the URL (DOIs may contain ;, &, <, >). If the response is empty,
HTML, or an error, report what came back and stop — do not fabricate an entry.
Cross-check the entry against the registrar's metadata:
curl -s "https://api.crossref.org/works/<DOI>"
(If Crossref 404s, it may be a DataCite DOI — try
curl -s "https://api.datacite.org/dois/<DOI>".)
Check that:
{} titles are not).@article for journal papers, @inproceedings
for conference papers, @misc for arXiv preprints, …).Fix obvious problems in the BibTeX (e.g. protect case-sensitive acronyms with braces) and note every fix you made. If the registrar record disagrees with the entry in a way you can't reconcile, flag it loudly instead of papering over it.
Only when prose was provided. In Discovery mode this deepens the Step 1b relevance rating: that was judged from the abstract; now check against fuller text where available.
file:line reference,
Read the surrounding paragraph (a few sentences either side) — the point is
to judge the claim and its neighborhood.https://doi.org/<DOI> landing page (abstract is often
enough).curl -s "https://api.semanticscholar.org/graph/v1/paper/DOI:<DOI>?fields=title,abstract,tldr,openAccessPdf"
— if it lists an open-access PDF, fetch that for full-text checking.Render one verdict, with short quoted evidence from the source:
Never soften a ❌ into a ⚠️ to be agreeable. If full-text reading downgrades a Discovery-mode 🎯, say so and let the user reconsider before finishing.
Output, in order:
.bib file exists in the working directory (Glob **/*.bib), check
whether this DOI or citation key is already in it; offer to append if not,
and point out the existing key if it is. Never write to the .bib file
without the user agreeing.Provides UI/UX resources: 50+ styles, color palettes, font pairings, guidelines, charts for web/mobile across React, Next.js, Vue, Svelte, Tailwind, React Native, Flutter. Aids planning, building, reviewing interfaces.
Fetches up-to-date documentation from Context7 for libraries and frameworks like React, Next.js, Prisma. Use for setup questions, API references, and code examples.
npx claudepluginhub harshagrawal13/kingbob-claude-plugins --plugin kingbob