Table-driven tests, subtests, benchmarks, fuzzing, and golden files for Go TDD workflows.
Works with
Covers the RED-GREEN-REFACTOR cycle with step-by-step examples for writing tests before implementation
Includes table-driven test patterns for comprehensive coverage, error cases, and parallel execution with t.Run()
Provides benchmarking techniques for performance analysis, memory allocation tracking, and comparative benchmarks across input sizes
Supports fuzzing with seed corpus and property
AI-first code editor with Composer
Before installing skills in Cursor, ensure your development environment meets these requirements:
node --versiongolang-testingExecute the skills CLI command in your project's root directory to begin installation:
Fetches golang-testing from affaan-m/everything-claude-code and configures it for Cursor.
The CLI shows a list of agents. Use arrow keys and space to select Cursor:
Confirm successful installation by checking the skill directory location:
Restart Cursor to activate golang-testing. Access via /golang-testing in your agent's command palette.
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your environment. Always review source, verify the publisher, and test in isolation before production.
Submit your Claude Code skill and start earning
Automate repetitive workflows and reduce manual effort
Example
Generate reports, summarize documents, draft communications
Save 3-5 hours per week on routine tasks
Learn new skills, understand complex topics, get expert guidance
Example
Explain concepts, provide examples, suggest learning resources
Accelerate learning and skill development by 2x
Enhance output quality through reviews, suggestions, and refinements
Example
Review drafts, suggest improvements, catch errors
Improve work quality by 30-40% with less effort
0
total installs
0
this week
142.9K
GitHub stars
0
upvotes
Run in your terminal
0
installs
0
this week
142.9K
stars
Comprehensive Go testing patterns for writing reliable, maintainable tests following TDD methodology.
RED → Write a failing test first
GREEN → Write minimal code to pass the test
REFACTOR → Improve code while keeping tests green
REPEAT → Continue with next requirement
// Step 1: Define the interface/signature
// calculator.go
package calculator
func Add(a, b int) int {
panic("not implemented") // Placeholder
}
// Step 2: Write failing test (RED)
// calculator_test.go
package calculator
import "testing"
func TestAdd(t *testing.T) {
got := Add(2, 3)
want := 5
if got != want {
t.Errorf("Add(2, 3) = %d; want %d", got, want)
}
}
// Step 3: Run test - verify FAIL
// $ go test
// --- FAIL: TestAdd (0.00s)
// panic: not implemented
// Step 4: Implement minimal code (GREEN)
func Add(a, b int) int {
return a + b
}
// Step 5: Run test - verify PASS
// $ go test
// PASS
// Step 6: Refactor if needed, verify tests still pass
The standard pattern for Go tests. Enables comprehensive coverage with minimal code.
func TestAdd(t *testing.T) {
tests := []struct {
name string
a, b int
expected int
}{
{"positive numbers", 2, 3, 5},
{"negative numbers", -1, -2, -3},
{"zero values", 0, 0, 0},
{"mixed signs", -1, 1, 0},
{"large numbers", 1000000, 2000000, 3000000},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
got := Add(tt.a, tt.b)
if got != tt.expected {
t.Errorf("Add(%d, %d) = %d; want %d",
tt.a, tt.b, got, tt.expected)
}
})
}
}
func TestParseConfig(t *testing.T) {
tests := []struct {
name string
input string
want *Config
wantErr bool
}{
{
name: "valid config",
input: `{"host": "localhost", "port": 8080}`,
want: &Config{Host: "localhost", Port: 8080},
},
{
name: "invalid JSON",
input: `{invalid}`,
wantErr: true,
},
{
name: "empty input",
input: "",
wantErr: true,
},
{
name: "minimal config",
input: `{}`,
want: &Config{}, // Zero value config
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
got, err := ParseConfig(tt.input)
if tt.wantErr {
if err == nil {
t.Error("expected error, got nil")
}
return
}
if err != nil {
t.Fatalf("unexpected error: %v", err)
}
if !reflect.DeepEqual(got, tt.want) {
t.Errorf("got %+v; want %+v", got, tt.want)
}
})
}
}
func TestUser(t *testing.T) {
// Setup shared by all subtests
db := setupTestDB(t)
t.Run("Create", func(t *testing.T) {
user := &User{Name: "Alice"}
err := db.CreateUser(user)
if err != nil {
t.Fatalf("CreateUser failed: %v", err)
}
if user.ID == "" {
t.Error("expected user ID to be set")
}
})
t.Run("Get", func(t *testing.T) {
user, err := db.GetUser("alice-id")
if err != nil Implementation Guide
Prerequisites
- ›Claude Desktop or compatible AI client with skill support
- ›Clear understanding of task or problem to solve
- ›Willingness to iterate and refine outputs
Time Estimate
15-45 minutes depending on use case complexity
Steps
- 1Install skill using provided installation command
- 2Test with simple use case relevant to your work
- 3Evaluate output quality and relevance
- 4Iterate on prompts to improve results
- 5Integrate into regular workflow if valuable
Common Pitfalls
- ⚠Expecting perfect results without iteration
- ⚠Not providing enough context in prompts
- ⚠Using skill for tasks outside its intended scope
- ⚠Accepting outputs without review and validation
Best Practices
✓ Do
- +Start with clear, specific prompts
- +Provide relevant context and constraints
- +Review and refine all outputs before using
- +Iterate to improve output quality
- +Document successful prompt patterns
✗ Don't
- −Don't use without understanding skill limitations
- −Don't skip validation of outputs
- −Don't share sensitive information in prompts
- −Don't expect skill to replace human judgment
💡 Pro Tips
- ★Be specific about desired format and style
- ★Ask for multiple options to choose from
- ★Request explanations to understand reasoning
- ★Combine AI efficiency with human expertise
When to Use This
✓ Use when
Use when skill capabilities match your task, clear ROI on time saved, and you can validate outputs. Best for repetitive tasks, learning, and quality improvement.
✗ Avoid when
Avoid when task requires deep expertise you can't validate, involves sensitive decisions, or when learning process is more valuable than speed of completion.
Learning Path
- 1Familiarize yourself with skill capabilities and limitations
- 2Start with low-risk, non-critical tasks
- 3Progress to more complex and valuable use cases
- 4Build expertise through regular use and experimentation
Related Skills
java-coding-standards
18affaan-m/everything-claude-code
Backendsame repoprompt-optimizer
23affaan-m/everything-claude-code
Productivitysame repovideo-editing
19affaan-m/everything-claude-code
Videosame repoliquid-glass-design
10affaan-m/everything-claude-code
Frontendsame repomarket-research
10affaan-m/everything-claude-code
Productivitysame repogolang-architect
14tomlord1122/tomtom-skill
Backendtag: golangReviews
4.5★★★★★65 reviews- SSakura Haddad★★★★★Dec 20, 2024
Registry listing for golang-testing matched our evaluation — installs cleanly and behaves as described in the markdown.
- SShikha Mishra★★★★★Dec 16, 2024
We added golang-testing from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
- SSakura Ndlovu★★★★★Dec 16, 2024
golang-testing reduced setup friction for our internal harness; good balance of opinion and flexibility.
- CChinedu Thomas★★★★★Dec 8, 2024
Registry listing for golang-testing matched our evaluation — installs cleanly and behaves as described in the markdown.
- YYuki Martinez★★★★★Dec 4, 2024
Useful defaults in golang-testing — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
- YYuki Liu★★★★★Nov 27, 2024
golang-testing reduced setup friction for our internal harness; good balance of opinion and flexibility.
- AArjun Gupta★★★★★Nov 23, 2024
We added golang-testing from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
- YYash Thakker★★★★★Nov 19, 2024
Keeps context tight: golang-testing is the kind of skill you can hand to a new teammate without a long onboarding doc.
- AAnika Gupta★★★★★Nov 11, 2024
golang-testing reduced setup friction for our internal harness; good balance of opinion and flexibility.
- RRahul Santra★★★★★Nov 7, 2024
Useful defaults in golang-testing — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
showing 1-10 of 65
1 / 7Discussion
Comments — not star reviews- No comments yet — start the thread.