@adlc/skill-rot

中文文档
1.12.0发布于 2026/10/10MITES Module构建来源已验证近 30 天下载 8225

Validates the verifiable claims inside skills — cache invalidation for skill rot (P7/C10).

原始使用文档
文档目录7 节
  1. Usage
  2. Flags
  3. What gets verified
  4. Exit codes
  5. Examples
  6. Relationship to sibling tools
  7. Core gaps

skill-rot

ADLC phase: P7 — cache invalidation (C10)

Skills are caches. skill-rot validates that the verifiable claims inside each SKILL.md file still hold against the current repository. Stale skills deliver misinformation with the authority of a cached expert — worse than no skill at all. Run weekly in CI to keep the skill corpus honest.

Usage

skill-rot [path ...] [--write] [--json]

Default search roots (searched only when they exist):

  • .claude/skills
  • .agents/skills
  • skills

Pass one or more explicit path arguments to override the defaults.

Symlinked skill directories and symlinked SKILL.md files are followed, with cycle detection preventing infinite recursion on recursive symlink graphs. Directories named node_modules or .git below a search root are skipped. A symlink resolving into one is skipped during default discovery and is an operational error (exit 1) when you pass explicit paths; name the target path to check it.

Flags

FlagDescription
--writeWhen all claims in a skill are ok, upsert last-verified: <YYYY-MM-DD> into the skill's frontmatter (created if absent). Skills with stale claims or zero claims are never stamped.
--jsonMachine-readable output for orchestrators. Prints a JSON object with skills[] and summary.

What gets verified

For each SKILL.md file found recursively (skipping node_modules and .git):

  1. Commands — backtick-enclosed spans and fenced code block lines whose first token looks like a command name. Verified via:

    • ./node_modules/.bin/<cmd> presence, OR
    • sh -c 'command -v <cmd>'

    Placeholder tokens are skipped: <ANGLE_BRACKETS> and UPPERCASE_VARS (3+ chars, all caps/underscores/digits) are never counted as stale.

  2. File paths — tokens containing / and a file extension (e.g. src/index.mjs). Checked via existsSync from the repo root and from the skill's own directory.

  3. Script references — npm run X, npx X, pnpm X, yarn X patterns. Key X is looked up in scripts of the root package.json. If no package.json exists, the claim is unverifiable.

Claim statuses:

  • ok — verifiable and passes
  • stale — verifiable but fails (counts toward gate failure)
  • unverifiable — cannot determine truth (URLs, no package.json, ambiguous)

Unverifiable claims are never counted as stale. Skills with zero checkable claims are reported as [NO-CLAIMS] and are never stamped under --write. A skill whose claims are all unverifiable is reported as [UNVERIFIED], is not counted clean, and is never stamped.

Exit codes

CodeMeaning
0Gate passes — no skill has stale claims
1Operational error — no SKILL.md files found, bad input, or an explicit path that cannot be fully inspected
2Gate fails — at least one skill has stale claims

Examples

# Check defaults (.claude/skills, .agents/skills, skills)
skill-rot

# Check specific directories
skill-rot .claude/skills .agents/skills

# Stamp clean skills with today's date
skill-rot --write

# JSON output for CI integrations
skill-rot --json

Relationship to sibling tools

  • lesson-foundry (C9) — produces skills; skill-rot validates they stay fresh
  • review-calibration (C8) — calibrates review quality; skill-rot prevents outdated guidance corrupting that calibration loop
  • gate-manifest (C11) — can consume skill-rot exit code as a provenance signal

Core gaps

None. This tool uses only Node 18+ built-ins and @adlc/core for CLI utilities (parseArgs, pass, gateFail, opError, printJson).

版本与发布记录

@adlc/skill-rot 共发布 18 个版本,首次发布于 2026/06/14;过去 12 个月发布了 18 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
1.12.0latest2026/10/1027 天前
1.11.12026/09/091 个月前
1.11.02026/08/252 个月前
1.10.02026/08/112 个月前
1.9.02026/08/092 个月前
1.8.02026/08/082 个月前

关于 @adlc/skill-rot 的常见问题

@adlc/skill-rot 是什么?

Validates the verifiable claims inside skills — cache invalidation for skill rot (P7/C10).

如何安装 @adlc/skill-rot?

在项目目录运行 npm install @adlc/skill-rot,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 skill-rot,可以用 npx skill-rot 直接运行。

@adlc/skill-rot 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/adlc__skill-rot 是否存在。

@adlc/skill-rot 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@adlc/skill-rot 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=18。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@adlc/skill-rot 可以商用吗?

@adlc/skill-rot 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@adlc/skill-rot 的下载量有多少?

根据 npm 官方下载统计,@adlc/skill-rot 在 2026/10/05 – 2026/11/03 这 30 天内被下载 8,225 次,日均约 274 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@adlc/skill-rot 还在维护吗?

最新版本 1.12.0 发布于 2026/10/10(27 天前);至今共发布 18 个版本,其中过去 12 个月发布了 18 个;首次发布于 2026/06/14。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。