Mearman

bib-delete

Remove entries from bibliography files by ID or matching criteria. Use when the user asks to delete, remove, or purge bibliography entries.

Mearman 3 Updated 4mo ago
GitHub

Install

npx skillscat add mearman/marketplace/plugins-bib-skills-bib-delete

Install via the SkillsCat registry.

SKILL.md

bib-delete

Delete entries from bibliography files.

Usage

npx tsx ${CLAUDE_PLUGIN_ROOT}/scripts/delete.ts input.bib --id=<id> --output=cleaned.bib

Required

  • --id=<string> - ID of entry to delete

Options

  • --output=<file> - Output file (overwrites input if omitted)

Examples

Delete specific entry:

npx tsx ${CLAUDE_PLUGIN_ROOT}/scripts/delete.ts refs.bib \
  --id=smith2024 \
  --output=refs-cleaned.bib

Delete in-place:

npx tsx ${CLAUDE_PLUGIN_ROOT}/scripts/delete.ts refs.bib --id=outdated2020

Behavior

  • Entry must exist (error if not found)
  • All other entries are preserved
  • Format is preserved
  • Overwrites input file if --output is omitted

Output

Deleted entry: smith2024
Remaining entries: 149
Written to: refs-cleaned.bib

Bulk Deletion

For deleting multiple entries, use in combination with filters:

Delete all entries from 2020:

# Step 1: Filter to keep only 2020 entries
npx tsx ${CLAUDE_PLUGIN_ROOT}/scripts/filter.ts refs.bib --year=2020 --output=to-delete.bib

# Step 2: Get IDs and delete manually
# (Bulk delete would require script enhancement)

Alternative approach - filter to keep:

# Keep everything EXCEPT 2020
npx tsx ${CLAUDE_PLUGIN_ROOT}/scripts/filter.ts refs.bib --year=2021 --output=2021-only.bib
# Then merge other years...

Notes

  • Deletion is permanent (no undo)
  • Consider backing up files before deletion
  • For complex deletions, use bib-filter to extract what you want to keep
  • Format is auto-detected and preserved