SuperAPI AI Directory

node-version-compatibility-tester

General & other

View repository

Updated 10-16 05:03

About this skill

🎯 Trigger Mapping

User input trigger words AI execution actions
"test Node version compatibility" / "multi-version Node testing" / "skill compatibility testing" Execute according to [Compatibility Testing Mode]

The three nodejs version numbers that must be tested

  • 20.20.1
  • 22.22.1
  • 24.14.0

[Compatibility Testing Mode]

Execution steps

Step Execution action Specific command/operation
1 Check environment Run RunCommand execute nvm list, confirm that the Node.js versions to be tested are installed
2 Confirm test scope The user specifies the skill path and Node.js version list to be tested (by default, test 3 LTS versions: 20.20.1, 22.22.1, 24.14.0)
3 Switch Node version Run RunCommand execute nvm use <version> switch to the corresponding Node.js version
4 Execute tests Check the documentation of the target skill, count how many features there are, perform actual runtime tests for each feature, refer to [How to Perform Actual Runtime Tests] below
5 Record test results Record the test results of each version (success/failure, error information) to a temporary file
6 Generate report Summarize the test results of all versions and generate a compatibility test report

⚠️ Test execution specifications (mandatory compliance)

Prohibited to use node --check syntax checking! Actual functional testing must be performed!

Judgment Operation method Description
✅ Correct According to the documentation of the target skill, perform actual runtime tests for each feature Actually run the skill features and verify the actual effect
❌ Incorrect Use node --check to perform basic checks on the code Only perform syntax checking, do not verify actual functionality

How to perform actual runtime tests

Detailed execution process of step 4:

Step 1: Dynamically analyze the target skill

读取 {目标技能路径}/SKILL.md
    │
    ├─ 提取功能列表 → 从"触发映射"表或"操作接口"表中获取
    │
    ├─ 提取脚本路径 → 识别 scripts/ 目录下的所有可执行文件
    │
    └─ 分析凭证需求 → 检查是否需要 token、apiKey、secret 等外部凭证

Step 2: Classify and handle features

Feature type Identifying characteristics Testing method
Local processing type URL parsing, file conversion, format processing Construct example parameters and directly execute tests
API call type Requires token, apiKey, secret Ask the user whether to provide credentials
Interactive type Requires user input Use simulated input to execute tests

Step 3: Read the documentation and execute tests

For each feature, the AI must:

  1. Carefully read the SKILL.md documentation of the target skill

    • Find the invocation method of the feature (command format, parameter format)
    • Understand what input parameters the feature requires
    • Confirm whether external credentials are needed
  2. Construct test parameters according to the documentation

    • Refer to the examples in the documentation
    • For features that require credentials, use AskUserQuestion to ask the user
  3. Execute the script as described in the documentation

    • Do not assume the command format, you must learn it from the documentation
    • Different skills may have different invocation methods:
      • node scripts/xxx.js --parameter-file-path params.json
      • python scripts/xxx.py --config config.yaml
      • node scripts/xxx.js --input "data"
      • or other methods defined in the documentation
  4. Record the actual output: success/failure + error message

Step 4: Handle credential requirements

功能需要凭证?
    │
    ├─ 是 → 使用 AskUserQuestion 询问:
    │       "测试 {功能名} 需要 {凭证类型},是否提供测试凭证?"
    │       │
    │       ├─ 用户提供 → 使用凭证构造参数,执行测试
    │       │
    │       └─ 用户不提供 → 标记为"跳过(缺少凭证)"
    │
    └─ 否 → 直接构造测试参数并执行

Test parameter construction guide

Feature type Test parameter construction method
URL parsing type Use an example URL:{"url": "https://example.com/path"}
File operation type Create a temporary file and pass in the file path
Format conversion type Use example data:{"input": "test data"}
API call type Requires the user to provide real credentials

Credential handling strategy

When the target skill requires external API credentials, handle it according to the following process:

功能需要凭证?
    │
    ├─ 是 → 询问用户:"测试 {功能名} 需要 {凭证类型},是否提供测试凭证?"
    │       │
    │       ├─ 用户提供凭证 → 使用凭证执行测试
    │       │
    │       └─ 用户不提供 → 标记为"跳过(缺少凭证)",继续测试其他功能
    │
    └─ 否 → 直接执行测试

Output result

Example output on success:

✅ Node.js版本兼容性测试完成

📊 测试结果汇总:
| Node.js版本 | 功能1 | 功能2 | 功能3 | 状态 |
|------------|-------|-------|-------|------|
| 20.20.1    | ✅ 通过 | ✅ 通过 | ✅ 通过 | 完全兼容 |
| 22.22.1    | ✅ 通过 | ✅ 通过 | ✅ 通过 | 完全兼容 |
| 24.14.0    | ✅ 通过 | ✅ 通过 | ✅ 通过 | 完全兼容 |

✅ 结论:该技能完美支持所有测试的Node.js LTS版本

📝 下一步:可以根据测试结果更新技能的环境要求说明

Example output on failure:

❌ Node.js版本兼容性测试发现问题

📊 测试结果汇总:
| Node.js版本 | 功能1 | 功能2 | 功能3 | 状态 |
|------------|-------|-------|-------|------|
| 20.20.1    | ❌ 失败 | -     | -     | 不兼容 |
| 22.22.1    | ✅ 通过 | ✅ 通过 | ✅ 通过 | 完全兼容 |
| 24.14.0    | ✅ 通过 | ✅ 通过 | ✅ 通过 | 完全兼容 |

❌ 问题说明:Node.js 20.20.1版本下功能1失败,错误信息:模块找不到
解决建议:检查技能依赖是否兼容Node.js 20.x版本,或者更新依赖配置

Error handling

Error scenario Error symptom Handling method
nvm is not installed Executenvm listError Prompt the user to install the nvm Node version management tool
The test version is not installed The user-specified Node version is not in nvm list Ask the user whether to install the corresponding version, or switch to another test version
Node version switch failed nvm use <version>Returns a non-zero exit code Check the nvm configuration, retry the switch, or skip that version
Skill runtime error The skill failed during testing Record the full error message and continue testing other versions

How to use this Skill

This skill is ageneral testing tool, and can test the compatibility of any user-specified skill under different Node.js versions.

General usage template

User input format:

Perform a Node.js version compatibility test on skill {目标技能路径} Perform Node.js version compatibility testing

AI execution process:

Step AI behavior Specific operation
1 Read the target skill documentation Read {目标技能路径}/SKILL.md
2 Extract the feature list Identify all feature modules and their corresponding scripts/commands from the documentation
3 Analyze credential requirements Determine whether each feature requires external API credentials
4 Ask the user (if credentials are needed) "Testing {skill name} requires {credential type}. Will you provide test credentials?"
5 Execute tests Run an actual execution test for each feature (using node --check)
6 Generate a report Summarize the test results for each Node.js version

Key points for test execution

For each target skill, the AI must:

  1. Read the target skill's SKILL.md documentation

    • Extract the feature list and script paths
    • Learn how to invoke each feature (command format, argument format)
  2. Do not assume the command format

    • Different skills have different invocation methods
    • The correct invocation method must be learned from the target skill's documentation
  3. Construct test arguments

    • Construct arguments based on the examples in the target skill's documentation
    • For features requiring credentials, ask the user
  4. Run real tests

    • Run the scripts in the manner described in the documentation
    • Record the actual output (success/failure + error message)

Example: Testing an arbitrary skill

User input:

For the skill skills\wechat-publisher-yashu perform Node.js version compatibility testing

AI execution:

  1. Read skills\wechat-publisher-yashu\SKILL.md
  2. Learn how to invoke each feature from the documentation
  3. Switch the Node version and run the tests as described in the documentation
  4. Record the results and switch to the next version to continue testing

Example: Testing a skill that requires credentials

User input:

For the skill skills\feishu-bitable perform Node.js version compatibility testing

AI execution:

  1. Read skills\feishu-bitable\SKILL.md, learn the invocation method
  2. Discover that Feishu API credentials are required, use AskUserQuestion to ask the user
  3. Run the tests or skip features requiring credentials based on the user's choice

Users can use this skill with a prompt similar to the following

Use the skills in the current projectskills\node-version-compatibility-tester, perform Node.js version compatibility testing on the skill in the current project skills\feishu-bitable Perform Node.js version compatibility testing