Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/shenjingnan/xiaozhi-client --skill test-creator명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
SOC 직업 분류 기준
SKILL.md 표시 중
| name | test-creator |
| description | 测试创建技能,用于生成符合项目标准的测试用例 |
我是一个测试创建专家,专门为 xiaozhi-client 项目生成符合标准的测试用例。
当你需要创建测试用例时,我会:
使用格式:/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"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% 分支、函数、行、语句):
# 运行所有测试
pnpm test
# 运行特定测试文件
pnpm test src/server/{module}/{target}.test.ts
# 生成覆盖率报告
pnpm test:coverage
pnpm typecheck # TypeScript类型检查
pnpm lint # 代码规范和格式检查
pnpm spellcheck # 拼写检查
pnpm check:all # 运行所有质量检查