testing-test-writing
编写最小、专注的测试,涵盖核心用户流程和主要工作流程,避免在开发过程中过度测试。在决定测试什么、编写行为导向的测试、清晰命名测试用例、模拟外部依赖或保持测试速度时使用此技能。在完成功能实现并添加战略测试、测试关键路径而非边缘情况,或将边缘情况测试推迟到专用测试阶段时应用。
📖 中文导读:编写最小、专注的测试,涵盖核心用户流程和主要工作流程,避免在开发过程中过度测试。在决定测试什么、编写行为导向的测试、清晰命名测试用例、模拟外部依赖或保持测试速度时使用此技能。在完成功能实现并添加战略测试、测试关键路径而非边缘情况,或将边缘情况测试推迟到专用测试阶段时应用。 以下正文为该技能的原始 SKILL.md 内容(英文),上方安装命令可直接使用。
name: Testing Test Writing description: Write minimal, focused tests that cover core user flows and primary workflows without over-testing during development. Use this skill when deciding what to test, writing behavior-focused tests, naming test cases clearly, mocking external dependencies, or keeping tests fast. Apply when completing feature implementation and adding strategic tests, testing critical paths rather than edge cases, or deferring edge case testing to dedicated testing phases.
When to use this skill:
- When deciding what tests to write during feature development
- When identifying core user flows and primary workflows to test
- When writing behavior-focused tests instead of implementation tests
- When naming test cases with clear descriptions of what is being tested
- When mocking databases, APIs, file systems, and external services
- When keeping unit tests fast (milliseconds) for frequent execution
- When deferring edge case and error state testing
- When completing a feature and adding strategic tests at logical completion points
- When avoiding over-testing non-critical utilities
- When balancing test coverage with development velocity
- When ensuring tests describe expected outcomes in their names
Testing Test Writing
This Skill provides Claude Code with specific guidance on how to adhere to coding standards as they relate to how it should handle testing test writing.
Instructions
For details, refer to the information provided in this file: testing test writing