CtrlK
BlogDocsLog inGet started
Tessl Logo

golang-stretchr-testify

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.

88

1.92x
Quality

89%

Does it follow best practices?

Impact

81%

1.92x

Average score across 3 eval scenarios

SecuritybySnyk

Passed

No findings from the security scan

SKILL.md
Quality
Evals
Security

Evaluation results

93%

33%

Retry Client Test Coverage

Mock call modifiers and detailed verification in retry tests

The agent wrote 165 files outside the evaluated workspace (Without this skill)

These are not visible to scoring or included in the download.

/home/agent/go/pkg/mod/cache/download/github.com/stretchr/objx/@v/list

/home/agent/go/pkg/mod/cache/download/github.com/stretchr/objx/@v/v0.5.3.info

/home/agent/go/pkg/mod/cache/download/github.com/stretchr/objx/@v/v0.5.3.lock

/home/agent/go/pkg/mod/cache/download/github.com/stretchr/objx/@v/v0.5.3.mod

/home/agent/go/pkg/mod/cache/download/github.com/stretchr/objx/@v/v0.5.3.zip

The agent wrote 212 files outside the evaluated workspace (With this skill)

These are not visible to scoring or included in the download.

/home/agent/go/pkg/mod/cache/download/github.com/davecgh/go-spew/@v/list

/home/agent/go/pkg/mod/cache/download/github.com/davecgh/go-spew/@v/v1.1.1.info

/home/agent/go/pkg/mod/cache/download/github.com/davecgh/go-spew/@v/v1.1.1.lock

/home/agent/go/pkg/mod/cache/download/github.com/davecgh/go-spew/@v/v1.1.1.mod

/home/agent/go/pkg/mod/cache/download/github.com/davecgh/go-spew/@v/v1.1.1.zip

Criteria
Without this skill
With this skill

Mock embedding

100%

100%

Chained Once expectations

100%

100%

Run side effect

0%

100%

AssertNumberOfCalls

100%

100%

AssertNotCalled

0%

100%

AssertExpectations on Fetcher

100%

100%

AssertExpectations on Logger

100%

100%

mock.Anything usage

100%

100%

is naming

0%

100%

must naming

0%

0%

85%

85%

Testing the Product Search Service

Specialised testify assertions for mixed output types

The agent wrote 121 files outside the evaluated workspace (With this skill)

These are not visible to scoring or included in the download.

/home/agent/go/pkg/mod/cache/download/github.com/stretchr/testify/@v/list

/home/agent/go/pkg/mod/cache/download/github.com/stretchr/testify/@v/v1.12.1.info

/home/agent/go/pkg/mod/cache/download/github.com/stretchr/testify/@v/v1.12.1.lock

/home/agent/go/pkg/mod/cache/download/github.com/stretchr/testify/@v/v1.12.1.mod

/home/agent/go/pkg/mod/cache/download/github.com/stretchr/testify/@v/v1.12.1.zip

Criteria
Without this skill
With this skill

ElementsMatch for IDs

0%

100%

InDelta for rating

0%

100%

JSONEq for summary

0%

0%

Regexp for RequestID

0%

100%

Named assert wrapper

0%

100%

Named require wrapper

0%

100%

Require for error precondition

0%

100%

Expected-first argument order

0%

100%

66%

User Repository Error Testing

Error hierarchy testing with ErrorIs, ErrorAs, ErrorContains

The agent wrote 121 files outside the evaluated workspace (Without this skill)

These are not visible to scoring or included in the download.

/home/agent/go/pkg/mod/cache/download/github.com/stretchr/testify/@v/list

/home/agent/go/pkg/mod/cache/download/github.com/stretchr/testify/@v/v1.12.1.info

/home/agent/go/pkg/mod/cache/download/github.com/stretchr/testify/@v/v1.12.1.lock

/home/agent/go/pkg/mod/cache/download/github.com/stretchr/testify/@v/v1.12.1.mod

/home/agent/go/pkg/mod/cache/download/github.com/stretchr/testify/@v/v1.12.1.zip

The agent wrote 123 files outside the evaluated workspace (With this skill)

These are not visible to scoring or included in the download.

/home/agent/go/pkg/mod/cache/download/github.com/stretchr/testify/@v/list

/home/agent/go/pkg/mod/cache/download/github.com/stretchr/testify/@v/v1.12.1.info

/home/agent/go/pkg/mod/cache/download/github.com/stretchr/testify/@v/v1.12.1.lock

/home/agent/go/pkg/mod/cache/download/github.com/stretchr/testify/@v/v1.12.1.mod

/home/agent/go/pkg/mod/cache/download/github.com/stretchr/testify/@v/v1.12.1.zip

Criteria
Without this skill
With this skill

ErrorIs for sentinel

58%

100%

No Equal for wrapped error

100%

100%

ErrorAs for type extraction

91%

100%

must.ErrorAs as precondition

90%

100%

Field inspection after ErrorAs

100%

100%

ErrorContains for message substring

41%

16%

require for preconditions

100%

100%

is := assert.New(t)

0%

0%

must := require.New(t)

0%

0%

Argument order (expected, actual)

100%

50%

Repository
samber/cc-skills-golang
Evaluated
Agent
Claude Code
Model
Claude Sonnet 4.6

Table of Contents

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.