Install
$ agentstack add skill-qte77-claude-code-plugins-testing-go ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
Go Testing
Target: $ARGUMENTS
Writes focused, behavior-driven tests following project testing strategy.
Quick Reference
TDD methodology (language-agnostic): See tdd-core plugin (testing-tdd skill)
Go-specific documentation: references/
references/testing-strategy.md— Go tools (go test, testify, rapid, gomock)references/tdd-best-practices.md— Go TDD examples (extends tdd-core)
Quick Decision
go test (default): Use table-driven tests for known cases. Works at unit/integration levels.
rapid (edge cases): Use for invariants that must hold for ALL inputs.
See references/testing-strategy.md for full methodology comparison.
TDD Essentials (Quick Reference)
Cycle: RED (failing test / compile error) -> GREEN (minimal pass) -> REFACTOR (clean up)
Structure: Arrange-Act-Assert (AAA)
func TestOrderCalculator_Total_SumsItemPrices(t *testing.T) {
// ARRANGE
calc := NewOrderCalculator()
items := []Item{{Price: 10.00, Qty: 2}, {Price: 5.00, Qty: 1}}
// ACT
total := calc.Total(items)
// ASSERT
assert.Equal(t, 25.00, total)
}
Table-Driven Tests (Go Idiom)
func TestValidateEmail(t *testing.T) {
tests := []struct {
name string
email string
wantErr bool
}{
{name: "valid", email: "user@example.com", wantErr: false},
{name: "missing @", email: "userexample.com", wantErr: true},
{name: "empty", email: "", wantErr: true},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
err := ValidateEmail(tt.email)
if tt.wantErr {
require.Error(t, err)
} else {
require.NoError(t, err)
}
})
}
}
What to Test (KISS/DRY/YAGNI)
High-Value: Business logic, error paths, integration points, contracts
Avoid: Stdlib behavior, trivial getters, default zero values, type existence
See references/testing-strategy.md -> "Patterns to Remove" for full list.
Naming Convention
Format: Test{Type}_{Method}_{Behavior}
TestUserService_Create_ReturnsIDOnSuccess
TestValidateEmail_MissingAt
TestCalculateTotal_EmptyItems
Execution
go test ./... # All tests
go test -run TestUserService ./... # Filter by name
go test -race ./... # Race detector
go test -v -run TestValidateAge ./... # Verbose single test
Quality Gates
- [ ] All tests pass (
go test ./...) - [ ] TDD Red-Green-Refactor followed
- [ ] Arrange-Act-Assert structure used
- [ ] Table-driven tests for multiple cases
- [ ] Behavior-focused (not implementation)
- [ ] No stdlib behavior tested
- [ ] Interface fakes use
var _ Interface = (*fake)(nil)compile check
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: qte77
- Source: qte77/claude-code-plugins
- License: Apache-2.0
- Homepage: https://qte77.github.io/claude-code-plugins/
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.