test-with-gt

test-with-gt is a skill for Claude Code from gollem-dev/gollem. It costs 35 tokens per session (634 once invoked), scanned A, original, Apache-2.0.

A Go testing guide requires the gt library, a tool for writing readable checks in Go, when tests are created or changed.

In plain words
What is it for?
It helps choose assertions for slices, strings, errors, numbers, maps, and booleans, and apply fail-fast checks with Required().
Why use it?
It helps tests use type-appropriate assertions instead of awkward manual comparisons or generic checks.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Install

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.

agentmods
npx agentmods add skills/gollem-dev/gollem/test-with-gt
Any agent
npx skills add gollem-dev/gollem --skill test-with-gt
Clone the repo
git clone --depth 1 https://github.com/gollem-dev/gollem

Made for: Claude Code.

Wrote 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.

agentmods badge for test-with-gt

README.md
[![agentmods](https://agentmods.dev/badge/skills/gollem-dev/gollem/test-with-gt.svg)](https://agentmods.dev/skills/gollem-dev/gollem/test-with-gt)
Your own site
<a href="https://agentmods.dev/skills/gollem-dev/gollem/test-with-gt"><img src="https://agentmods.dev/badge/skills/gollem-dev/gollem/test-with-gt.svg" alt="Measured on agentmods" height="20"></a>
Per session 35 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 634 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00035 $0.00634
Opus 5 $0.00017 $0.00317
Sonnet 5 $0.00007 $0.00127
Haiku 4.5 $0.00003 $0.00063

Measured 6d ago against content hash 89601d365fd0, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

test-with-gt 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 6d 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.

.claude/skills/test-with-gt/SKILL.md · 65 lines

What it actually says

Writing Tests with gt

When writing Go test code, use the gt library for type-safe assertions.

Step 1: Locate gt documentation

First, find where gt is installed and read its documentation:

GT_DIR=$(go list -m -f '{{.Dir}}' github.com/m-mizutani/gt 2>/dev/null)

If gt is available, read the relevant documentation from $GT_DIR/docs/:

  • docs/README.md - Overview and quick reference
  • docs/types/*.md - Detailed documentation for each test type
  • docs/patterns/*.md - Common patterns (method chaining, Required, Describe)

Step 2: Choose the right test type

Data Type Use NOT
[]T (slice) gt.Array(t, arr).Length(3) gt.Value(t, len(arr)).Equal(3)
string gt.String(t, s).Contains("x") gt.Bool(t, strings.Contains(s, "x")).True()
error gt.NoError(t, err) gt.Value(t, err).Nil()
int, float, etc. gt.Number(t, n).Greater(5) gt.Bool(t, n > 5).True()
map[K]V gt.Map(t, m).HasKey("k") manual check with gt.Bool
bool gt.Bool(t, b).True() gt.Value(t, b).Equal(true)

Step 3: Apply common patterns

Use Required() for fail-fast

gt.NoError(t, err).Required()  // Stop immediately if error
gt.Value(t, result).NotNil().Required()  // Stop if nil

Use Describef() for context

gt.Array(t, users).
    Describef("Users for tenant %s", tenantID).
    Length(5)

Handle function returns with R1/R2/R3

result := gt.R1(parseJSON(input)).NoError(t)
gt.String(t, result.Name).Equal("Alice")

Quick Reference

Constructors: gt.Value, gt.Array, gt.Map, gt.Number, gt.String, gt.Bool, gt.Error, gt.NoError, gt.File, gt.Cast, gt.R1/R2/R3

Short aliases: gt.V, gt.A, gt.M, gt.N, gt.S, gt.B, gt.F, gt.C

Changes

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.

  1. 6d ago First seen · 65 lines · 35 tokens per session scan A 89601d365fd0

Subscribe to this mod's changes

test-with-gt is a skill published in the GitHub repository gollem-dev/gollem (193 stars, last pushed 6d ago), licensed Apache-2.0. It adds 35 tokens to every session and 634 once invoked, about $0.0002 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-30.

Related

Other skills, from other repositories

increase-test-coverage

Increase Go test coverage to 90%+ using a Research → Plan → Implement pipeline. Analyzes coverage gaps, generates table-driven tests with httptest mocks, and validates results with go test -coverprofile. Designed for Go MCP server projects using the official go-sdk and gitlab.com/gitlab-org/api/client-go/v2.

jmrplens/gitlab-mcp-server · 72 tokens

go-testing

Use when writing, reviewing, or improving Go test code — including table-driven tests, subtests, parallel tests, test helpers, test doubles, and assertions with cmp.Diff. Also use when a user asks to write a test for a Go function, even if they don't mention specific patterns like table-driven tests or subtests. Does…

cxuu/golang-skills · 80 tokens

golang-testing

Go testing patterns including table-driven tests, subtests, benchmarks, fuzzing, and test coverage. Follows TDD methodology with idiomatic Go practices.

jmrplens/gitlab-mcp-server · 35 tokens

golang-testing

Go testing best practices including table-driven tests, test helpers, benchmarking, race detection, coverage analysis, and integration testing patterns. Use when writing or improving Go tests.

affaan-m/ECC · 37 tokens

go-expert

Expert-level Go development with Go 1.22+ features, concurrency, standard library, and production-grade best practices. Use when the user mentions concurrency, microservices, or backend, or when the task involves idiomatic Go, goroutines and channels, context-based cancellation, or writing an HTTP server.

personamanagmentlayer/pcl · 65 tokens

go-safe-move-refactor

Safely move Go source files between packages with zero compilation downtime. Handles package declarations, import updates, symbol exports, type renames, test migration, and forwarding stubs. Validates compilation after every atomic step.

jmrplens/gitlab-mcp-server · 50 tokens