reference-directory-cleanup

Reconciles PDF files in paper directories against BibTeX entries and verifies LaTeX compilation.

6|1|Updated May 11, 2026
One-click install
npx skills add https://github.com/yakeworld/Synthos --skill reference-directory-cleanup-yakeworld
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: reference-directory-cleanup
Source: https://github.com/yakeworld/Synthos/tree/main/skills/private/reference-directory-cleanup
Command: npx skills add https://github.com/yakeworld/Synthos --skill reference-directory-cleanup-yakeworld

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Academic paper directories accumulate stale PDFs from old pipelines, mismatched filenames, and broken bibliography references that cause LaTeX compilation failures. This Skill systematically reconciles PDF files against the current references.bib, archives unrelated files, and restores a clean compilable state. ## Core Features & Use Cases - Content-Verified PDF Matching: Compares each subdirectory PDF against BibTeX entries using pdfinfo metadata (title, author, year) instead of assuming filename correspondence, archiving mismatches to _archive/ rather than deleting them. - Ordered Bib Cleanup: Enforces a strict sequence of cleaning invalid bib entries, removing stale \cite{} references from .tex files, then recompiling with pdflatex until zero errors and zero undefined references remain. - Symlink-Based Deduplication: Creates symbolic links in the root directory pointing to PDFs already present in subdirectories, avoiding duplicate physical copies and data drift. - Use Case: A paper directory contains 12 legacy PDFs in pdfs/ and a 29-entry references.bib, including a file named Shams2025.pdf that actually corresponds to bibkey Shams2023BRFSS. The Skill verifies content with pdfinfo, renames the file, archives 8 unrelated PDFs, and confirms pdflatex compiles cleanly. ## Quick Start Clean up my paper directory by matching the PDFs in the pdfs subfolder against references.bib, archiving unrelated files, fixing name mismatches, and verifying the paper compiles with no undefined references.

Frequently Asked Questions about reference-directory-cleanup

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I clean up PDFs that don't match my references.bib file?

Compare each PDF against BibTeX entries by content using pdfinfo to check title, author, and year rather than trusting filenames. Move non-matching files to an _archive/ directory instead of deleting them, so nothing is lost if a match is found later.

How to fix undefined reference errors in pdflatex after deleting bib entries?

Follow a strict order: first remove invalid entries from references.bib, then delete stale \cite{} commands from the .tex file, and finally recompile with pdflatex. Reversing this order leaves dangling citations that cause undefined reference errors.

What should I do when a PDF filename doesn't match its BibTeX key?

Verify the file's actual content with pdfinfo or by opening the first page to confirm the title, authors, and year. Once the correspondence to a bibkey is confirmed, rename the file to align with the bibkey before proceeding.

Should I copy or symlink PDFs from a subdirectory to the paper root?

Create a symbolic link in the root directory pointing to the existing file in the subdirectory rather than copying it. This keeps a single physical copy on disk and prevents the two versions from drifting out of sync.

When is a reference directory cleanup considered complete?

Cleanup is complete only after pdflatex compiles the paper with zero errors and zero undefined references. The final root directory PDF and symlink count should also match the cleanup record, with old metadata and backup files removed.