When this skill is invoked, you must:
Step 0: Pre-check
Ask user for:
bib_filepath (e.g.,Biblio/ref.bib)tex_dirpath (e.g.,Tex/)
Generate report file path:
<bib_file_dir>/verification_report.mdCheck if report already exists:
- If exists: Use AskUserQuestion tool to ask "Found existing verification report at
<report_path>. What would you like to do?" with options:- "Re-run verification" (description: "Delete existing report and run full verification again")
- "View existing report" (description: "Read and summarize the existing report without re-running")
- If user chooses "View existing report": Read and summarize the existing report, then exit
- If user chooses "Re-run verification" or report doesn't exist: Continue to Step 1
- If exists: Use AskUserQuestion tool to ask "Found existing verification report at
Step 1: Check Unused References
Run:
python ${CLAUDE_SKILL_DIR}/check_unused_refs.py <bib_file> <tex_dir>Parse JSON output and write to report file:
- Create report with header "# Bibliography Verification Report"
- Add section "## Unused References"
- List total references, cited count, uncited count
- List uncited citation keys
Step 2: Download CrossRef Metadata
Generate output file path:
<bib_file_dir>/ref_crossref.bibTell user: "Downloading CrossRef metadata. You can monitor progress in real-time by viewing
<full_path_to_ref_crossref.bib>"Run:
python -u ${CLAUDE_SKILL_DIR}/download_crossref.py <bib_file> <output_file>- Queries CrossRef API for all entries with DOIs
- Generates a CrossRef version of the bib file for comparison
- Maintains the same entry order as the original file
- Monitor and relay progress: As the script outputs progress lines like "[1/50] Querying key: DOI", relay these to the user in real-time so they can see the download progress
Report progress summary:
- Total entries processed
- Entries with DOIs
- Entries without DOIs (skipped)
Step 3: Generate Comparison Report
Run:
python ${CLAUDE_SKILL_DIR}/compare_refs.py <bib_file> <crossref_bib> <report_file>- Use the same
<bib_file_dir>/verification_report.mdfrom Step 1 - Compares original bib file with CrossRef version
- Identifies discrepancies in metadata fields
- Calculates similarity scores
- Appends comparison results to the existing report
- Use the same
Parse and present the comparison section:
- Summary statistics
- Entries with no discrepancies
- Entries with discrepancies (sorted by similarity)
- Detailed field-by-field comparison table
Step 4: Final Summary
Read the complete verification report from
<bib_file_dir>/verification_report.mdProvide a concise summary to the user:
- Number of unused references
- Number of entries verified against CrossRef
- Number of entries with discrepancies
- Key issues found (if any)
Tell the user: "Detailed report saved to:
<full_path_to_verification_report.md>"