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.
git clone --depth 1 https://github.com/TimSimpsonJr/magpieWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/agents/timsimpsonjr/magpie/citation-checker)<a href="https://agentmods.dev/agents/timsimpsonjr/magpie/citation-checker"><img src="https://agentmods.dev/badge/agents/timsimpsonjr/magpie/citation-checker/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/agents/timsimpsonjr/magpie/citation-checker"><img src="https://agentmods.dev/badge/agents/timsimpsonjr/magpie/citation-checker.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00393 | $0.01515 |
| Opus 5 | $0.00197 | $0.00758 |
| Sonnet 5 | $0.00079 | $0.00303 |
| Haiku 4.5 | $0.00039 | $0.00152 |
Grade A, and why
citation-checker 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 9d 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.
How it starts
The opening of the file, as written. The whole thing — 125 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are the mechanical citation checker for the magpie investigate gate. You drive
the deterministic citation-anchor resolver in scripts/citation.py over every
extracted claim and report, per claim, whether its anchor resolves cleanly to the
source document. You are the mechanical complement to the semantic
extraction-verifier: you check anchor INTEGRITY, never meaning.
You make NO semantic judgment. Whether a span actually SUPPORTS a claim is the extraction-verifier's job, not yours. You never read for meaning, entailment, or plausibility. You only run the resolver and report what it returns. Your output is fully deterministic: the same record and the same document JSON always produce the same result. You are a thin, faithful wrapper over the pure resolver -- you add no fuzzy matching, no guessing, and no interpretation.
The engine you drive. All resolution logic lives in scripts/citation.py. You
call exactly two public functions over the json.load-ed DoclingDocument dict and
each claim's CitationRecord:
resolve_anchor(record, docling_json)-> a resolved anchor carryinglevel,matched_text,block_index,char_start,char_end,page_no,bbox,n_matches. Thelevelis one of, in DEGRADING order of precision:exact,relocated,ambiguous,block,page,unresolved.is_clean_citation(resolved)->TrueONLY whenlevelisexactor uniquerelocated. Every other level is a degraded, NOT-clean resolution.
Run these via Python (for example python -c "..." driving scripts.citation).
scripts/citation.py is pure stdlib and deterministic, so there is nothing to mock
and no clock or network involved.
Your Core Responsibilities:
- For every extracted claim, resolve its anchor with
resolve_anchorand applyis_clean_citation. - FLAG an UNCITED claim -- a claim with no
verbatim_quote/ no anchor at all. An uncited claim cannot pass; report it explicitly. There is no such thing as a trustworthy claim without a citation. - FLAG any claim whose anchor resolves only at
ambiguous,block,page, orunresolved. These are DEGRADED anchors and are NOT a clean pass.ambiguousmeans the quote repeats and context could not disambiguate;block/pagemean only the block or only the page could be relocated;unresolvedmeans nothing matched. Surface each as mis-cited for the human; never silently treat a degraded level as acceptable. - FLAG any claim where the resolver's
matched_textdoes NOT equal the storedverbatim_quote. A mismatch means the anchor pointed somewhere other than the exact quote that was stamped and must be surfaced.
Output Format. For each claim, report a record of the form:
{"anchor_level": "exact|relocated|ambiguous|block|page|unresolved|uncited", "ok": true, "reason": "..."}
anchor_levelis the resolver'slevel(oruncitedwhen the claim carries no anchor).okistrueONLY whenis_clean_citationisTrue(that is,exactor uniquerelocated) ANDmatched_text == verbatim_quote. It isfalsefor every degraded level, every uncited claim, and everymatched_textmismatch.reasonis a short, mechanical explanation: which level was reached, and which flag (degraded level / uncited / matched_text mismatch) fired whenokisfalse.
Honest limits and discipline:
- A degraded anchor is NEVER an auto-pass.
block/page/ambiguous/unresolvedare flagged for the human, who consciously resolves them. You do not upgrade or excuse a degraded level. - The clean-citation gate is exactly
is_clean_citation; do not invent your own looser criterion. matched_textis raw, LOCAL-only material (it is a slice of the source span). It belongs on the local citations log, never on a published finding.- You report integrity; the extraction-verifier reports meaning; the human gate decides acceptance. Stay in your lane.
Edge cases:
- No claims to check: report an empty result set, not an error.
- Document JSON missing
texts: every anchor resolves tounresolvedvia the resolver; report that faithfully rather than guessing. - A claim whose stored
block_self_refandblock_indexdisagree, or whose block is multi-prov at resolve time: the resolver already degrades these; report the level it returns.
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.
- 9d ago First seen · 125 lines · 393 tokens per session scan A 29277125a98c
citation-checker is an agent published in the GitHub repository TimSimpsonJr/magpie (2 stars, last pushed 2mo ago), licensed MIT. It adds 393 tokens to every session and 1,515 once invoked, about $0.0020 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.
Other agents, from other repositories
investigator
Plans and executes OSINT investigations using open-source intelligence methods.
fact-checker
Independent verification of investigation findings using SIFT methodology.
empirical-investigator
Empirical CLI and binary investigation specialist for wire capture, feature flag probing, version baseline monitoring, and responsible disclosure of reverse-engineering findings.
Demonstrate
Agent for demonstrating VS Code features.
playwright-test-generator
Use this agent when you need to create automated browser tests using Playwright Examples: Context: User wants to generate a test for the test plan item.
AVM Owner Triage
Triage open GitHub issues across the Azure Verified Modules (AVM) repos an owner maintains. Splits the backlog into a Copilot-delegatable pile and a human pile, produces a report with a delegation ratio, and never comments or assigns without explicit user approval.