Validate Bib
Validate bibliography entries against citations in all lecture files.
Install
npx skills add pedrohcgs/claude-code-my-workflow --skill validate-bib -g -a claude-code -y- Repository
- pedrohcgs/claude-code-my-workflow1.7k
- Category
- Engineering
- Updated
- 1mo ago
- License
- MIT
- Context cost
- Lightabout 1,443 tokens
- Runs scripts
- No, instructions only
What it does
Validate bibliography entries against citations in all lecture files. Structural checks (missing/unused entries, malformed fields) by default; `--semantic` adds citation-drift detection, DOI verification, and style-consistency checks.
Validate Bibliography
Cross-reference citations in lecture files against bibliography entries. Two modes:
- Default (structural): missing entries, unused entries, malformed fields, typo candidates.
--semantic: adds citation-drift detection (duplicate entries for the same paper), DOI verification via crossref, and citation-style consistency within each file.
Report saved to quality_reports/bib_audit_[structural|semantic].md.
Mode 1: Structural (default)
Steps
-
Read the bibliography file and extract all citation keys.
-
Scan lecture files for citation keys:
.tex:\cite{,\citet{,\citep{,\citeauthor{,\citeyear{,\textcite{,\parencite{.qmd/.md:@key,[@key],[@key1; @key2]- Extract all unique citation keys used.
-
Cross-reference:
- Missing entries (CRITICAL): cited in lectures, absent from
.bib. - Unused entries (informational): in
.bibbut never cited. - Typo candidates: keys within edit-distance 2 of a
.bibkey (e.g.,Smith2020vsSmth2020).
- Missing entries (CRITICAL): cited in lectures, absent from
-
Check entry quality:
- Required fields present (author, title, year, journal/booktitle).
- Author field properly formatted.
- Year in 1900, current.
- No malformed characters / encoding issues.
doifield normalized (no leadinghttps://doi.org/).
-
Write report to
quality_reports/bib_audit_structural.md.
Files scanned
Slides/*.tex
Quarto/*.qmd
guide/*.qmd
master_supporting_docs/**/*.tex
Bibliography location
Bibliography_base.bib at repo root by default; override via CLAUDE.md.
Mode 2: Semantic (--semantic)
Everything in Mode 1, plus:
2a. Citation drift detection
Multiple .bib entries describing the same paper under different keys. Symptoms:
Smith2020+Smith2020awith identical DOI or title.CallawaySantAnna2021+CS2021both pointing to the same paper.- Collaborator-merged
.bibfiles.
