Index of every page on this site: llms.txt
All skills
steelan9199 avatar

/node-version-compatibility-tester-yashu

@9e01957
Run it yourself

自动测试指定技能在不同Node.js LTS版本下的兼容性。激活条件:用户消息须包含以下关键词之一:`测试Node版本兼容性`、`多版本Node测试`、`Node版本兼容性测试`。

  • 5 files
  • 43.6 KB
  • Updated 4 months ago
  • GitHub
Use this Skill: https://skilld.dev/gh/steelan9199/wechat-publisher/node-version-compatibility-tester-yashu

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencesnode-version-query.md

≈1k tokens on demand. Your agent reads this file only when SKILL.md points to it.

必测 Node 版本与 NVM 查询规则

加载时机:执行【兼容性测试模式】步骤 1「检查环境」之前,必须先加载本文件,以确定最新 LTS 版本号。

必须测试的三个 Node.js 版本号

序号 版本号 来源
1 18.20.8 固定硬编码
2 20.20.1 固定硬编码
3 当前最新 LTS 版本 执行时通过本机 NVM 动态查询

强制约束:第 3 项的版本号禁止硬编码,禁止使用 WebSearch 查询,必须通过 NVM 命令实时获取。

最新 LTS 版本的 NVM 查询规则

⛔ 常见错误:用 nvm list 替代 nvm list available

这是兼容性测试中最常见的流程违规。 AI 经常会跳过 nvm list available,直接用 nvm list 看到"当前在用某版本",就假设那个版本是最新 LTS。

命令 数据来源 能看到什么 看不到什么
nvm list 本机磁盘 本机已安装的 Node.js 版本 远程官方发布的新版本
nvm list available Node.js 官方发布服务器 所有远程可用的版本(含最新 LTS) —

为什么这个区别至关重要?

  • 如果最新 LTS 是 24.18.0,但本机只装了 22.22.1:
    • nvm list → 看到 22.22.1 → AI 可能错误地认为"最新 LTS = 22.22.1" → 测试了错误的版本
    • nvm list available → 看到最新 LTS = 24.18.0 → AI 发现本机未安装 → 正确中断并提示安装

❌ 错误做法:nvm list → 看到 24.18.0 (Currently using) → "好,最新 LTS = 24.18.0" ✅ 正确做法:nvm list available → 解析 LTS 列 → "最新 LTS = 24.18.0" → nvm list → "本机是否安装了 24.18.0?"

第一步:选择对应平台命令执行 NVM 查询

平台 NVM 命令 输出特征
Windows(nvm-windows) nvm list available 表格输出,列依次为 CURRENT / LTS / OLD STABLE / OLD UNSTABLE
macOS/Linux(nvm) nvm ls-remote --lts 多行列表输出,每行一个版本号,带 (Latest LTS: 代号) 后缀

第二步:从输出中提取最新 LTS 版本号

  • Windows:跳过表头行与 |---|---|---| 分隔行,提取第一行数据行的第 2 列(LTS 列)的版本号
  • macOS/Linux:取输出中版本号最大的那一行(即排序最后一行),或带 (Latest LTS: ...) 后缀的那一行

第三步:去除版本号前的 v 前缀

如有 v 前缀,去除后得到形如 24.18.0 的纯版本号字符串。

示例:Windows

执行 nvm list available 得到:

|   CURRENT    |     LTS      |  OLD STABLE  | OLD UNSTABLE |
|--------------|--------------|--------------|--------------|
|    26.4.0    |   24.18.0    |   0.12.18    |   0.11.16    |

→ 提取到的最新 LTS 版本号为 24.18.0。

示例:macOS/Linux

执行 nvm ls-remote --lts 输出的最后一行:

        v24.18.0   (Latest LTS: Krypton)

→ 去除 v 前缀,得到 24.18.0。

最新 LTS 版本缺失处理规则(强制)

在主 SOP 步骤 1 检查环境时,通过 nvm list 查询已安装版本,如果发现当前最新 LTS 版本未安装:

  1. 立即中断整个兼容性测试程序,不再继续执行后续步骤
  2. 向用户发出明确提醒,告知需要安装的具体最新 LTS 版本号(例如:检测到当前最新 LTS 版本为 x.y.z,但本机未安装,无法完成兼容性测试)
  3. 同时提供可直接复制粘贴的安装命令:
    • Windows(nvm-windows):nvm install x.y.z
    • macOS/Linux(nvm):nvm install x.y.z
  4. 等待用户安装完成并重新触发测试

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No third-party reports yet.

Signed by skilld at 9e01957. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 3 weeks ago.

Activeupdated 4 months ago

README badge

README badge for steelan9199/wechat-publisher/node-version-compatibility-tester-yashu