citation-anchor-resolver

citation-anchor-resolver is a skill for Claude Code, Codex from EthanYoQ/Skill-hub. It costs 307 tokens per session (2,383 once invoked), scanned A, original, MIT.

A citation checker that reads a report's citation markers and resolves them to source files such as guideline documents, research records, or clinical-trial records. It verifies claims by checking whether their keywords appear in the cited source text.

In plain words
What is it for?
Use it to parse citations, retrieve the referenced source passage, and check whether a specific factual claim is supported by that passage.
Why use it?
It prevents reports from quietly falling back to remembered or built-in facts when a source is missing. A missing source or absent matching text is reported as unverified.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions CLAUDE.md.

Good fit Use it to parse citations, retrieve the referenced source passage, and check whether a specific factual claim is supported by that passage.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ethanyoq/skill-hub/citation-anchor-resolver
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.

Any agent
npx skills add EthanYoQ/Skill-hub --skill citation-anchor-resolver
Clone the repo
git clone --depth 1 https://github.com/EthanYoQ/Skill-hub

Made for: Claude Code, Codex.

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 citation-anchor-resolver

README.md
[![agentmods](https://agentmods.dev/badge/skills/ethanyoq/skill-hub/citation-anchor-resolver/github.svg)](https://agentmods.dev/skills/ethanyoq/skill-hub/citation-anchor-resolver)
Your own site
<a href="https://agentmods.dev/skills/ethanyoq/skill-hub/citation-anchor-resolver"><img src="https://agentmods.dev/badge/skills/ethanyoq/skill-hub/citation-anchor-resolver/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 citation-anchor-resolver

Your own site · 80×15
<a href="https://agentmods.dev/skills/ethanyoq/skill-hub/citation-anchor-resolver"><img src="https://agentmods.dev/badge/skills/ethanyoq/skill-hub/citation-anchor-resolver.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 307 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,383 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.00307 $0.02383
Opus 5.5 $0.00123 $0.00953
Sonnet 5.5 $0.00061 $0.00477
Haiku 4.5 $0.00031 $0.00238

Measured 2mo ago against content hash 732bbfb7527a, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

citation-anchor-resolver 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 2mo ago.

The scan reads SKILL.md. This mod also ships 5 executable files (scripts/__init__.py, scripts/_anchor_schema.py, scripts/_keyword_match.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

archives/user-installed-skills/citation-anchor-resolver/de29313b62832c40/citation-anchor-resolver/SKILL.md · 196 lines

How it starts

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

citation-anchor-resolver

TL;DR

输入:报告文本 + 一个 citation 锚点字符串 + sources_dir 目录 输出:锚点对应的源原文片段、或事实声明的关键词核对结果(verified True/False)

3 个公开函数:

  • parse_citations_in_text(text) — 扫描文本提取所有锚点 + 上下文
  • resolve_citation(anchor, sources_dir) — 锚点 → 源文本片段
  • verify_claim_against_source(claim_text, citation, sources_dir) — 核对 claim 关键词

Iron Law(P0 守护,绝对不可违反)

本 skill 是 Cite-or-Block 架构的基石。永远不做以下事:

  • ❌ 维护"已知 PMID 列表 / 已知指南列表 / 已知药品列表"等任何字典
  • ❌ 在 resolve 失败时 fallback 到"内置答案"
  • ❌ 用 LLM 生成关键词的"语义匹配",必须用严格 substring(可加规范化)
  • ❌ 任何形如 _known_xxx_fallback.py / KNOWN_XX_LIST = [...] 的代码

唯一允许的姿势:

  • ✅ 打开 sources_dir 内的源文件(JSON/HTML/PDF/text)
  • ✅ 用字符串 in 操作核对关键词
  • ✅ 源里没有 → 返回 verified=False
  • ✅ 锚点解析不出文件 → 返回 None

源里没有 = verified=False,无例外。

Citation 锚点 schema

格式:[<source_type>:<source_id>:<locator>]

source_type source_id 形如 文件路径(相对 sources_dir) locator 例
guideline CSCO-2024-NSCLC guidelines/CSCO-2024-NSCLC.{txt,md,html,pdf} + .toc.json §5.5.2
pmid 12345678 pubmed/12345678.json abstract / title
nct NCT01828099 trials/NCT01828099.json results / eligibility
aact NCT01828099 aact/NCT01828099.json results
europepmc PMC1234567 europepmc/PMC1234567.json abstract
bioc PMC1234567 bioc/PMC1234567.json intro / methods / results
evidence 01_lit.md <sources_dir>/../evidence/01_lit.md line:42 / line:42-58
nmpa-page H20180123 nmpa/H20180123.{html,json} (可空)

详见 references/anchor-schema.md 和 references/source-types.md。

公开 API

from resolver import (
    parse_citations_in_text,
    resolve_citation,
    verify_claim_against_source,
)

# 1. 扫文本拿锚点
cites = parse_citations_in_text(report_html)
# [{"anchor": Citation(...), "anchor_str": "[pmid:12345678:abstract]",
#   "claim_sentence": "...", "position": 42}, ...]

# 2. 锚点 → 源原文
src = resolve_citation("[guideline:CSCO-2024-NSCLC:§5.5.2]", sources_dir)
# str(源章节内容)or None

# 3. 核对关键词
res = verify_claim_against_source(
    claim_text="洛拉替尼商品名博瑞纳",
    citation="[guideline:CSCO-2024-NSCLC:§5.5.2]",
    sources_dir=sources_dir,
)
# {"verified": True, "matched_keywords": [...], "missing_keywords": [],
#  "source_excerpt": "...", "reason": "all keywords matched"}

Read the full file on GitHub · 196 lines

Files

What ships with it

8 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 2mo ago First seen · 196 lines · 307 tokens per session scan A 732bbfb7527a

Subscribe to this mod's changes

citation-anchor-resolver is a skill published in the GitHub repository EthanYoQ/Skill-hub (12 stars, last pushed 2d ago), licensed MIT. It adds 307 tokens to every session and 2,383 once invoked, about $0.0012 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-09-13.

Related

citation-anchor-resolver compared with skills from other repositories

citation-anchor-resolver next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
citation-anchor-resolverEthanYoQ/Skill-hubSkill122d agoMITA307Claude Code, Codex
wikiSethGammon/CitadelSkill9433d agoMITA56Claude Code
debriefspacedock-dev/spacedockSkill873d agoApache-2.0A59Claude Code
document-processorvignesh2027/Claude-Agentic-Skills2.0-versionSkill43mo agoMITA65Claude Code, Codex
create-proposalHarmeet10000/skillsSkill86mo agoMITA8Claude Code, Codex
contract-generatorinbharatai/claude-skillsSkill448mo agoMITA25Claude Code, Codex
docxinbharatai/claude-skillsSkill448mo agoMITA35Claude Code, Codex