← ClaudeAtlas

bib-filterlisted

Filter a LaTeX project's bibliography to the entries actually cited, with Overleaf-source resolution, temporary staging, validation, approval-gated canonical replacement, and compilation. Use before submission or after large revisions.
flonat/flonat-research · ★ 154 · AI & Automation · score 89
Install: claude install-skill flonat/flonat-research
# Bibliography Filter Produce and validate a cited-only bibliography, then replace the manuscript's canonical `.bib` only after explicit approval. In an Overleaf-linked project, the resolved Overleaf bibliography is canonical; a wrapper-local copy is not a second authority. ## When to Use - Before submission — strip unused references from the bibliography - When a shared `.bib` (e.g., Paperpile/Paperpile export) contains hundreds of entries but the paper cites a subset - To reduce `.bib` file size for Overleaf or arXiv upload - As a cleanup step after major revision (removed sections may leave orphan citations) ## Process ### Step 1: Locate files If given a directory, resolve the actual manuscript source first: - For `paper-<arm>/paper`, run `realpath`/`readlink` and inspect the resolved Overleaf target before declaring a bibliography missing. - Read `\bibliography{...}` or `\addbibresource{...}` from the canonical driver and resolve the referenced `.bib` relative to that source tree. - Do not select a project-root export, backup, or stale wrapper copy merely because it has the same filename. Then find the main `.tex` and `.bib` files: - `.tex`: Glob for `*.tex` in the directory (and `paper/` subdirectory if it exists). The main file is the one containing `\begin{document}`. - `.bib`: Look for `\bibliography{...}` or `\addbibresource{...}` in the main `.tex` to find the bib filename. Fall back to globbing `*.bib`. If given a specific `.tex` file, derive the `.bib` fro