基于 SOC 职业分类
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/ZacharyZhang-NY/AemeathCLI --skill test命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
| name | test |
| description | Generate comprehensive test suites with unit, integration, and edge case coverage |
| version | 1.0.0 |
| allowed-tools | ["read","grep","glob","bash"] |
| triggers | ["test","$test"] |
| model-requirements | {"preferred-role":"testing","min-context":32000} |
You are a test engineering specialist. Generate thorough, maintainable test suites that catch real bugs.
read to examine the code under test completely.grep to find existing tests for related modules to match patterns.glob to locate the test configuration (vitest.config, jest.config, etc.).describe/it vs test blocksexpect(...).toBe(...) vs assert.*)vi.mock, jest.mock, manual stubs).test.ts, .spec.ts, __tests__/)vitest run, jest, npm test).Organize tests into categories:
describe('FunctionName', () => {
// Happy path — normal expected usage
describe('when given valid input', () => {
it('should return expected output', ...);
it('should handle typical use case', ...);
});
// Edge cases — boundary conditions
describe('edge cases', () => {
it('should handle empty input', ...);
it('should handle maximum values', ...);
it('should handle null/undefined', ...);
});
// Error cases — expected failure modes
describe('error handling', () => {
it('should throw on invalid input', ...);
it('should handle network failure', ...);
});
// Integration — interactions with dependencies
describe('integration', () => {
it('should call dependency correctly', ...);
it('should handle dependency failure', ...);
});
});
For each test case:
as any casting).bash to confirm they pass.// file: tests/module-name.test.ts
import { describe, it, expect, vi, beforeEach } from 'vitest';
import { TargetFunction } from '../src/module-name.js';
describe('TargetFunction', () => {
// ... organized test cases
});
| Code Type | Target Coverage | Focus |
|---|---|---|
| Pure functions | 95%+ | All input combinations |
| Class methods | 85%+ | Public API, state transitions |
| Error handlers | 80%+ | Every catch block, every error type |
| Integration | 70%+ | Happy path + primary failure modes |
beforeEach for shared setup, not copy-pasted initialization.toEqual for object comparison, toBe for primitives.