test-version

test-version is a command for coding agents from qiniu/skills. It costs 0 tokens per session (1,830 once invoked), scanned A, original, MIT.

A command for testing a draft version of an AppMarket application by creating a test instance and checking its deployment.

In plain words
What is it for?
Use it to test a draft app version with default or custom JSON inputs, choose a deployment region, wait for completion, and inspect outputs.
Why use it?
It avoids manually creating and monitoring a test deployment, and can optionally remove the test instance afterward.

Command

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.

agentmods
npx agentmods add commands/qiniu/skills/test-version
Clone the repo
git clone --depth 1 https://github.com/qiniu/skills

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 test-version

README.md
[![agentmods](https://agentmods.dev/badge/commands/qiniu/skills/test-version.svg)](https://agentmods.dev/commands/qiniu/skills/test-version)
Your own site
<a href="https://agentmods.dev/commands/qiniu/skills/test-version"><img src="https://agentmods.dev/badge/commands/qiniu/skills/test-version.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,830 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00000 $0.01830
Opus 5 $0.00000 $0.00915
Sonnet 5 $0.00000 $0.00366
Haiku 4.5 $0.00000 $0.00183

Measured 4d ago against content hash 2adcea96e651, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

test-version 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 4d ago.

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.

skills/appmarket-dev/references/commands/test-version.md · 245 lines

How it starts

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

test-version

测试 AppMarket Draft 版本,创建测试实例并验证部署功能。

命令说明/test-version 是 Claude Code 斜杠命令的简写,底层调用的是:

python3 scripts/appmarket-cli.py test-version --app-id <appID> --version <version> [options]

两种方式等价,本文档中的 /test-version 示例均可替换为上述 CLI 命令。


用法

/test-version <appID> <version> [options]

参数

参数 必需 说明 示例
appID 应用 ID app-xxxxxxxxxxxx
version 版本号(必须是 Draft 状态) 1.0.0, 1.0.0-draft
--region 部署区域 ap-northeast-1(默认)
--inputs 输入参数 JSON 文件路径 test-inputs.json
--wait 等待实例部署完成 默认启用
--cleanup 测试完成后自动删除实例 默认禁用

快速开始

1. 基本测试

使用默认参数测试 Draft 版本:

/test-version app-xxxxxxxxxxxx 1.0.0

命令会自动:

  1. 检查版本是否为 Draft 状态
  2. 使用 InputSchema 中的默认值创建测试实例
  3. 监控部署进度,输出实例状态和 outputs
  4. 部署完成(或失败)后打印摘要;实例不会自动删除,需手动调用 delete-instance 清理,或在测试时加 --cleanup

2. 自定义参数测试

使用自定义输入参数:

# 创建输入参数文件
cat > test-inputs.json <<EOF
{
  "instance_name": "test-mysql",
  "instance_type": "ecs.c1.c2m4",
  "system_disk_size": 50,
  "mysql_username": "admin",
  "mysql_password": "<YourPassword>",
  "mysql_db_name": "testdb"
}
EOF

# 执行测试
/test-version app-xxxxxxxxxxxx 1.0.0 --inputs test-inputs.json

3. 自动清理模式

测试完成后自动删除实例:

/test-version app-xxxxxxxxxxxx 1.0.0 --cleanup

注意--cleanup 仅在部署成功后自动删除实例。部署失败时始终保留实例,供 SSH 进去查看 cloud-init 日志排查问题;排查完毕后用 delete-instance 手动清理:

python3 scripts/appmarket-cli.py delete-instance \
  --instance-id appi-xxxxxxxxxxxx --region ap-northeast-1

错误处理

版本不是 Draft 状态

✗ 错误: 版本 1.0.0 状态为 Published,只能测试 Draft 版本

建议:
  1. 创建新的 Draft 版本进行测试
  2. 或使用现有的 Draft 版本

必需参数缺失

✗ 错误: InputSchema 中有必需参数但未提供默认值

缺失参数:
  - mysql_password (type: string, required: true)

解决方法:
  1. 在 InputSchema 中为必需参数添加默认值
  2. 或使用 --inputs 参数提供输入文件

区域不可用

✗ 错误: 指定的区域 'cn-west-1' 不可用

可用区域:
  - ap-northeast-1 (亚太东北)
  - ap-southeast-1 (亚太东南 1)
  - ap-southeast-2 (亚太东南 2)
  - cn-changshan-1 (常山)
  - cn-hongkong-1 (香港)
  - cn-shaoxing-1 (绍兴)

Read the full file on GitHub · 245 lines

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. 4d ago First seen · 245 lines · 0 tokens per session scan A 2adcea96e651

Subscribe to this mod's changes

test-version is a command published in the GitHub repository qiniu/skills (10 stars, last pushed 3mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,830 tokens. 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.