validate-bib

validate-bib is a skill for Claude Code from pedrohcgs/claude-code-my-workflow. It costs 47 tokens per session (1,627 once invoked), scanned A, original, MIT.

A bibliography checker that compares citations in lecture files with entries in a bibliography file. It can check missing or unused references, malformed fields, duplicate papers, DOI details, and citation style.

In plain words
What is it for?
Use it to audit LaTeX, Quarto, or Markdown lecture files and save a report of bibliography issues.
Why use it?
It finds references that are missing, unused, mistyped, or incorrectly formatted before they cause problems in teaching materials or papers.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: reads .claude/ paths; mentions CLAUDE.md.

About the project

claude-code-my-workflow is a forkable setup for using Claude Code to produce and review academic papers, slides, data analyses, and replication packages. Researchers use its agents, skills, rules, hooks, and quality checks to coordinate these tasks and verify their results. The catalogue entries define the reusable workflow components for Claude Code.

pedrohcgs/claude-code-my-workflow · 1,562 stars · on GitHub · psantanna.com

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/pedrohcgs/claude-code-my-workflow/validate-bib
Any agent
npx skills add pedrohcgs/claude-code-my-workflow --skill validate-bib
Clone the repo
git clone --depth 1 https://github.com/pedrohcgs/claude-code-my-workflow

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for validate-bib

README.md
[![agentmods](https://agentmods.dev/badge/skills/pedrohcgs/claude-code-my-workflow/validate-bib.svg)](https://agentmods.dev/skills/pedrohcgs/claude-code-my-workflow/validate-bib)
Your own site
<a href="https://agentmods.dev/skills/pedrohcgs/claude-code-my-workflow/validate-bib"><img src="https://agentmods.dev/badge/skills/pedrohcgs/claude-code-my-workflow/validate-bib.svg" alt="Measured on agentmods" height="20"></a>
Per session 47 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,627 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00047 $0.01627
Opus 5 $0.00023 $0.00813
Sonnet 5 $0.00009 $0.00325
Haiku 4.5 $0.00005 $0.00163

Measured 2d ago against content hash f9045d13966d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

validate-bib scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

.claude/skills/validate-bib/SKILL.md · 160 lines

How it starts

The opening of the file, as written. The whole thing — 160 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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

  1. Read the bibliography file and extract all citation keys.

  2. 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.
  3. Cross-reference:

    • Missing entries (CRITICAL): cited in lectures, absent from .bib.
    • Unused entries (informational): in .bib but never cited.
    • Typo candidates: keys within edit-distance 2 of a .bib key (e.g., Smith2020 vs Smth2020).
  4. Check entry quality:

    • Required fields present (author, title, year, journal/booktitle).
    • Author field properly formatted.
    • Year in 1900–current.
    • No malformed characters / encoding issues.
    • doi field normalized (no leading https://doi.org/).
  5. 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 + Smith2020a with identical DOI or title.
  • CallawaySantAnna2021 + CS2021 both pointing to the same paper.
  • Collaborator-merged .bib files.

Detection heuristics (any → FLAG):

Read the full file on GitHub · 160 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 160 lines · 47 tokens per session scan A f9045d13966d

Subscribe to this mod's changes

validate-bib is a skill published in the GitHub repository pedrohcgs/claude-code-my-workflow (1,562 stars, last pushed 12d ago), licensed MIT. It adds 47 tokens to every session and 1,627 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.