Skills for Real Engineers. Straight from my .agents directory.
golang-stretchr-testify
Agent skill fromsamber/cc-skills-golang
Comprehensive guide to stretchr/testify for Golang testing. Covers assert, require, mock, and suite packages in depth. Use when writing tests with testify, creating mocks, setting up test suites, or choosing between assert and require. Covers testify assertions, mock expectations, argument matchers, call verification, suite lifecycle, and advanced patterns like Eventually, JSONEq, and custom matchers. Apply when the codebase imports github.com/stretchr/testify.
How to install golang-stretchr-testify
npx skills add samber/cc-skills-golang# or add only this skill to Claude Code: copy the folder
skills/golang-stretchr-testify/
# into
~/.claude/skills/golang-stretchr-testify/ (all projects)
.claude/skills/golang-stretchr-testify/ (one project)
1**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.23**Modes:**45- **Write mode** — adding new tests or mocks to a codebase.6- **Review mode** — auditing existing test code for testify misuse.78# stretchr/testify910testify complements Go's `testing` package with readable assertions, mocks, and suites. It does not replace `testing` — always use `*testing.T` as the entry point.1112This skill is not exhaustive — refer to library documentation and code examples for more information:1314- For Go package docs, symbols, versions, importers, and known vulnerabilities, → See `samber/cc-skills-golang@golang-pkg-go-dev` skill (`godig`), preferred over Context7 for Go package facts.15- To navigate this library's usage in your own code (definitions, call sites, diagnostics), → See `samber/cc-skills-golang@golang-gopls` skill (`gopls`).16- Context7 remains a fallback for docs not indexed on pkg.go.dev.1718## assert vs require1920Both offer identical assertions. The difference is failure behavior:2122- **assert**: records failure, continues — see all failures at once23- **require**: calls `t.FailNow()` — use for preconditions where continuing would panic or mislead2425Use `assert.New(t)` / `require.New(t)` for readability. Name them `is` and `must`:2627```go28func TestParseConfig(t *testing.T) {29 is := assert.New(t)30 must := require.New(t)31…
Excerpt shown under the repository's MIT license.
More skills in cc-skills-golang
Similar skill repositories
An agentic skills framework & software development methodology that works.
A single CLAUDE.md file to improve Claude Code behavior, derived from Andrej Karpathy's observations on LLM coding pitfalls.
Public repository for Agent Skills
Makes your AI agent think like the laziest senior dev in the room. The best code is the code you never wrote.
An AI skill that provides design intelligence for building professional UI/UX across multiple platforms.
