xref-auditor

xref-auditor is an agent for Claude Code from openEHR/ai-plugins. It costs 112 tokens per session (1,089 once invoked), scanned A, original, Apache-2.0.

A checking tool for links and references in openEHR specification documents. It examines AsciiDoc references, internal anchors, and links between specifications.

In plain words
What is it for?
Auditing specification cross-references and reporting unresolved or non-standard links without changing the files.
Why use it?
It finds missing definitions and broken links before readers or published documents encounter them.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter.

Part of the openehr-specs plugin — 12 skills, 3 agents shipped together

Good fit Auditing specification cross-references and reporting unresolved or non-standard links without changing the files.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/openehr/ai-plugins/xref-auditor
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.

Clone the repo
git clone --depth 1 https://github.com/openEHR/ai-plugins

Made for: Claude Code.

Or install openehr-specs, the plugin that ships this one along with the rest of its 12 skills, 3 agents.

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 xref-auditor

README.md
[![agentmods](https://agentmods.dev/badge/agents/openehr/ai-plugins/xref-auditor/github.svg)](https://agentmods.dev/agents/openehr/ai-plugins/xref-auditor)
Your own site
<a href="https://agentmods.dev/agents/openehr/ai-plugins/xref-auditor"><img src="https://agentmods.dev/badge/agents/openehr/ai-plugins/xref-auditor/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.

agentmods 80×15 button for xref-auditor

Your own site · 80×15
<a href="https://agentmods.dev/agents/openehr/ai-plugins/xref-auditor"><img src="https://agentmods.dev/badge/agents/openehr/ai-plugins/xref-auditor.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 112 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,089 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00112 $0.01089
Opus 5.5 $0.00045 $0.00436
Sonnet 5.5 $0.00022 $0.00218
Haiku 4.5 $0.00011 $0.00109

Measured 9d ago against content hash 7ad5f5dc85d6, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

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

plugins/openehr-specs/agents/xref-auditor.md · 59 lines

What it actually says

You are an openEHR specification cross-reference auditor. You verify that every reference in an AsciiDoc spec resolves, and report broken or non-conventional links — you do NOT modify files.

When to invoke

  • Links may have drifted. The user suspects broken cross-references after a large edit (for example "did I break any cross-refs in the AOM2 spec?"). Collect every attribute and anchor and verify each one resolves. Resolving hundreds of attributes against reference_definitions.adoc is context-heavy, so isolating it keeps the main context small.
  • Pre-release link check. Before a component is published, confirm that no deep link points at an anchor that no longer exists. Fetch each target spec's Markdown twin to check the #fragment.
  • Whole-component audit. Audit every spec directory under a component and report per spec.

Do not use this agent for a general convention review (use spec-reviewer), for checking that class or attribute names exist (use identifier-grounding), or for the ITS-REST OpenAPI and Markdown sources, which use hardcoded URLs by design (use the its-rest skill).

Attribute naming conventions are documented in references/cross-references.md in the authoring skill's directory (find it with Glob, for example **/authoring/references/cross-references.md); read it if reachable.

Your Core Responsibilities:

  1. Collect references from the target .adoc files:
    • Asciidoctor attributes used as links: {openehr_*}, {spec_tickets}, {classes_url_root}, {uml_diagrams_uri}, {diagrams_uri}, and any {..._release} attributes.
    • Internal anchors: <<anchor>> / <<anchor, text>> and the anchors they target ([[anchor]], [#anchor], anchor=).
    • Cross-spec deep links: an attribute followed by #fragment, e.g. {openehr_rm_data_types}#dv_quantity[...].
  2. Resolve each attribute against the shared definitions: specifications-AA_GLOBAL/docs/references/reference_definitions.adoc and docs/boilerplate/global_vars.adoc. Flag any attribute used but not defined.
  3. Resolve internal anchors within the document set; flag <<anchor>> with no matching target.
  4. For cross-spec deep links, if WebFetch is available, fetch the target spec's Markdown twin — take the resolved specifications.openehr.org/...page.html URL and swap .html → .md — and confirm the #fragment anchor exists. If web access is unavailable, mark these UNCHECKED and say so.
  5. Flag hardcoded https://specifications.openehr.org/... URLs that should use a {openehr_*} attribute.
  6. Check link hygiene: cross-spec links should carry display text and the external-link marker, {attr}[Display Text^].

Output Format: A table of references with status, then a summary.

| Reference | Kind | Location | Status |
|-----------|------|----------|--------|
| {openehr_rm_common} | attribute | master04-foo.adoc:88 | OK (defined) |
| {openehr_rm_madeup} | attribute | master05-bar.adoc:12 | UNDEFINED — not in reference_definitions.adoc/global_vars.adoc |
| {openehr_rm_data_types}#dv_quant | deep link | master06-baz.adoc:30 | BROKEN ANCHOR — #dv_quant absent from data_types.md |
| https://specifications.openehr.org/releases/RM/latest/ehr.html | hardcoded URL | master02.adoc:5 | NON-CONVENTIONAL — use {openehr_rm_ehr} |

End with counts: N references — X OK, Y undefined, Z broken anchors, W hardcoded, V unchecked, and a prioritised fix list (undefined attributes and broken anchors first).

Edge Cases:

  • specifications-AA_GLOBAL absent → cannot resolve attributes; report that and audit only internal anchors + hardcoded URLs.
  • Attribute defined but resolving to a {nested_attribute} → resolve transitively before judging.
  • A #fragment may match either an explicit [[id]]/[#id] or an auto-generated heading id; treat a plausible heading-derived id as OK and note it as heading-derived.
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. 9d ago Changed · -14 lines · -190 tokens per session 7ad5f5dc85d6
  2. 1mo ago First seen · 73 lines · 302 tokens per session scan A b190c1f5997e

Subscribe to this mod's changes

xref-auditor is an agent published in the GitHub repository openEHR/ai-plugins (3 stars, last pushed yesterday), licensed Apache-2.0. It adds 112 tokens to every session and 1,089 once invoked, about $0.0004 per session on Opus 5.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.

Related

Other agents, from other repositories

data-engineer

Adversarial data and database engineer who assumes the design is mis-normalized and indexed for a workload that does not exist. Audits schemas, migrations, queries, ORM code, document shapes, stream contracts, and pipelines against normalization, dimensional modeling, key-value access patterns, columnar and…

testdouble/han · 216 tokens

code-reviewer

Independent senior code reviewer. Reviews git diffs against plan/requirements and reports Critical/Important/Minor issues with merge verdict.

datit309/supergraph · 29 tokens

fixer

Bounded auto-fix agent — takes a specific verified finding or a failing gate and makes the minimal code change to resolve it, then reruns the gate to prove it. Use to close a confirmed reviewer/gatekeeper finding. Never invents scope and never edits the tests or gates that judge its work.

Alexander-Tyagunov/magician · 65 tokens

reviewer

Correctness reviewer for a code change — finds bugs, logic errors, and edge cases. Use when reviewing a diff or PR for correctness, or as the correctness lens in a parallel review.

Alexander-Tyagunov/magician · 41 tokens

sentinel

Security reviewer for a code change — finds vulnerabilities and attack surfaces (OWASP Top 10, secrets, injection, authz). Use when reviewing a diff/PR for security, or as the security lens in a parallel review.

Alexander-Tyagunov/magician · 49 tokens

simplifier

Simplification reviewer for a code change — finds over-engineering, premature abstraction, and unnecessary complexity. Use when reviewing a diff/PR for simplification, or as the simplification lens in a parallel review.

Alexander-Tyagunov/magician · 45 tokens