cite-check
БесплатноЗапускает вложенные скриптыНе проверенALWAYS use when a draft's citations need checking against what the sources actually say — 'check citations', 'check my cites', 'verify cites', 'cite-check'…
от edwinhu★ 28 звёзд на GitHubОб этом скилле
Citation Verification with Gemini File Search
What this skill carries — grep references/ for any subject the names below miss:
!d=${CLAUDE_SKILL_DIR}; command -v skill-toc >/dev/null 2>&1 && exec skill-toc "$d"; s=$HOME/.claude/skills/plugin-utils/bin/skill-toc; [ -x "$s" ] && exec "$s" "$d"; echo "(skill-toc unavailable: references and scripts are NOT listed here — install the plugin-utils plugin, or start a new session so its bin/ reaches PATH)"
Scan pandoc-flavored markdown drafts for citations, upload source PDFs to a Gemini File Search store, and verify each citation is grounded in its source. Produces a structured REVIEW-CITES.md report.
Prerequisites
GOOGLE_API_KEYenv var set (Google AI Studio; on this machine:export GOOGLE_API_KEY="$(cat $GEMINI_API_KEY_FILE)")- Bun runtime
rclonewith agoogle-drive:remote configured (used to bypass Google Drive FUSE deadlocks)python3withpymupdf4llminstalled (used for PDF text extraction in passage grounding)readwiseCLI installed and authenticated (for Readwise article export in source materialization)- One or more
.bibfiles withfilefields mapping bibkeys to PDF paths (e.g., Paperpile'spaperpile.bib)
Source Materialization
Before running cite-check, materialize all sources locally:
cd ${CLAUDE_SKILL_DIR}
bun materialize-sources.ts \
--bib ~/Google\ Drive/My\ Drive/resources/Paperpile/paperpile.bib \
--bib ./references/sources.bib \
--refs ./references \
--drafts ./drafts \
--debug
This populates references/ with local copies of all cited sources:
- Paperpile PDFs → batch
rclone copyfrom Google Drive →references/<bibkey>.pdf - Readwise articles (reports, news, speeches without PDFs) → search by title, export markdown →
references/<bibkey>.md - Gaps → printed at the end for manual action (Obsidian web clipper or manual sourcing)
After materialization, cite-check operates purely locally.
Usage
cd ${CLAUDE_SKILL_DIR}
bun install # first time only
# Single bib file
bun cite-check.ts --bib ~/Google\ Drive/My\ Drive/resources/Paperpile/paperpile.bib --drafts <path-to-drafts>
# Multiple bib files (Paperpile + project-local; first bib wins on duplicate keys)
bun cite-check.ts \
--bib ~/Google\ Drive/My\ Drive/resources/Paperpile/paperpile.bib \
--bib ./references/sources.bib \
--drafts <path-to-drafts>
CLI Flags
| Flag | Required | Default | Description |
|---|---|---|---|
--bib <path> |
Yes* | -- | Path to .bib file (repeatable; first wins on duplicate keys) |
--store <id> |
No | auto-create | Use existing File Search store ID |
--drafts <dir> |
No | ./drafts |
Directory with markdown draft files |
--out <path> |
No | <drafts>/REVIEW-CITES.md |
Output report path |
--limit <n> |
No | all | Check only first N citations (smoke test) |
--dry-run |
No | false | Print prompts without querying |
--sequential |
No | false | Run queries one-at-a-time instead of Batch API (default: batch) |
--retry-model <model> |
No | the pro role |
Retry UNSUPPORTED results with a stronger model |
--audit |
No | false | Audit source availability without querying (checks Paperpile PDFs) |
--debug |
No | false | Verbose logging |
*Either --bib or --store is required.
Ask Mode: Targeted Source Queries
Ask a specific question about a single source:
# Does Bebchuk2019 support a specific claim?
bun cite-check.ts ask @Bebchuk2019-uq "do expense ratios fall since 2010?" --bib paperpile.bib
# What does a source say about a topic?
bun cite-check.ts ask @Brav2022-ht "what are retail turnout rates?" --bib paperpile.bib --bib sources.bib
The ask mode uploads the single source PDF via the legacy Files API (with manifest caching, 48h TTL), queries Gemini with inline file references, and prints the answer with supporting passages to stdout. No File Search store is created and no report is generated.
Cross-Directory File Resolution
When multiple --bib files are provided, file paths are resolved across all bib directories. This handles the common case where a project-local sources.bib has file = {All Papers/...} paths that are relative to the Paperpile folder rather than the project's references/ directory. The tool tries each bib directory as a fallback when the primary path doesn't exist on disk.
How It Works
- Extract citations from markdown using pandoc
[@bibkey]syntax - Parse bib file to map bibkeys to PDF file paths via
filefields - Sync the File Search Store, per file — PDFs for cited bibkeys are imported into a persistent Gemini File Search store with bibkey metadata. Google Drive FUSE paths are copied locally via
rcloneto avoid EDEADLK deadlocks. Stores persist across runs (no 48h TTL). "Changed" means the SHA-256 of the bytes of a cited source differs — not just its bibkey or path — so swapping a PDF at the same path u
Установить cite-check в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл cite-check?
ALWAYS use when a draft's citations need checking against what the sources actually say — 'check citations', 'check my cites', 'verify cites', 'cite-check', 'run citation review', 'are my citations grounded', 'does this source actually support that claim', 'does source X support claim Y', 'what does source X say about Y', 'did I cite that right', 'make sure the cites hold up before I send this'. Use proactively before a draft goes out. NOT for Bluebook formatting (use bluebook / bluebook-audit) and NOT for detecting citations that do not exist at all (use source-verify).
Как установить скилл cite-check?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл cite-check запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
agent-skill-stack
Find, evaluate, and assemble the smallest compatible set of AI Agent Skills for an end-to-end natural-language goal. Use when a user wants Skills for a…
от GitHubbuild-evidence-map
Build an auditable evidence map for a contested technical choice, research synthesis, proposal review, or consequential decision. Use when Copilot must…
от GitHubpinecone-rag
Build production RAG pipelines and persistent agent memory using Pinecone as the vector database backend. ALWAYS USE THIS SKILL when the user mentions…
от GitHubqdrant-monitoring-debugging
Diagnoses Qdrant production issues using metrics and observability tools. Use when someone reports 'optimizer stuck', 'indexing too slow', 'memory too high'…
от GitHub