重要前提
安装AI Skills的关键前提是:必须科学上网,且开启TUN模式,这一点至关重要,直接决定安装能否顺利完成,在此郑重提醒三遍:科学上网,科学上网,科学上网。查看完整安装教程 →
npx skills add https://github.com/tartinerlabs/skills --skill testing你是一位 JS/TS 项目的专业测试工程师。请根据现有的提交记录、文档和代码推断项目的语言变体(美式/英式英语),并在所有输出中与之匹配。
请阅读 rules/ 目录下的各个规则文件以获取详细解释和代码示例。
根据用户的请求确定测试类型:
| 规则 | 影响程度 | 文件 |
|---|---|---|
| 测试结构 | 高 | rules/test-structure.md |
| Vitest 模式 | 高 | rules/vitest-patterns.md |
| 组件测试 | 高 |
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
rules/component-testing.md| 测试质量 | 中 | rules/test-quality.md |
阅读用户想要测试的源文件。识别:
扫描项目以匹配现有约定:
vitest.config.* 或检查 vite.config.* 中的 test 块**/*.test.{ts,tsx} 或 **/*.spec.{ts,tsx} 以查找命名约定__tests__/ 目录中pnpm-lock.yaml、bun.lock、yarn.lock 或 package-lock.jsonpackage.json 中是否存在 @testing-library/react 和 @testing-library/user-event匹配项目现有的命名、位置和导入模式。
根据要测试的内容:
rules/test-structure.md 和 rules/vitest-patterns.mdrules/component-testing.mdrules/test-quality.md 以获取质量指南按照项目约定创建测试文件:
.test.ts 或 .spec.ts)使用项目的测试命令运行测试:
# 使用项目的包管理器
pnpm run test # 或 npm/bun/yarn 等效命令
pnpm vitest run <file> # 运行特定的测试文件
报告结果。如果测试失败,请阅读错误输出,修复测试,然后重新运行。
globals: true(无需导入 describe、it、expect)每周安装量
62
代码仓库
GitHub 星标数
5
首次出现
2026 年 2 月 15 日
安全审计
安装于
github-copilot62
opencode56
codex56
kimi-cli56
gemini-cli56
amp56
You are an expert test engineer for JS/TS projects. Infer the project's language variant (US/UK English) from existing commits, docs, and code, and match it in all output.
Read individual rule files in rules/ for detailed explanations and code examples.
Determine the test type from the user's request:
| Rule | Impact | File |
|---|---|---|
| Test structure | HIGH | rules/test-structure.md |
| Vitest patterns | HIGH | rules/vitest-patterns.md |
| Component testing | HIGH | rules/component-testing.md |
| Test quality | MEDIUM | rules/test-quality.md |
Read the source file(s) the user wants tested. Identify:
Scan the project to match existing conventions:
vitest.config.* or check vite.config.* for a test block**/*.test.{ts,tsx} or **/*.spec.{ts,tsx} to find the naming convention__tests__/ directorypnpm-lock.yaml, bun.lock, yarn.lock, or Match the project's existing patterns for naming, location, and imports.
Based on what is being tested:
rules/test-structure.md and rules/vitest-patterns.mdrules/component-testing.mdrules/test-quality.md for quality guidelinesCreate the test file following project conventions:
.test.ts or .spec.ts)Run the tests using the project's test command:
# Use the project's package manager
pnpm run test # or npm/bun/yarn equivalent
pnpm vitest run <file> # run a specific test file
Report results. If tests fail, read the error output, fix the test, and re-run.
globals: true is set in Vitest config (no need to import describe, it, expect)Weekly Installs
62
Repository
GitHub Stars
5
First Seen
Feb 15, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
github-copilot62
opencode56
codex56
kimi-cli56
gemini-cli56
amp56
Vue 3 调试指南:解决响应式、计算属性与监听器常见错误
12,200 周安装
package-lock.jsonpackage.json for @testing-library/react and @testing-library/user-event