# Bibtex Reference Adder

> Add one or more papers to an existing BibTeX bibliography when the user provides a title, link, raw BibTeX, or mixed citation details and wants the final entry cleaned to match the target file's house style. Use when the task requires confirming the source BibTeX, normalizing the entry type and fields, omitting DOI, renaming the citation key to sequential-number-plus-first-author-initial form, checking for duplicates, and removing stray junk such as CVF text before appending to the .bib file.

- Skill: `daughter-of-void/bibtex-reference-adder` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add daughter-of-void/bibtex-reference-adder`
- Raw SKILL.md: https://api.skillmd.com/api/skills/daughter-of-void/bibtex-reference-adder/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Research & Search
- Author: Daughter-of-Void (https://skillmd.com/u/daughter-of-void)
- Updated: 2026-09-22
- Page: https://skillmd.com/skills/daughter-of-void/bibtex-reference-adder

---


# BibTeX Reference Adder

Use this skill when the user wants to add references to an existing `.bib` file and the new entries must match the file's current style rather than preserving publisher-exported BibTeX verbatim.

## Inputs

The user may provide any mix of:

- paper title
- paper link
- raw `bibtex`
- author, venue, year, pages, arXiv, or report information
- target `.bib` file

Treat partial input as normal. Gather the missing details before writing the final entry.

## Workflow

1. Read the target `.bib` file first and match its local style.
2. Identify the paper from the user-provided title, link, or raw entry.
3. Confirm the source BibTeX from the most reliable available source.
   Preferred sources: official publisher page, official proceedings page, arXiv page, or the user's raw BibTeX if it is clearly correct.
4. Convert the source entry into the target file's house style.
5. Remove unwanted or stray content.
6. Check for duplicates before appending.
7. Only then write the final BibTeX entry into the target file.
8. If a citation intake document or explicit insertion locations are provided, update the target LaTeX draft after the BibTeX step:
   - Map each intake item to its final citation key, including both newly added keys and duplicate entries that already existed in the `.bib` file.
   - Insert `\cite{...}` or `~\cite{...}` at the recorded source-text anchor without rewriting unrelated prose.
   - When inserting multiple citation keys in one citation command, format them with a comma followed by a space, for example `~\cite{82D, 128L}` rather than `~\cite{82D,128L}`.
   - Reuse existing nearby citation commands when appropriate instead of creating duplicate adjacent citations.
   - Verify that every inserted key exists in the target `.bib` file.
   - Update the intake document status when useful, for example `added-as-128L` or `already-in-bib-67L`.

## Normalization Rules

- Keep the entry type aligned with the real publication type, using the closest style already present in the target file such as `@inproceedings`, `@article`, `@techreport`, or `@incollection`.
- Omit `doi` even if it appears in the original source.
- Keep only fields that fit the target file's style. Do not preserve every exported field by default.
- Preserve BibTeX-safe capitalization for acronyms, model names, venue abbreviations, and other tokens that should stay uppercase by wrapping them in `{}` when needed.
- Preserve author names in valid BibTeX / LaTeX form when special characters are present.
- Use BibTeX page ranges such as `41--50`.
- Follow the spacing and field layout already used by the target file.

## Preferred Field Sets

Use the smallest field set that still matches the target bibliography's existing conventions.

- `@inproceedings`: `author`, `title`, `booktitle`, `year`, `pages` when available
- `@article`: `author`, `title`, `journal`, `year`, `volume` when available, plus `number`, `pages`, or `eid` when appropriate
- `@techreport`: `author`, `title`, `institution`, `type`, `year`, and only keep `eprint` / `archivePrefix` when they fit the target file's current style
- `@incollection`: `author`, `title`, `booktitle`, `year`, `pages`, `publisher`, `address`

## Citation Key Rule

Rename the entry key to:

`<next-sequential-number><first-author-surname-initial>`

Examples:

- `119S`
- `120K`

Rules:

- Find the current highest numeric prefix already present in the target file.
- Increment it by 1 for the new entry.
- Use the uppercase initial of the first author's surname.
- Do not preserve the source site's original key.

## Duplicate Check

Before appending, check whether the paper already exists in the target file.

Use title-first matching, then confirm with author, year, and venue or journal details. Treat light formatting differences as possible duplicates. If a duplicate exists:

- do not append a second copy
- prefer the cleaner version that better matches the target file's style

## Junk Cleanup

Remove any invalid stray text that does not belong in a BibTeX entry or field list.

Explicitly watch for:

- `CVF`
- `/CVF`
- dangling text between entries
- malformed leftover fragments copied from websites or PDFs

If the target file already contains stray junk, clean it while making the edit when it is safe to do so.

## Output Behavior

Before writing, confirm these points in your reasoning and user-facing summary:

- the source BibTeX was confirmed
- the entry was normalized to the target file's style
- `doi` was not included
- the new key was computed correctly
- duplicate check passed or a duplicate was intentionally skipped
- citation insertion into the LaTeX draft was completed or intentionally skipped
- stray junk such as `CVF` was removed if found

When returning the result, prefer showing the cleaned final entry or clearly stating that no new entry was added because it was already present.

