orphan-ref-validator

orphan-ref-validator is a skill for Claude Code from rjmurillo/ai-agents. It costs 90 tokens per session (5,829 once invoked), scanned E, original, MIT.

A validation tool that checks structured project files for references to skills, scripts, rules, or instructions that no longer exist.

In plain words
What is it for?
Use it to scan specifications, ADRs, test fixtures, manifests, and skill descriptions during build validation.
Why use it?
It catches broken references before they reach a commit or pull request and cause later failures.

Skill for Claude Code

Written for Claude Code: ${CLAUDE_PLUGIN_ROOT variable. Also seen: reads .claude/ paths; built for gstack.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the project-toolkit plugin — 125 skills, 25 commands, 33 agents, 5 hooks shipped together

Good fit Use it to scan specifications, ADRs, test fixtures, manifests, and skill descriptions during build validation.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add rjmurillo/ai-agents
Claude Code
/plugin install project-toolkit

Made for: Claude Code.

Or install project-toolkit, the plugin that ships this one along with the rest of its 125 skills, 25 commands, 33 agents, 5 hooks.

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 orphan-ref-validator

README.md
[![agentmods](https://agentmods.dev/badge/skills/rjmurillo/ai-agents/orphan-ref-validator/github.svg)](https://agentmods.dev/skills/rjmurillo/ai-agents/orphan-ref-validator)
Your own site
<a href="https://agentmods.dev/skills/rjmurillo/ai-agents/orphan-ref-validator"><img src="https://agentmods.dev/badge/skills/rjmurillo/ai-agents/orphan-ref-validator/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 orphan-ref-validator

Your own site · 80×15
<a href="https://agentmods.dev/skills/rjmurillo/ai-agents/orphan-ref-validator"><img src="https://agentmods.dev/badge/skills/rjmurillo/ai-agents/orphan-ref-validator.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 90 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,829 The whole file, excluding the scripts and references it only reads on demand.
Security scan E 2 findings. A grade says what 26 rules found in the file — not that it is safe. ✓ AI security review Fable 5.1 · 7 Sept 2026 📄 Read the review
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.00090 $0.05829
Opus 5.5 $0.00036 $0.02332
Sonnet 5.5 $0.00018 $0.01166
Haiku 4.5 $0.00009 $0.00583

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

Security

Grade E, and why

orphan-ref-validator scanned grade E with 2 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.

The scan reads SKILL.md. This mod also ships 7 executable files (scripts/__init__.py, scripts/counts.py, scripts/envelope.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.

Hidden instructionshighPrompt injection

Directives inside HTML comments, invisible characters or bidirectional overrides are read by the model and not by the person reviewing the file.

| `<!-- orphan-ref-ignore-file -->` | Whole file | Anywhere in the **first 50 lines** of the file | Skip the file entirely; emit no findings and report suppressed references under `directive_suppressed`. |

Reaches for credential fileshighPrivilege escalation

SSH keys, cloud credentials, git-credentials, .npmrc, /etc/shadow: reading these is how a config file becomes a credential leak.

Target paths are resolved with `pathlib.Path.resolve()` and must lie under the repository root. Paths outside the repo, broken symlinks, symlink loops, outside-repo symlinks, walk errors, stat errors, unreadable files, a
.claude/skills/orphan-ref-validator/SKILL.md · 392 lines

How it starts

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

orphan-ref-validator

Purpose

Scans structured artifacts (specs, ADRs, eval fixtures, plugin manifests, skill descriptions) for references to entities that do not exist in the working tree:

  • Skill names that no longer have a .claude/skills/<name>/ directory. Emitted as Finding(kind="skill_name", severity="critical").
  • Script paths under build/scripts/, scripts/validation/, scripts/, or tests/ that are not present on disk. Emitted as Finding(kind="script_path", severity="critical").
  • Rule and instruction paths under .claude/rules/, .github/instructions/, or src/copilot-cli/instructions/ that are not present on disk. Emitted as Finding(kind="rule_path" | "instruction_path", severity="critical").
  • Retired-surface paths: a citation of the slash-command directory that ADR-064 retired, in live guidance documents only (skills, rules, instruction mirrors; not source code). Emitted as Finding(kind="retired_path", severity="critical"). A line that says Migrated from or names ADR-064 records the retirement and is not flagged. Specs, ADRs, and tests are dated records and are not checked.

Emits findings per the ADR-056 envelope and a final verdict line. Exit code follows ADR-035: VERDICT: PASS or VERDICT: WARN exits 0; VERDICT: CRITICAL_FAIL exits 1; usage/configuration or incomplete scan exits 2; external failures exit 3; permission failures exit 4.

The skill ships with vendored installs. Missing targets are errors by default. Use --allow-missing-targets only when the caller intentionally runs in a partial vendored tree, and use --allow-empty-scan only when zero scanned files is the declared scope.

Triggers

Trigger Effect
scan for orphan refs Run with default targets
validate orphan references Run on a specific path
check skill catalog drift Run with default targets
build mandatory exit gate Invoked by the build lifecycle command

Path conventions

Read the full file on GitHub · 392 lines

Files

What ships with it

7 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. 4d ago Changed · +2 lines 382435ebd587
  2. 9d ago Changed 3fc02d9b5e48
  3. 18d ago Changed · +8 lines 4e22d313c073
  4. 20d ago Changed ce7259ac343c
  5. 22d ago Changed · +6 lines 1f0d39dcc44b
  6. 24d ago Changed 0ffb68f80a12
  7. 1mo ago Changed · +1 lines bb97f98ab993
  8. 1mo ago First seen · 375 lines · 90 tokens per session scan E 69f9c7a8e800

Subscribe to this mod's changes

orphan-ref-validator is a skill published in the GitHub repository rjmurillo/ai-agents (48 stars, last pushed today), licensed MIT. It adds 90 tokens to every session and 5,829 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it E with 2 findings (hidden instructions, reaches for credential files). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.