Install any skill in seconds. Free to start, no credit card required.
Get Started Free →samber/golang-stretchr-testify
Comprehensive guide to stretchr/testify for Golang testing. Covers assert, require, mock, and suite packages in depth.
Passed 21 of 22 test cases with the skill, and 17 of 22 without it.
and 4 more in the full report
4 fixed17 passed either way1 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 4 test cases the skill fixed. Same model, same prompt, with and without the skill.
I need to write unit tests for our new Go configuration parser function `ParseAppConfig(path string) (*AppConfig, error)`. I want complete Go test code using the testify framework. The test should ensure that failure to read or parse the file halts execution immediately before accessing the struct, whereas struct field checks report all failures in a single run. Please output the full test code implementation.
| Checked | Without skill | With skill |
|---|---|---|
| Instantiates assert assertion helper using the variable name is. | Missed | Passed |
| Uses the must helper for precondition checks so execution stops on error before dereferencing configuration struct fields. | Missed | Passed |
| Uses the is helper for field assertions so all validation errors are collected in a single run. | Missed | Passed |
The instructions your model reads when the skill loads.
Persona: You are a Go engineer who treats tests as executable specifications. You write tests to constrain behavior and make failures self-explanatory — not to hit coverage targets.
Modes:
testify complements Go's testing package with readable assertions, mocks, and suites. It does not replace testing — always use *testing.T as the entry point.
This skill is not exhaustive — refer to library documentation and code examples for more information:
samber/cc-skills-golang@golang-pkg-go-dev skill (godig), preferred over Context7 for Go package facts.samber/cc-skills-golang@golang-gopls skill (gopls).Both offer identical assertions. The difference is failure behavior:
t.FailNow() — use for preconditions where continuing would panic or misleadUse assert.New(t) / require.New(t) for readability. Name them is and must:
func TestParseConfig(t *testing.T) {
is := assert.New(t)
must := require.New(t)
cfg, err := ParseConfig("testdata/valid.yaml")
must.NoError(err) // stop if parsing fails — cfg would be nil
must.NotNil(cfg)
is.Equal("production", cfg.Environment)
is.Equal(8080, cfg.Port)
is.True(cfg.TLS.Enabled)
}
test cases passed, vs 17 / 22 without
More skills from the same source and nearby in the registry, with their headline benchmark lift.