golang-testing

golang-testing is a skill for Kiro from Fmarzochi/EGC. It costs 37 tokens per session (1,658 once invoked), scanned A, a copy of golang-testing, Apache-2.0.

A collection of Go testing practices using table-driven tests, where many related cases share one test structure.

In plain words
What is it for?
Use it when writing or improving Go tests, checking concurrent code, measuring performance, or testing interactions between components.
Why use it?
It helps organize repeatable test cases and adds guidance for helpers, benchmarks, race detection, coverage, and integration tests.

Skill for Kiro

Written for Kiro: installed under .kiro/.

Good fit Use it when writing or improving Go tests, checking concurrent code, measuring performance, or testing interactions between components.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/fmarzochi/egc/golang-testing
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 Fmarzochi/EGC --skill golang-testing
Clone the repo
git clone --depth 1 https://github.com/Fmarzochi/EGC

Made for: Kiro.

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/fmarzochi/egc/golang-testing/github.svg)](https://agentmods.dev/skills/fmarzochi/egc/golang-testing)
Your own site
<a href="https://agentmods.dev/skills/fmarzochi/egc/golang-testing"><img src="https://agentmods.dev/badge/skills/fmarzochi/egc/golang-testing/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/fmarzochi/egc/golang-testing"><img src="https://agentmods.dev/badge/skills/fmarzochi/egc/golang-testing.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 37 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,658 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 97% 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.00037 $0.01658
Opus 5 $0.00018 $0.00829
Sonnet 5 $0.00007 $0.00332
Haiku 4.5 $0.00004 $0.00166

Measured 10d ago against content hash 495e7d10e58a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, 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 10d 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

97% identical to golang-testing — 2 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.

.kiro/skills/golang-testing/SKILL.md · 333 lines

How it starts

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

Go Testing

This skill provides comprehensive Go testing patterns extending common testing principles with Go-specific idioms.

Testing Framework

Use the standard go test with table-driven tests as the primary pattern.

Table-Driven Tests

The idiomatic Go testing pattern:

func TestValidateEmail(t *testing.T) {
    tests := []struct {
        name    string
        email   string
        wantErr bool
    }{
        {
            name:    "valid email",
            email:   "[email protected]",
            wantErr: false,
        },
        {
            name:    "missing @",
            email:   "userexample.com",
            wantErr: true,
        },
        {
            name:    "empty string",
            email:   "",
            wantErr: true,
        },
    }

    for _, tt := range tests {
        t.Run(tt.name, func(t *testing.T) {
            err := ValidateEmail(tt.email)
            if (err != nil) != tt.wantErr {
                t.Errorf("ValidateEmail(%q) error = %v, wantErr %v",
                    tt.email, err, tt.wantErr)
            }
        })
    }
}

Benefits:

  • Easy to add new test cases
  • Clear test case documentation
  • Parallel test execution with t.Parallel()
  • Isolated subtests with t.Run()

Test Helpers

Use t.Helper() to mark helper functions:

func assertNoError(t *testing.T, err error) {
    t.Helper()
    if err != nil {
        t.Fatalf("unexpected error: %v", err)
    }
}

func assertEqual(t *testing.T, got, want interface{}) {
    t.Helper()
    if !reflect.DeepEqual(got, want) {
        t.Errorf("got %v, want %v", got, want)
    }
}

Benefits:

  • Correct line numbers in test failures
  • Reusable test utilities
  • Cleaner test code

Test Fixtures

Use t.Cleanup() for resource cleanup:

func testDB(t *testing.T) *sql.DB {
    t.Helper()

    db, err := sql.Open("sqlite3", ":memory:")
    if err != nil {
        t.Fatalf("failed to open test db: %v", err)
    }

    // Cleanup runs after test completes
    t.Cleanup(func() {
        if err := db.Close(); err != nil {
            t.Errorf("failed to close db: %v", err)
        }
    })

    return db
}

func TestUserRepository(t *testing.T) {
    db := testDB(t)
    repo := NewUserRepository(db)
    // ... test logic
}

Read the full file on GitHub · 333 lines

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. 10d ago First seen · 333 lines · 37 tokens per session scan A 495e7d10e58a

Subscribe to this mod's changes

golang-testing is a skill published in the GitHub repository Fmarzochi/EGC (51 stars, last pushed today), licensed Apache-2.0. It adds 37 tokens to every session and 1,658 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. It is 97% identical to golang-testing, differing in 2 lines, and is treated as a copy.

Related

Other skills, from other repositories

lang-go

Go toolchain: golangci-lint, go vet, go test, go mod. CI gate commands, file layout, interface patterns. Use when working on a Go project.

paruff/uFawkesAI · 40 tokens

review-coverage

Use when the user asks for a coverage review, test coverage analysis, coverage gap analysis, uncovered code review, or wants to know what new/changed Go code is missing tests. Runs go test -coverprofile against the resolved scope and reports uncovered functions in changed Go files, grouped by package, with severity…

paultyng/skill-issue · 73 tokens

Go Testing Patterns

Go testing with testing package, table-driven tests, subtests, benchmarks, test fixtures, httptest, and testify assertions.

PramodDutta/qaskills · 29 tokens

temporal-python-testing

Test Temporal workflows with pytest, time-skipping, and mocking strategies. Covers unit testing, integration testing, replay testing, and local development setup. Use when implementing Temporal workflow tests or debugging test failures.

wshobson/agents · 45 tokens

golang-testing

Production-ready Golang tests — table-driven tests, testify suites and mocks, parallel tests, fuzzing, fixtures, goroutine leak detection with goleak, snapshot testing, code coverage, integration tests, idiomatic test naming. Use when writing or reviewing Go tests, choosing a testing approach, setting up Go test CI…

samber/cc-skills-golang · 115 tokens

timeouts-and-async

Make Ginkgo specs interruptible and test asynchronous behavior — SpecContext/context.Context cancellable nodes, NodeTimeout/SpecTimeout/GracePeriod, the --timeout flag, Abort and SIGINT behavior, Gomega Eventually/Consistently (the func(g Gomega) form, .WithContext), and the defer GinkgoRecover() rule for goroutines.…

onsi/ginkgo · 106 tokens