go-testing

处理所有Go测试任务,包括运行测试、编写新测试和修复测试失败。遵循MCPSpy测试约定,对关键断言使用require,对非关键断言使用assert。

📖 中文导读:处理所有Go测试任务,包括运行测试、编写新测试和修复测试失败。遵循MCPSpy测试约定,对关键断言使用require,对非关键断言使用assert。 以下正文为该技能的原始 SKILL.md 内容(英文),上方安装命令可直接使用。

name: go-testing description: "Handles all Golang testing tasks including running tests, writing new tests, and fixing test failures. Follows MCPSpy testing conventions with require for critical assertions and assert for non-critical ones."

Go Testing Skill

Provides guidance and automation for Golang testing tasks in the MCPSpy project.

Testing Philosophy

  • Use require library for assertions that should stop test execution on failure
  • Use assert library for non-critical assertions where test should continue
  • Choose internal vs external package testing based on what needs to be tested
  • Test internal functions by placing test files in the same package (no _test suffix)
  • Avoid creating externally facing functions solely for testing purposes

When to Use This Skill

  • Running unit tests with go test
  • Writing new test files and test cases
  • Debugging and fixing failing tests
  • Implementing test fixtures and mocks
  • Improving test coverage for the MCPSpy project