citation-parser

A sub-agent that extracts structured reference details from bibliography sections and inline citations. It can read author, year, title, DOI, venue, and the original citation text.

In plain words
What is it for?
Parsing references from LaTeX, Markdown, article prose, or mixed citation sections.
Why use it?
It turns messy citation text into consistent records that another process can verify, deduplicate, and link. It can also skip sections that the user has marked for exclusion.

Agent

Part of the paper-trail plugin — 6 skills, 22 commands, 6 agents, 3 hooks shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/roomi-fields/paper-trail/citation-parser
Clone the repo
git clone --depth 1 https://github.com/roomi-fields/paper-trail

Or install paper-trail, the plugin that ships this one along with the rest of its 6 skills, 22 commands, 6 agents, 3 hooks.

Per session 88 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,827 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00088 $0.02827
Opus 5 $0.00044 $0.01413
Sonnet 5 $0.00018 $0.00565
Haiku 4.5 $0.00009 $0.00283

Measured 3d ago against content hash 85214d3364ec, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

citation-parser scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

agents/citation-parser.md · 233 lines

How it starts

The opening of the file, as written. The whole thing — 233 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Sub-agent : citation-parser

Role

Parse raw bibliographic text from a SOTA or article into structured citation records. Designed to be called once per section to keep the main agent's context free of LLM extraction noise.

The output is consumed by pipeline/ingest.py which then identifies each citation (Crossref / S2 DOI resolution), deduplicates against the registry, creates new refs, and substitutes text with wikilinks.

Input contract

input_text: |
  <raw text block — typically a "## Références" section, a
  paragraph containing inline citations, or a numbered list of
  bibliography entries>

context_hint: bibliography | inline | mixed
  # bibliography : section like "## Références" with one entry per line
  # inline       : prose paragraph with "Auteur (YYYY)" style refs
  # mixed        : both possible

skip_sections:
  - "Écartées"
  - "Rejetées"
  - "Hallucinées"
  - "Retracted"
  # any section whose header matches these (case-insensitive) is
  # NOT to be parsed (the user has volontarily excluded them)

Output contract

[
  {
    "author": "Heydari, M. & Mahadevan, M. & Duan, Z.",
    "year": "2021",
    "title": "BeatNet: CRNN and Particle Filtering for Online Joint Beat Downbeat and Meter Tracking",
    "doi": null,
    "arxiv_id": null,
    "venue": "ISMIR",
    "raw": "Heydari et al., \"BeatNet: CRNN and Particle Filtering for Online Joint Beat Downbeat and Meter Tracking\", ISMIR 2021",
    "confidence": "high",
    "source_offset": 1247
  },
  {
    "author": "Chang, Y.-C. & Su, L.",
    "year": "2024",
    "title": "BEAST: Online Joint Beat and Downbeat Tracking Based on Streaming Transformer",
    "doi": null,
    "arxiv_id": "2312.17156",
    "venue": "ICASSP",
    "raw": "Chang & Su, \"BEAST: Online Joint Beat and Downbeat Tracking Based on Streaming Transformer\", ICASSP 2024 (arXiv:2312.17156)",
    "confidence": "high",
    "source_offset": 1438
  }
]

Field semantics :

  • author : authors as written, comma-separated full names where possible. Preserve initials if that's all there is.
  • year : 4-digit string. If a range ("1999-2002"), use the earliest.
  • title : the work's title, verbatim. Strip surrounding quotes only.
  • doi : if explicit in the text ("doi:10.xxx" or "https://doi.org/..."), extract. Otherwise null.
  • arxiv_id : if explicit ("arXiv:2312.17156"), extract. Otherwise null.
  • venue : conference / journal name if mentioned. Otherwise null.
  • raw : the exact substring of input_text matching this citation, for traceability and substitution.
  • confidence : high (clean parse), medium (some fields guessed), low (probably not a citation — flag for human review).
  • source_offset : byte offset of raw in input_text, for substitution.

Read the full file on GitHub · 233 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 233 lines · 88 tokens per session scan A 85214d3364ec

Subscribe to this mod's changes

citation-parser is an agent published in the GitHub repository roomi-fields/paper-trail (5 stars, last pushed 10d ago), licensed MIT. It adds 88 tokens to every session and 2,827 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.