yechua-silva/zyrocli/golang-testing
Claude Code and agent skill by yechua-silva/zyrocli
- community
Checking that the SKILL.md file is still in the repository.
Go testing best practices — table-driven tests, subtests, mocking, golden files
Install
npx vskill@latest install yechua-silva/zyrocli/golang-testingSKILL.md
The same SKILL.md was published earlier as yechua-silva/zyrocli/golang-testing.
Go Testing
Overview
Write idiomatic Go tests following best practices and conventions.
When to use
- When writing unit tests for Go packages
- When writing integration tests
- When writing table-driven tests
- When using test coverage to identify untested paths
Conventions
- Table-driven tests: Use anonymous structs for test cases.
``go func TestFoo(t *testing.T) { tests := []struct { name string input string want string }{ {"empty", "", ""}, {"hello", "hello", "HELLO"}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { got := Foo(tt.input) if got != tt.want { t.Errorf("Foo(%q) = %q, want %q", tt.input, got, tt.want) } }) } } ``
- Test helpers: Use
t.Helper()for helper functions - Subtests: Use
t.Run()for grouped test cases - Coverage: Aim for meaningful coverage, not 100% for its own sake
- Golden files: Use
testdata/golden/for expected output - Mocking: Use interfaces, not concrete types, for testability
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryChecking.skills/golang-testing/SKILL.md
Popularity
- Repository stars
- 1
- 7-day trend score
- 0
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/yechua-silva/zyrocli/golang-testing)