Mearman

bib-filter

Filter and manipulate bibliography entries by criteria (author, year, keyword, entry type). Parse, search, extract entries, and format/pretty-print files. Use when the user asks to search, filter, extract, parse, or format bibliography files.

Mearman 3 Updated 4mo ago
GitHub

Install

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

Install via the SkillsCat registry.

SKILL.md

bib-filter

Filter bibliography entries by various criteria.

Usage

npx tsx ${CLAUDE_PLUGIN_ROOT}/scripts/filter.ts input.bib [criteria] --output=filtered.bib

Filter Criteria

  • --id=<string> - Filter by entry ID (exact match)
  • --author=<string> - Filter by author name (substring match)
  • --year=<number> - Filter by publication year
  • --type=<string> - Filter by entry type (article, book, etc.)
  • --keyword=<string> - Filter by keyword (substring match)

Multiple criteria are combined with AND logic.

Options

  • --output=<file> - Output file (prints to stdout if omitted)
  • --sort - Sort filtered results

Examples

Find all papers by Smith:

npx tsx ${CLAUDE_PLUGIN_ROOT}/scripts/filter.ts refs.bib --author=Smith

Find papers from 2024:

npx tsx ${CLAUDE_PLUGIN_ROOT}/scripts/filter.ts refs.bib --year=2024 --output=2024-papers.bib

Find articles about machine learning:

npx tsx ${CLAUDE_PLUGIN_ROOT}/scripts/filter.ts refs.bib --keyword="machine learning"

Filter by type:

npx tsx ${CLAUDE_PLUGIN_ROOT}/scripts/filter.ts refs.bib --type=article-journal

Combine multiple criteria:

npx tsx ${CLAUDE_PLUGIN_ROOT}/scripts/filter.ts refs.bib --author=Smith --year=2024 --type=article

Output

Total entries: 150
Filtered entries: 12
[Filtered bibliography output...]

Matching Behavior

  • ID: Exact match
  • Author: Case-insensitive substring match (checks all authors)
  • Year: Exact year match
  • Type: Exact type match (e.g., "article-journal")
  • Keyword: Case-insensitive substring match

Use Cases

Extract subset for a specific paper:

npx tsx ${CLAUDE_PLUGIN_ROOT}/scripts/filter.ts main.bib --keyword="neural networks" --output=nn-refs.bib

Find all books:

npx tsx ${CLAUDE_PLUGIN_ROOT}/scripts/filter.ts refs.bib --type=book

Get recent publications:

npx tsx ${CLAUDE_PLUGIN_ROOT}/scripts/filter.ts refs.bib --year=2024

Notes

  • Format is auto-detected
  • Output uses same format as input
  • Empty results return empty bibliography file
  • Can be combined with --sort for ordered output