Borrowing it
Nothing to install: this file belongs to shenjingnan/xiaozhi-client. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/shenjingnan/xiaozhi-client/main/.agents/skills/test-creator/SKILL.mdgit clone --depth 1 https://github.com/shenjingnan/xiaozhi-clientWrote 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.
[](https://agentmods.dev/skills/shenjingnan/xiaozhi-client/test-creator)<a href="https://agentmods.dev/skills/shenjingnan/xiaozhi-client/test-creator"><img src="https://agentmods.dev/badge/skills/shenjingnan/xiaozhi-client/test-creator/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.
<a href="https://agentmods.dev/skills/shenjingnan/xiaozhi-client/test-creator"><img src="https://agentmods.dev/badge/skills/shenjingnan/xiaozhi-client/test-creator.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00017 | $0.01106 |
| Opus 5 | $0.00009 | $0.00553 |
| Sonnet 5 | $0.00003 | $0.00221 |
| Haiku 4.5 | $0.00002 | $0.00111 |
Grade A, and why
test-creator 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 9d 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.
How it starts
The opening of the file, as written. The whole thing — 157 lines — stays where its author put it; the contents beside it link to each section on GitHub.
测试创建技能
我是一个测试创建专家,专门为 xiaozhi-client 项目生成符合标准的测试用例。
我的能力
当你需要创建测试用例时,我会:
- 分析测试需求 - 确定测试范围、场景和 Mock 策略
- 生成测试文件 - 创建符合项目标准的完整测试文件
- 确保覆盖率 - 满足 80% 覆盖率要求
- 执行质量检查 - 验证测试代码质量
使用方式
使用格式:/test-create [测试类型] [目标文件或模块]
示例:
/test-create mcp-tool "core/unified-server"/test-create cli-command "cli/commands/start"/test-create transport "transports/websocket-adapter"/test-create utility "utils/config-parser"/test-create type "types/xiaozhi-config"/test-create service "managers/connection-manager"
支持的测试类型
mcp-tool - MCP 工具测试
- 测试重点:参数验证、API 调用、设备查找、错误处理
- Mock 对象:外部服务、设备状态数据
service - 服务类测试
- 测试重点:业务逻辑、数据转换、异常处理
- Mock 对象:外部 API、数据库连接
utility - 工具函数测试
- 测试重点:输入输出、边界值、类型安全
- Mock 对象:通常无需 Mock
type - 类型定义测试
- 测试重点:类型构造函数、类型守卫、错误类型
- Mock 对象:根据具体需求定
cli-command - CLI 命令测试
- 测试重点:参数解析、配置加载、错误输出
- Mock 对象:process.argv、console.log、文件系统
transport - 传输层适配器测试
- 测试重点:连接建立、消息收发、错误处理、重连
- Mock 对象:WebSocket、HTTP 服务器
测试文件结构
import { describe, expect, it, beforeEach, afterEach, vi } from "vitest";
// 导入要测试的模块(使用项目路径别名)
import { TargetClass, TargetFunction } from "@/module/target-module";
// 导入类型定义
import type { TargetType } from "@/module/target-module";
describe("测试描述", () => {
beforeEach(() => {
// 测试前的准备工作
});
afterEach(() => {
// 测试后的清理工作
vi.clearAllMocks();
});
describe("功能分组", () => {
it("应该正确处理基本场景", async () => {
// 基础功能测试
});
it("应该正确处理边界条件", async () => {
// 边界条件测试
});
it("应该正确处理错误情况", async () => {
// 错误处理测试
});
});
});
测试覆盖要求
基于 xiaozhi-client 项目覆盖率目标(80% 分支、函数、行、语句):
必须覆盖的场景
- 正常流程:所有主要功能路径
- 边界条件:最小值、最大值、空值、null/undefined
- 错误处理:所有异常分支和错误码
- 异步操作:Promise、async/await 的各种状态
测试数据设计
- 有效数据:符合预期的正常输入
- 无效数据:各种格式错误的输入
- 边界数据:临界值和极值
- 特殊数据:null、undefined、空字符串、空数组
测试执行命令
# 运行所有测试
pnpm test
# 运行特定测试文件
pnpm test src/server/{module}/{target}.test.ts
# 生成覆盖率报告
pnpm test:coverage
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.
- 9d ago First seen · 157 lines · 17 tokens per session scan A d11b534a349e
test-creator is a skill published in the GitHub repository shenjingnan/xiaozhi-client (338 stars, last pushed 6d ago), licensed MIT. It adds 17 tokens to every session and 1,106 once invoked, about $0.0001 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.
Other skills, from other repositories
research-engineer
An uncompromising Academic Research Engineer. Operates with absolute scientific rigor, objective criticism, and zero flair. Focuses on theoretical correctness, formal verification, and optimal implementation across any required technology.
tika-eval-compare
Compare extracts from two Tika builds over a corpus to detect regressions in content, encoding, exceptions, and embedded-document handling. Use for "compare before/after extracts", "eval this change against the corpus".
neuron-evaluation-engineer
Create and run AI evaluations with datasets, assertions, and output drivers in Neuron AI. Use this skill whenever the user mentions evaluation, testing AI systems, creating evaluators, dataset-driven testing, assertion-based validation, or wants to measure AI system performance. Also trigger for tasks involving…
jetson-validate-image
Use after jetson-flash-image to run static BSP checks, on-target smoke/regression tests on a flashed DUT, or both. Not for build or flash steps. Triggers: validate bsp, on-target validation.
atmos-validation
Validate Atmos projects, components, arbitrary JSON Schema inputs, EditorConfig, and GitHub Actions; use affected-file selection and native CI annotations.
skill-benchmark
Benchmark AI skill effectiveness by measuring implementation quality against legacy constraints.