Agent skill
go-testing
Go testing patterns. Routes to specific patterns.
Install this agent skill to your Project
npx add-skill https://github.com/JamesPrial/claudefiles/tree/main/skills/golang/testing
SKILL.md
Testing
Route by Pattern
- Table-driven tests → see table/
- Subtests with t.Run → see subtests/
- Test helpers → see helpers/
- Benchmarks → see benchmarks/
Quick Check
- Tests named Test_Function_Scenario
- Table tests for >2 cases
- Helpers call t.Helper()
- Parallel tests capture loop vars
Common Patterns
Basic test structure:
func Test_Function_Scenario(t *testing.T) {
// Arrange
input := "test"
// Act
result := Function(input)
// Assert
if result != expected {
t.Errorf("got %v, want %v", result, expected)
}
}
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
plugin-packager
Package claudefiles components into a valid Claude Code plugin
plugin-packager-validation
Plugin validation errors and fixes
plugin-packager-subset
Package language-specific subsets of claudefiles
plugin-packager-hooks
Handle hook scripts and paths for plugin packaging
go-concurrency
Go concurrency patterns. Routes to specific patterns.
go-sync-primitives
sync.WaitGroup and sync.Mutex patterns
Didn't find tool you were looking for?