golang-testing

golang-testing is a skill for Claude Code, Codex from userInner/SKILLS. It costs 56 tokens per session (4,303 once invoked), scanned A, a copy of golang-testing, Apache-2.0.

A guide to testing Go programs with the standard Go test tool. It focuses on table-driven tests, benchmarks, fuzzing, race detection, coverage, and integration tests.

In plain words
What is it for?
Writing or improving Go tests, checking performance, testing concurrent code, measuring coverage, and validating integrations.
Why use it?
It helps developers find incorrect behavior, concurrency problems, weak input handling, and missing test coverage in Go code.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: positional $N argument.

Good fit Writing or improving Go tests, checking performance, testing concurrent code, measuring coverage, and validating integrations.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/userinner/skills/golang-testing-affaan-m-ecc-8da78b20e0
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.

Any agent
npx skills add userInner/SKILLS --skill golang-testing-affaan-m-ecc-8da78b20e0
Clone the repo
git clone --depth 1 https://github.com/userInner/SKILLS

Made for: Claude Code, Codex.

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 golang-testing

README.md
[![agentmods](https://agentmods.dev/badge/skills/userinner/skills/golang-testing-affaan-m-ecc-8da78b20e0/github.svg)](https://agentmods.dev/skills/userinner/skills/golang-testing-affaan-m-ecc-8da78b20e0)
Your own site
<a href="https://agentmods.dev/skills/userinner/skills/golang-testing-affaan-m-ecc-8da78b20e0"><img src="https://agentmods.dev/badge/skills/userinner/skills/golang-testing-affaan-m-ecc-8da78b20e0/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for golang-testing

Your own site · 80×15
<a href="https://agentmods.dev/skills/userinner/skills/golang-testing-affaan-m-ecc-8da78b20e0"><img src="https://agentmods.dev/badge/skills/userinner/skills/golang-testing-affaan-m-ecc-8da78b20e0.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 56 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,303 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 92% copy Near-identical to another mod 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.00056 $0.04303
Opus 5.5 $0.00022 $0.01721
Sonnet 5.5 $0.00011 $0.00861
Haiku 4.5 $0.00006 $0.00430

Measured 1mo ago against content hash e3399562c585, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

golang-testing 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 1mo 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.

Origin

This is a copy

92% identical to golang-testing — 5 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

community-skills/engineering/golang-testing--affaan-m-ecc--8da78b20e0/SKILL.md · 722 lines

How it starts

The opening of the file, as written. The whole thing — 722 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Go Testing Patterns

Comprehensive Go testing patterns for writing reliable, maintainable tests following TDD methodology.

When to Activate

  • Writing new Go functions or methods
  • Adding test coverage to existing code
  • Creating benchmarks for performance-critical code
  • Implementing fuzz tests for input validation
  • Following TDD workflow in Go projects

TDD Workflow for Go

The RED-GREEN-REFACTOR Cycle

RED     → Write a failing test first
GREEN   → Write minimal code to pass the test
REFACTOR → Improve code while keeping tests green
REPEAT  → Continue with next requirement

Step-by-Step TDD in Go

// Step 1: Define the interface/signature
// calculator.go
package calculator

func Add(a, b int) int {
    panic("not implemented") // Placeholder
}

// Step 2: Write failing test (RED)
// calculator_test.go
package calculator

import "testing"

func TestAdd(t *testing.T) {
    got := Add(2, 3)
    want := 5
    if got != want {
        t.Errorf("Add(2, 3) = %d; want %d", got, want)
    }
}

// Step 3: Run test - verify FAIL
// $ go test
// --- FAIL: TestAdd (0.00s)
// panic: not implemented

// Step 4: Implement minimal code (GREEN)
func Add(a, b int) int {
    return a + b
}

// Step 5: Run test - verify PASS
// $ go test
// PASS

// Step 6: Refactor if needed, verify tests still pass

Table-Driven Tests

The standard pattern for Go tests. Enables comprehensive coverage with minimal code.

func TestAdd(t *testing.T) {
    tests := []struct {
        name     string
        a, b     int
        expected int
    }{
        {"positive numbers", 2, 3, 5},
        {"negative numbers", -1, -2, -3},
        {"zero values", 0, 0, 0},
        {"mixed signs", -1, 1, 0},
        {"large numbers", 1000000, 2000000, 3000000},
    }

    for _, tt := range tests {
        t.Run(tt.name, func(t *testing.T) {
            got := Add(tt.a, tt.b)
            if got != tt.expected {
                t.Errorf("Add(%d, %d) = %d; want %d",
                    tt.a, tt.b, got, tt.expected)
            }
        })
    }
}

Read the full file on GitHub · 722 lines

Files

What ships with it

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

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. 1mo ago First seen · 722 lines · 56 tokens per session scan A e3399562c585

Subscribe to this mod's changes

golang-testing is a skill published in the GitHub repository userInner/SKILLS (3 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 56 tokens to every session and 4,303 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 92% identical to golang-testing, differing in 5 lines, and is treated as a copy.

Related

Other skills, from other repositories

golang-testing

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

hashgraph-online/awesome-codex-plugins · 35 tokens

go-testing

Use when writing, reviewing, or running Go tests in test.go files — writing tests for a Go package, adding table-driven tests with t.Run subtests, testing a Go HTTP handler with httptest, adding a Go fuzz test or seed corpus, running or choosing go test flags (-race, -fuzz, -fuzztime), or deciding whether to use…

bitwise-media-group/skills · 0 tokens

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…

aiskillstore/marketplace · 97 tokens

go-testing-with-testify

Write, review, or harden Go tests using stretchr/testify assert, require, mock, or suite. Use for assertion choice, test doubles, subtests, concurrency, and flake triage in an existing Go test setup. Use coding-guidance-go for production code or non-testify tests and tester-mindset for test strategy without concrete…

n-n-code/n-n-code-skills · 79 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

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…

onsi/ginkgo · 118 tokens