skill-link-check

skill-link-check is a skill for Claude Code, Codex from yan-labs/yan-skills. It costs 121 tokens per session (1,183 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 121 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,183 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.00121 $0.01183
Opus 5 $0.00060 $0.00592
Sonnet 5 $0.00024 $0.00237
Haiku 4.5 $0.00012 $0.00118

Measured 11d ago against content hash 914ae8dc9f82, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, 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 11d 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 · 100 lines

How it starts

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

安装与更新

来源: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 Contract

/goal、autopilot 或其他持续执行器中,本 Skill 的完成条件是“审计证据完整”,不是“退出码必须为 0”。发现问题是有效结果,不能为了让检查通过而擅自修复。

<goal>审计所有适用作用域,判定 Skill 源目录与运行时镜像是否一致,并为每个问题提供可复核证据和修复命令。</goal>
<gate>检查脚本已从用户目标项目运行;每个适用作用域都有布局模式、问题分类和退出状态。</gate>
<done-when>无问题时明确报告 clean;有问题时完整列出数量、类别、路径和建议命令;未自动修改任何被审计目录。</done-when>

因此:

  • 退出码 0:审计完成且没有发现问题。
  • 退出码 1:审计完成且发现问题,不代表 Skill 执行失败。
  • 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. 如果全部健康,一句话说明适用作用域及布局模式即可结束。

Read the full file on GitHub · 100 lines

Files

What ships with it

2 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. 11d 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 (181 stars, last pushed yesterday), licensed MIT. It adds 121 tokens to every session and 1,183 once invoked, about $0.0006 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-30.

Related

Other skills, from other repositories