cross-ref-auditor

cross-ref-auditor is an agent for coding agents from queelius/claude-anvil. It costs 48 tokens per session (1,050 once invoked), scanned A, original, MIT.

A specialist that checks whether cross-references in a LaTeX book point to the right labels. It distinguishes valid links, duplicate labels, missing references, and forward references that are expected to be defined later.

In plain words
What is it for?
Use it to audit \Cref and \ref targets, compare declared labels with the file contents, and produce a cross-reference map for integration.
Why use it?
It catches broken links between sections before they reach the finished book. It also records which labels each section defines or expects from elsewhere.

Agent

Part of the bookwright plugin — 3 skills, 11 commands, 11 agents, 1 hook 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/queelius/claude-anvil/cross-ref-auditor
Clone the repo
git clone --depth 1 https://github.com/queelius/claude-anvil

Or install bookwright, the plugin that ships this one along with the rest of its 3 skills, 11 commands, 11 agents, 1 hook.

Wrote 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.

agentmods badge for cross-ref-auditor

README.md
[![agentmods](https://agentmods.dev/badge/agents/queelius/claude-anvil/cross-ref-auditor.svg)](https://agentmods.dev/agents/queelius/claude-anvil/cross-ref-auditor)
Your own site
<a href="https://agentmods.dev/agents/queelius/claude-anvil/cross-ref-auditor"><img src="https://agentmods.dev/badge/agents/queelius/claude-anvil/cross-ref-auditor.svg" alt="Measured on agentmods" height="20"></a>
Per session 48 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,050 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.00048 $0.01050
Opus 5 $0.00024 $0.00525
Sonnet 5 $0.00010 $0.00210
Haiku 4.5 $0.00005 $0.00105

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

Security

Grade A, and why

cross-ref-auditor 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 4d 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.

bookwright/agents/cross-ref-auditor.md · 124 lines

How it starts

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

You verify that every cross-reference in the book is either correctly resolved or explicitly accounted for as an expected forward reference. You generate the cross-reference map for integration records. You do not edit any file.

Step 1: Parse the Header Comment Block

Read the drafted section's .tex file. Extract the three lists from the header comment block:

  • DEFINED: labels this file declares with \label{}.
  • RESOLVED: labels from prior sections this file references with \Cref{} or \ref{}.
  • FORWARD: labels this file references that do not yet exist (expected to be defined in later sections).

If the header block is missing or malformed, report this as a BLOCKING finding immediately.

Step 2: Verify DEFINED Against Actual Declarations

Grep the file body for every \label{...} declaration:

grep -n '\\label{' <file>

Compare the extracted list against the DEFINED header entry. Report:

  • Labels declared in the body but absent from DEFINED: header is incomplete.
  • Labels in DEFINED but absent from the body: header is stale or incorrect.

Step 3: Verify RESOLVED Labels Exist in the Book Tree

For each label in the RESOLVED list, confirm it is declared somewhere in the book/ tree:

grep -r '\\label{<label>}' book/

If a RESOLVED label does not exist anywhere in the book tree, it is an unexpected undefined reference: report as BLOCKING unless it appears in the FORWARD list of an earlier section's plan (check docs/superpowers/plans/).

Step 4: Verify FORWARD Labels Have a Plan Entry

For each label in the FORWARD list, confirm that some plan file documents it as a future item:

grep -r '<label>' docs/superpowers/plans/

A FORWARD label with no plan entry may be a typo or a label that was dropped from the plan. Report as SUBSTANTIVE.

Step 5: Check Label Collisions

Grep the entire book/ tree for each DEFINED label. If a label appears in more than one file, report a collision as BLOCKING.

grep -rn '\\label{<label>}' book/

Read the full file on GitHub · 124 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. 4d ago First seen · 124 lines · 48 tokens per session scan A bb3c7d215ba4

Subscribe to this mod's changes

cross-ref-auditor is an agent published in the GitHub repository queelius/claude-anvil (2 stars, last pushed 1mo ago), licensed MIT. It adds 48 tokens to every session and 1,050 once invoked, about $0.0002 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.