Skills/go-testing/SKILL.md
Applies current Go testing best practices. Use when writing or modifying Go test files or advising on Go testing strategies.
npx skillsauth add sammcj/agentic-coding writing-go-testsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill provides actionable testing guidelines. For detailed implementation patterns, code examples, rationale, and production system references, consult go-testing-best-practices.md.
Always apply these current best practices:
*_test.go namingpackage foo_test) for integration testing and exampleshandler_auth_test.go, handler_validation_test.go)testing/synctest for deterministic concurrent testing (Go 1.24+)t.Parallel() first in test functionscmp.Diff() from google/go-cmp for complex comparisonsgo test -cover and go tool cover -html for analysistestdata directory for test fixtures (automatically ignored by Go toolchain)t.Helper() for accurate error reportingt.Cleanup() for resource cleanup (superior to defer in tests)B.Loop() method as the preferred pattern (prevents compiler optimisations)benchstat for statistical analysis-benchmem for memory profilingTest*, Benchmark*, Fuzz*, Example* (capital letter after prefix)got and want for actual vs expected valuesLoad go-testing-best-practices.md when you need:
The detailed guide contains full context, examples with explanations, and production-proven patterns. This SKILL.md provides the actionable rules to apply.
Focus on meaningful tests that validate behaviour rather than implementation. Pragmatic excellence over theoretical perfection.
tools
Provides tools for managing MarkEdit, a macOS markdown editor
tools
Provides knowledge on using the `glean` CLI tool to access company knowledge and documents through Glean. Use when the user asks you to use Glean to search, read or otherwise access knowledge from their company's Confluence, Slack, Google Drive Files (Slides, Documents, Sheets) etc.
development
Applies the Diataxis framework to create or improve technical documentation. Use when being asked to write high quality tutorials, how-to guides, reference docs, or explanations, when reviewing documentation quality, or when deciding what type of documentation to create. Helps identify documentation types using the action/cognition and acquisition/application dimensions.
development
Use when answering questions from this machine-learning knowledge base. Triggers: questions about transformers, attention cost and efficiency, and long-context scaling; 'what do we know about attention', 'check the ML wiki'. Read-only querying of compiled knowledge; to add, update, supersede, lint, audit, or critique, use the llm-wiki skill instead.