一键导入
go-patterns
Architecture patterns for Glens Go code. Use this when writing or reviewing Go functions — composable design, error handling, and logging patterns.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Architecture patterns for Glens Go code. Use this when writing or reviewing Go functions — composable design, error handling, and logging patterns.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Common development tasks for Glens. Use this when building, adding modules, CLI flags, config options, or running the change checklist.
Go-specific test patterns for this project. Use this when writing Go tests — table-driven tests, interface mocking, reusable setup functions, testify assertions, and parallel sub-tests.
Integration and end-to-end testing design for this project. Use this when writing integration tests (*_integration_test.go), E2E binary tests, or when deciding what belongs in integration vs unit tests.
Expert test automation strategy for Go projects. Use this when writing, reviewing, or designing test suites — especially when deciding what to test, naming tests, or identifying corner cases.
| name | go-patterns |
| description | Architecture patterns for Glens Go code. Use this when writing or reviewing Go functions — composable design, error handling, and logging patterns. |
Prefer small, composable functions with clear responsibilities:
func ProcessEndpoint(ep *Endpoint) error {
if err := validate(ep); err != nil {
return fmt.Errorf("validation: %w", err)
}
return process(ep)
}
Always wrap errors with context using fmt.Errorf and %w:
if err != nil {
return fmt.Errorf("operation context: %w", err)
}
log.Info().Str("key", val).Msg("What happened")
log.Error().Err(err).Msg("What failed")
Issues are created only when:
Issues are not created when:
Key function: isRealTestFailure() in cmd/glens/cmd/analyze.go — preserve
this distinction when modifying test-failure detection logic.