agentleFS
KhaledSaeed18KhaledSaeed18/dotclaude/skills/academic/bibtex-manager/SKILL.md

bibtex-manager

Skill5 starsChanged 4 months agoMITView on GitHub

Maintain the thesis .bib file as a single source of truth: fetch verified BibTeX from a DOI, arXiv id, or title via CrossRef and arXiv, normalise citation keys (firstauthorYEARkeyword), deduplicate entries, fix fields BibTeX and biblatex care about, and export to Zotero-friendly form when the writing happens in Word. Use when adding references, cleaning a messy bibliography, resolving duplicate keys, or converting a reading list into a .bib.

We split this skill into the rules it gives an agent

7 rules. About 0 are common, 4 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Resolve the identifier to metadata from an authority: Never write an entry by hand from a memory of the paper.

    line 11
  2. Distinctive:

    Run these checks and report before changing anything:

    line 22
  3. Distinctive:

    When the thesis is written in Word with Zotero:

    line 36
  4. Very specific:

    Import the .bib into Zotero (File → Import) or install Better BibTeX and set the .bib as an auto-export of the thesis collection, so the …

    line 38
  5. Very specific:

    Never edit an entry only in Zotero.

    line 40
  6. Very specific:

    No entry without an identifier that resolved today.

    line 44
  7. Distinctive:

    Never delete an entry without saying which citations in the text will break.

    line 45

≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

The .bib file is the one place a reference is allowed to exist. Every \cite{} in LaTeX, every [@key] in Markdown, and every Zotero item in Word traces back to an entry here that was fetched from an authority, never typed from memory.

Add an entry

  1. Resolve the identifier to metadata from an authority. Never write an entry by hand from a memory of the paper.
    • DOI: curl -sL -H "Accept: application/x-bibtex" "https://doi.org/<doi>" gives publisher BibTeX. Cross-check title and year against https://api.crossref.org/works/<doi>.
    • arXiv id: curl -s "http://export.arxiv.org/api/query?id_list=<id>" and build a @misc (or @article with journal = {arXiv preprint arXiv:<id>}) with eprint, archivePrefix = {arXiv}, primaryClass. If the paper was later published, prefer the published DOI and keep the arXiv id in eprint.
    • Title only: https://api.crossref.org/works?query.bibliographic=<title>&rows=3, confirm the top hit's title matches before taking its DOI; if it does not, tell the student rather than guessing.
  2. Normalise the key to <firstauthorsurname><year><firstsignificanttitleword>, lowercase ASCII (smith2023feedback). Collisions get a letter suffix (smith2023feedbacka). Keep the student's existing key convention if the file already has one.
  3. Clean the fields. Read reference/fields.md. In short: protect capitals in titles with braces ({LLM}, {Python}), use and between authors, ISO-free year/month, doi without the https://doi.org/ prefix, url only when there is no DOI, no abstract or keywords noise unless the student wants them, page ranges with --.
  4. Choose the entry type from the source, not the venue name: @inproceedings for conference papers (with booktitle), @article for journals (journal, volume, number, pages), @book, @incollection, @phdthesis, @techreport, @misc for preprints and web pages (howpublished, note = {Accessed YYYY-MM-DD}).
  5. Append to the .bib (default references.bib or the path in the thesis config), keeping the file sorted by key if it already is.

Clean an existing file

Run these checks and report before changing anything:

  • Duplicate DOIs or near-duplicate titles (normalised, first 60 chars): merge, keep the richest entry, note which key was removed so the text can be updated.
  • Keys that do not match the convention: propose renames; apply only with --rename, and then update every \cite/[@…] in the source files the student names.
  • Missing required fields per type (see the reference): list them; fetch from CrossRef when a DOI is present.
  • Unprotected capitals in titles, & unescaped in booktitle, pages with a single hyphen, month as a number in quotes.
  • Entries with no DOI, arXiv id, or URL: flag as unverifiable so citation-verifier can chase them.

From a reading list

Given reading-list.md from literature-search, add every entry via step 1 using its DOI or arXiv id, and write a mapping key -> title at the end of the reply so paper-reader notes can use the same keys.

Zotero and Word

When the thesis is written in Word with Zotero:

  • Import the .bib into Zotero (File → Import) or install Better BibTeX and set the .bib as an auto-export of the thesis collection, so the file remains the source of truth and Zotero is the view.
  • Match Better BibTeX's key pattern to the convention above (auth.lower + year + shorttitle(1,1).lower) so keys are identical in both worlds.
  • Never edit an entry only in Zotero; fix the .bib and re-import.

Rules

  • No entry without an identifier that resolved today. If the student insists on an unresolvable source (a lecture, an internal report), it goes in as @misc with a note explaining the provenance, and is listed in the reply as unverified.
  • Never delete an entry without saying which citations in the text will break.
  • Preserve the student's manual field additions (annote, file) when rewriting an entry.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

Reviews can't be read right now.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.