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.

85

1.92x
Quality

85%

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

Quality

Content

82%Weight 40%Scale 1-5

Reviews the quality of instructions and guidance provided to agents. Good implementation is clear, handles edge cases, and produces reliable results.

A dense, executable reference with high-quality code examples and correctly externalized mock detail. Main gaps are the inline assertions API listing (token cost and organization) and the absence of an explicit sequenced workflow with validation checkpoints for its two modes.

Suggestions

Move the bulk 'Core Assertions' API listing into a reference file (e.g., references/assertions.md), keeping only the highest-frequency assertions inline, mirroring how mock content is already split into references/mock.md.

Add a short explicit step sequence per mode with a validation checkpoint — e.g., Write mode: identify preconditions → write test (require for guards, assert for checks) → verify mocks with AssertExpectations → run testifylint.

Trim the duplicated 'Covers...' overview sentences and the re-stated mock summary paragraph, since the mock section already delegates to references/mock.md.

DimensionReasoningScore

Conciseness

Sections are lean and assume Go competence (no explaining what testing is), but the ~35-line inline 'Core Assertions' API listing is reference material that inflates token cost. Not 5: that listing and a few redundant overview sentences could be trimmed; not 3: only minor trimming is needed.

4 / 5

Actionability

Code is copy-paste ready and covers the common cases: a complete test function using assert/require correctly, full suite example including the required launcher function, and concrete mistake/fix pairs (e.g., 'is.Equal(ErrNotFound, err) — fails on wrapped errors. Use is.ErrorIs'). Not 4: examples are complete and executable rather than having minor gaps.

5 / 5

Workflow Clarity

Decision rules are explicit ('require for preconditions (setup, error checks), assert for verifications') and the Modes section plus Common Mistakes checklist and testifylint pointer act as checkpoints. Not 5: neither Write mode nor Review mode has an explicit step sequence with a validation step (e.g., write → run testifylint → verify AssertExpectations).

4 / 5

Progressive Disclosure

The bundle structure is sound: references/mock.md exists, holds real detailed content one level deep, and is clearly signaled from the body ('For defining mocks, argument matchers, call modifiers, return sequences, and verification, see [Mock reference](./references/mock.md)'). Not 5: the bulk Core Assertions API listing remains inline where the mock material was correctly externalized, a minor organization gap.

4 / 5

Total

17

/

20

Passed

Description

88%Weight 40%Scale 1-5

Based on the skill's description, can an agent find and select it at the right time? Clear, specific descriptions lead to better discovery.

A strong description that clearly states what the skill covers and gives two explicit trigger clauses, including a precise import-path condition. Minor improvements possible in natural-term synonyms and sharpening distinctiveness against a general Go-testing skill.

DimensionReasoningScore

Specificity

Enumerates multiple concrete capabilities — 'Covers assert, require, mock, and suite packages in depth' plus 'mock expectations, argument matchers, call verification, suite lifecycle, and advanced patterns like Eventually, JSONEq, and custom matchers' — giving comprehensive coverage of the library's surface. Not 4: the action list goes beyond minor gaps and names specific API-level features.

5 / 5

Completeness

Explicitly answers both what ('Comprehensive guide to stretchr/testify... Covers assert, require, mock, and suite packages') and when ('Use when writing tests with testify, creating mocks, setting up test suites...' plus 'Apply when the codebase imports github.com/stretchr/testify') with concrete trigger phrases. Not 4: both what and when are explicit and specific, not merely adequate.

5 / 5

Trigger Term Quality

Natural phrases like 'writing tests with testify', 'creating mocks', 'setting up test suites', 'choosing between assert and require', and the import path 'github.com/stretchr/testify' are present, but a few natural synonyms/extensions (e.g., 'Go unit tests', '.go files') are missing. Not 5: anchor 5 requires synonyms and file extensions, which are absent.

4 / 5

Distinctiveness Conflict Risk

The testify-specific niche and import-path trigger ('Apply when the codebase imports github.com/stretchr/testify') make it mostly distinct, but generic phrases like 'writing tests' and 'creating mocks' could overlap with a general Golang-testing skill. Not 5: minor overlap risk with the closely related general Go testing skill remains; not 3: the library name and import path anchor it firmly.

4 / 5

Total

18

/

20

Passed

Validation

87%

Checks the skill against the spec for correct structure and formatting. All validation checks must pass before discovery and implementation can be scored.

Validation — 14 / 16 Passed

Validation for skill structure

CriteriaDescriptionResult

allowed_tools_field

'allowed-tools' contains unusual tool name(s)

Warning

metadata_field

'metadata' should map string keys to string values

Warning

Total

14

/

16

Passed

Repository
samber/cc-skills-golang
Reviewed

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.