go-test-standards
Installation
SKILL.md
Golang 单元测试规范
一、需要遵循的单元测试理论
1.1 每个测试单元逻辑上分为四个阶段(可以用阶段名作为注释分割)
| 阶段 | 说明 |
|---|---|
| Setup | 准备测试所需的数据和环境 |
| Exercise | 执行被测试的代码 |
| Verify | 验证执行结果是否符合预期 |
| Teardown | 清理测试环境和数据 |
1.2 测试替身使用原则
- 尽可能使用 stub 类型,而不是 mock。为 stub 对象命名时应带有 stub 关键字而不是 mock关键字。
- 针对全局函数的模拟考虑使用 monkey patching
二、单测代码规范
Related skills
More from iceleaf916/my-cc-plugins
code-review-assistant
代码审核辅助工具,支持本地 Git 库和 Gerrit Review。支持审核当前最新 commit、暂存的修改、未暂存的修改等,也支持 Golang、Qt/C++、Ansible 等多语言的 Gerrit Code Review。提供"必须修复/建议修复/可选改进"三级分级审核,生成 Markdown 报告。
13go-frame-best-practices
提供 GoFrame 框架的官方最佳实践指导,包括项目结构、分层架构、配置管理、数据校验、数据库操作、中间件开发等开发规范
12remote-troubleshoot
Structured remote server troubleshooting workflow that follows investigation-only practices until user approval. Use when Claude needs to diagnose issues on remote SSH-accessible servers including k8s clusters, bare metal, and containerized services. Covers service/port access problems, configuration issues, service startup failures, and performance/resource issues. Emphasizes creating helper scripts on remote server, obtaining user approval before fixes, script-based repairs, and generating comprehensive analysis reports.
11