testing-test-writing

Write minimal, focused tests following KISS and YAGNI principles - test only core user flows during development, defer edge case testing, test behavior not implementation, use clear test names, mock external dependencies, and ensure fast test execution. Use this skill when creating test files, writing unit tests, integration tests, or component tests. Use when working with test frameworks (Jest, Vitest, pytest, RSpec, JUnit, Mocha), when deciding what to test and when, when writing test cases for critical paths and primary workflows, when mocking external services or databases, or when ensuring tests run quickly for developer productivity. Apply when creating test files (.test.ts, .spec.ts, test_*.py, *_test.go) or when implementing behavior-driven test cases.

📖 中文导读:Write minimal, focused tests following KISS and YAGNI principles - test only core user flows during development, defer edge case testing, test behavior not implementation, use clear test names, mock external dependencies, and ensure fast test execution. Use this skill when creating test files, writing unit tests, integration tests, or component tests. Use when working with test frameworks (Jest, Vitest, pytest, RSpec, JUnit, Mocha), when deciding what to test and when, when writing test cases for critical paths and primary workflows, when mocking external services or databases, or when ensuring tests run quickly for developer productivity. Apply when creating test files (.test.ts, .spec.ts, test_*.py, *_test.go) or when implementing behavior-driven test cases. 以下正文为该技能的原始 SKILL.md 内容(英文),上方安装命令可直接使用。

name: Testing Test Writing description: Write minimal, focused tests following KISS and YAGNI principles - test only core user flows during development, defer edge case testing, test behavior not implementation, use clear test names, mock external dependencies, and ensure fast test execution. Use this skill when creating test files, writing unit tests, integration tests, or component tests. Use when working with test frameworks (Jest, Vitest, pytest, RSpec, JUnit, Mocha), when deciding what to test and when, when writing test cases for critical paths and primary workflows, when mocking external services or databases, or when ensuring tests run quickly for developer productivity. Apply when creating test files (.test.ts, .spec.ts, test_*.py, *_test.go) or when implementing behavior-driven test cases.

Testing Test Writing

This Skill provides Claude Code with specific guidance on test writing best practices emphasizing KISS and YAGNI principles - minimal tests during development focused on core flows.

When to use this skill

  • When creating or modifying test files across any testing framework
  • When working with test files (.test.ts, .spec.ts, .test.js, test_*.py, *_test.go, *_spec.rb)
  • When deciding what to test during feature development
  • When writing minimal tests for core user flows and critical paths
  • When deferring edge case, error state, or validation testing until later
  • When writing clear, descriptive test names that explain intent
  • When testing behavior rather than implementation details
  • When mocking external dependencies (databases, APIs, file systems)
  • When ensuring tests run fast (milliseconds) for developer productivity
  • When using testing frameworks (Jest, Vitest, pytest, RSpec, JUnit, Mocha, Jasmine)
  • When writing component tests, unit tests, or integration tests
  • When applying YAGNI to test scope - test only what's needed now
  • When applying KISS to test simplicity - keep tests simple and focused

Instructions

For details, refer to the information provided in this file: testing test writing