skill-link-check

skill-link-check is a skill for Claude Code, Codex from yan-labs/yan-skills. It costs 64 tokens per session (1,012 once invoked), scanned A, original, MIT.

An audit tool for checking whether agent-skill folders have the correct source and mirror links. It checks both project and global skill locations.

In plain words
What is it for?
Verifying .agents/skills and .claude/skills layouts, identifying misplaced or unsynced skills, and producing evidence-based repair commands.
Why use it?
It helps explain why a skill or command is missing, duplicated, inconsistent, or not loading, without changing the audited folders.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: reads .claude/ paths; positional $N argument.

Good fit Verifying .agents/skills and .claude/skills layouts, identifying misplaced or unsynced skills, and producing evidence-based repair commands.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/yan-labs/yan-skills/skill-link-check
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 yan-labs/yan-skills --skill skill-link-check
Clone the repo
git clone --depth 1 https://github.com/yan-labs/yan-skills

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 skill-link-check

README.md
[![agentmods](https://agentmods.dev/badge/skills/yan-labs/yan-skills/skill-link-check/github.svg)](https://agentmods.dev/skills/yan-labs/yan-skills/skill-link-check)
Your own site
<a href="https://agentmods.dev/skills/yan-labs/yan-skills/skill-link-check"><img src="https://agentmods.dev/badge/skills/yan-labs/yan-skills/skill-link-check/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 skill-link-check

Your own site · 80×15
<a href="https://agentmods.dev/skills/yan-labs/yan-skills/skill-link-check"><img src="https://agentmods.dev/badge/skills/yan-labs/yan-skills/skill-link-check.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 64 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,012 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. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 6 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Rogue Agent · line 17
    Skill modifies its own code, configuration, or behavior at runtime. Self-modification enables an agent to escalate privileges, disable safety constraints, or install persistent backdoors.
    Fix: Prevent the skill from modifying its own code, SKILL.md, or configuration files. Treat skill files as read-only at runtime.
  • high Rogue Agent · line 20
    Skill modifies its own code, configuration, or behavior at runtime. Self-modification enables an agent to escalate privileges, disable safety constraints, or install persistent backdoors.
    Fix: Prevent the skill from modifying its own code, SKILL.md, or configuration files. Treat skill files as read-only at runtime.
  • medium Agent Snooping · line 3
    Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.
    Fix: Remove all code or instructions that list or read other skills' files or directories. Skills should operate independently; cross-skill access is a privilege escalation.
  • medium MCP Rug Pull · line 14
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
  • medium MCP Rug Pull · line 17
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
  • medium MCP Rug Pull · line 20
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
How audits are shown
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.00064 $0.01012
Opus 5.5 $0.00026 $0.00405
Sonnet 5.5 $0.00013 $0.00202
Haiku 4.5 $0.00006 $0.00101

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

Security

Grade A, and why

skill-link-check 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 1mo ago.

The scan reads SKILL.md. This mod also ships 2 executable files (check.py, tests/test_check.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.

skill-link-check/SKILL.md · 92 lines

What it actually says

安装与更新

来源:Skills.sh

# 首次全局安装,或更新失败时重新安装
npx skills add yan-labs/yan-skills --skill skill-link-check -g -y

# 更新已安装的全局 Skill
npx skills update skill-link-check -g -y

若使用项目级安装,去掉安装命令中的 -g;项目级更新使用 npx skills update skill-link-check -p -y。

本 Skill 只审计目录布局,不自动移动、删除或覆盖文件:

  • .agents/skills/<name>/ 保存真实源文件。
  • .claude/skills 要么整体链接到 .agents/skills,要么通过逐个子项链接镜像它。

最常见的漂移是 Skill 被直接创建成 .claude/skills/<name>/ 真实目录,却没有进入 .agents/skills/。它看似已安装,实际不会随正常备份、同步或迁移流程保存。

完成条件与退出码

在 /goal 或持续执行任务里,以审计证据完整为完成条件:从目标项目运行脚本,报告每个适用作用域的布局、问题分类和退出状态。有问题时列数量、路径和建议命令;无问题时报告 clean。脚本不修改被审计目录。

  • 0:审计完成且无问题。
  • 1:审计完成且发现问题;这仍是有效结果。
  • Python traceback、参数错误或目标不可读:执行失败,查明后重跑。

运行方式

python3 "$(dirname "$0")/check.py"

默认审计:

  • Project:当前目录下的 .agents/skills 与 .claude/skills。
  • Global:$HOME 下的同名目录。

自动化或 checker 可使用:

# 明确指定项目,避免依赖当前工作目录
python3 "$(dirname "$0")/check.py" --project-root /path/to/project

# 只查一个作用域
python3 "$(dirname "$0")/check.py" --project-only
python3 "$(dirname "$0")/check.py" --global-only

# 输出稳定 JSON 证据;发现问题时仍返回 1
python3 "$(dirname "$0")/check.py" --json

两种合法布局

两种模式都应通过:

  1. Parent symlink:.claude/skills 本身指向 .agents/skills。新增 Skill 自动保持一致。
  2. Per-child symlinks:.claude/skills 是真实目录,每个 .claude/skills/<name> 指向 ../../.agents/skills/<name>。

脚本会自动识别模式,不要求为了统一风格而改造一个本来健康的布局。

问题分类

  • orphan-in-claude:.claude/skills/ 中有真实条目,但 .agents/skills/ 没有对应源文件。报告时优先列出。
  • missing-link:源 Skill 存在,但运行时镜像缺失。
  • not-symlink:逐子项模式下,镜像位置是重复的真实文件或目录。
  • broken-symlink:链接目标不存在,包括损坏的父级链接。
  • wrong-target:链接存在,但指向错误 Skill 或 .agents/skills 之外。

报告规则

  1. 先给总问题数和分类计数;有 orphan-in-claude 时先报告它。
  2. 每项给出名称、证据路径和一行解释。
  3. 原样附上脚本生成的建议修复命令,便于用户复核后执行。
  4. 不自动修复。孤儿目录可能是用户尚未迁移的工作,重复目录也可能已经分叉;自动移动或删除会造成数据损失。
  5. 如果全部健康,一句话说明适用作用域及布局模式即可结束。

验证 Skill 自身

python3 -m unittest discover -s "$(dirname "$0")/tests" -v
Files

What ships with it

3 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. 1mo ago Changed · -8 lines · -57 tokens per session 40a496296aa1
  2. 2mo ago First seen · 100 lines · 121 tokens per session scan A 914ae8dc9f82

Subscribe to this mod's changes

skill-link-check is a skill published in the GitHub repository yan-labs/yan-skills (228 stars, last pushed 2d ago), licensed MIT. It adds 64 tokens to every session and 1,012 once invoked, about $0.0003 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-30.

Related

Other skills, from other repositories