Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/n-n-code/n-n-code-skills/go-testing-with-testifynpx skills add n-n-code/n-n-code-skills --skill go-testing-with-testifygit clone --depth 1 https://github.com/n-n-code/n-n-code-skillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/n-n-code/n-n-code-skills/go-testing-with-testify)<a href="https://agentmods.dev/skills/n-n-code/n-n-code-skills/go-testing-with-testify"><img src="https://agentmods.dev/badge/skills/n-n-code/n-n-code-skills/go-testing-with-testify.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00075 | $0.04848 |
| Opus 5 | $0.00037 | $0.02424 |
| Sonnet 5 | $0.00015 | $0.00970 |
| Haiku 4.5 | $0.00007 | $0.00485 |
Grade A, and why
go-testing-with-testify scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 383 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Go Testing With Testify
Workflow for writing, reviewing, and hardening Go tests built on the standard
testing package and the stretchr/testify toolkit (assert, require,
mock, suite).
Go+testify tests are checks — automated pass/fail assertions on behavior
contracts. Testing as investigation — charters, heuristics, oracles under
stress, edge-case discovery, perspective rotation — is upstream. Compose with
tester-mindset when strategy, risk framing, or the shape of the unknown
dominates.
When To Use
- writing new Go unit, integration, or HTTP handler tests with testify
- refactoring existing
*_test.gofiles: tightening assertions, extracting table-driven tests, introducing subtests, or addingt.Parallel() - reviewing PRs that add or change Go tests
- triaging a flaky Go test (intermittent,
-racecomplaints, order-dependent) - replacing
reflect.DeepEqual/ string-match / manual error checking with testify assertions, or deciding when not to - deciding between a hand-written fake and
testify/mock, or between flat subtests and asuite.Suite - pairing with
tester-mindsetfor claims, oracles, and edge-case coverage - pairing with
backend-guidanceorbackend-systems-guidancefor service- boundary test design in Go services
Not For
- standing up a Go module or repo-level test tooling from scratch — that is a
one-off install step (
go mod init,go get github.com/stretchr/testify) not a skill-shaped workflow - strategy work without any testify or
testingcode in the loop — that is atester-mindsetjob - pure code-style review of non-test Go code — this skill should not be
primary; use the repo's implementation or review skill set instead,
typically
backend-guidanceorbackend-systems-guidancefor Go services - Ginkgo, Gomega,
go-cmp-only, or gocheck suites — the testify idioms below will fight those stacks
Routing Flowchart
digraph route {
"Main artifact is testify-based Go test code or test review?" [shape=diamond];
"Main artifact is strategy,\nedge-case discovery, or test planning\nwithout concrete test code?" [shape=diamond];
"go-testing-with-testify" [shape=box];
"tester-mindset" [shape=box];
"coding-guidance-go or another repo skill set" [shape=box];
"Main artifact is testify-based Go test code or test review?" -> "go-testing-with-testify" [label="yes"];
"Main artifact is testify-based Go test code or test review?" -> "Main artifact is strategy,\nedge-case discovery, or test planning\nwithout concrete test code?" [label="no"];
"Main artifact is strategy,\nedge-case discovery, or test planning\nwithout concrete test code?" -> "tester-mindset" [label="yes"];
"Main artifact is strategy,\nedge-case discovery, or test planning\nwithout concrete test code?" -> "coding-guidance-go or another repo skill set" [label="no"];
}
What ships with it
6 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 4d ago First seen · 383 lines · 75 tokens per session scan A 4fbe5a7251ab
go-testing-with-testify is a skill published in the GitHub repository n-n-code/n-n-code-skills (4 stars, last pushed 6d ago), licensed MIT. It adds 75 tokens to every session and 4,848 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
setup
Wire Ginkgo into a Go package — install the ginkgo CLI and Ginkgo+Gomega, ginkgo bootstrap to generate the suitetest.go (TestXxx/RegisterFailHandler(Fail)/RunSpecs), the package xxxtest convention, dot-import alternatives (aliased import, dsl/ subpackages, --nodot), ginkgo generate, and testing.T interop via…
assertions
Write correct synchronous Gomega assertions — Expect/Ω notation, the To/NotTo/ToNot/Should/ShouldNot equivalences, the multi-return error idiom, Succeed vs HaveOccurred, the .Error() chaining form, annotating assertions (format-string and func()string), tuning failure output via the format subpackage…
gstruct
Deep, partial matching of nested structs, slices, maps, and pointers with gstruct — MatchAllFields/MatchFields/Fields, MatchAllElements/MatchElements/Elements (idFn), MatchAllKeys/MatchKeys/Keys, PointTo, and the IgnoreExtras/IgnoreMissing/IgnoreUnexportedExtras/AllowDuplicates options, plus Ignore()/Reject(). Use…
overview
The Ginkgo mental model for writing Go tests — the one idea that explains everything (Ginkgo builds a spec tree at construction time, then runs it) and its consequences for how you write specs, plus spec independence and the node taxonomy. Use this first when you start working with Ginkgo in a project, or to decide…
go
Idiomatic Go - package and interface design, error wrapping, table-driven tests, generics, the modern standard library (slices/maps/cmp/errors.Join), current syntax, and logging discipline. Use when writing, reviewing, or refactoring any Go code, especially code drifting toward Java/Spring shapes (deep layer trees…
test-with-gt
Write Go test code using the gt library. Use when writing tests, creating test files, or when the user asks to add tests for Go code.