golang-development:test

golang-development:test is a command for Claude Code from geoffjay/claude-plugins. It costs 23 tokens per session (3,176 once invoked), scanned A, original, MIT.

A command that creates tests for Go programs, including tests for individual functions, data-driven test cases, performance tests, and integration tests.

In plain words
What is it for?
Use it to generate unit tests, table-driven tests, benchmarks, integration tests, or all of them for Go code.
Why use it?
Writing all these test variations by hand takes time and can leave important cases uncovered. The command provides several test types from a file or function you specify.

Command for Claude Code

Written for Claude Code: a Claude Code command (commands/*.md). Also seen: positional $N argument.

Good fit Use it to generate unit tests, table-driven tests, benchmarks, integration tests, or all of them for Go code.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/geoffjay/claude-plugins/test
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.

Clone the repo
git clone --depth 1 https://github.com/geoffjay/claude-plugins

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 golang-development:test

README.md
[![agentmods](https://agentmods.dev/badge/commands/geoffjay/claude-plugins/test/github.svg)](https://agentmods.dev/commands/geoffjay/claude-plugins/test)
Your own site
<a href="https://agentmods.dev/commands/geoffjay/claude-plugins/test"><img src="https://agentmods.dev/badge/commands/geoffjay/claude-plugins/test/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-development:test

Your own site · 80×15
<a href="https://agentmods.dev/commands/geoffjay/claude-plugins/test"><img src="https://agentmods.dev/badge/commands/geoffjay/claude-plugins/test.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 23 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,176 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 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.00023 $0.03176
Opus 5.5 $0.00009 $0.01270
Sonnet 5.5 $0.00005 $0.00635
Haiku 4.5 $0.00002 $0.00318

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

Security

Grade A, and why

golang-development:test 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.

plugins/golang-development/commands/test.md · 578 lines

How it starts

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

Golang Development Test Command

Generate comprehensive, production-ready tests for Go code including unit tests, table-driven tests, benchmarks, and examples.

Usage

/golang-development:test <file-or-function> [test-type] [options]

Arguments

  • $1 - File path or function name to test (required)
  • $2 - Test type: unit, table, benchmark, integration, all (optional, defaults to unit)
  • $3 - Options as JSON (optional)

Examples

# Generate unit tests for a file
/golang-development:test internal/service/user.go

# Generate table-driven tests
/golang-development:test internal/service/user.go table

# Generate benchmarks
/golang-development:test internal/service/user.go benchmark

# Generate all test types
/golang-development:test internal/service/user.go all

# Generate tests with options
/golang-development:test internal/service/user.go unit '{"with_mocks": true, "coverage_target": 90}'

Test Types

1. Unit Tests

Basic unit tests for individual functions:

// Source: user.go
package service

type User struct {
    ID    string
    Email string
    Age   int
}

func (u *User) IsAdult() bool {
    return u.Age >= 18
}

func ValidateEmail(email string) error {
    if !strings.Contains(email, "@") {
        return errors.New("invalid email format")
    }
    return nil
}

// Generated: user_test.go
package service

import (
    "testing"
)

func TestUser_IsAdult(t *testing.T) {
    t.Run("adult user", func(t *testing.T) {
        user := &User{Age: 25}
        if !user.IsAdult() {
            t.Error("expected user to be adult")
        }
    })

    t.Run("minor user", func(t *testing.T) {
        user := &User{Age: 15}
        if user.IsAdult() {
            t.Error("expected user to be minor")
        }
    })

    t.Run("edge case - exactly 18", func(t *testing.T) {
        user := &User{Age: 18}
        if !user.IsAdult() {
            t.Error("18 year old should be adult")
        }
    })
}

func TestValidateEmail(t *testing.T) {
    tests := []struct {
        name    string
        email   string
        wantErr bool
    }{
        {
            name:    "valid email",
            email:   "[email protected]",
            wantErr: false,
        },
        {
            name:    "invalid email - no @",
            email:   "userexample.com",
            wantErr: true,
        },
        {
            name:    "empty email",
            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() error = %v, wantErr %v", err, tt.wantErr)
            }
        })
    }
}

Read the full file on GitHub · 578 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. 1mo ago First seen · 578 lines · 23 tokens per session scan A eb114e91d75a

Subscribe to this mod's changes

golang-development:test is a command published in the GitHub repository geoffjay/claude-plugins (8 stars, last pushed 11mo ago), licensed MIT. It adds 23 tokens to every session and 3,176 once invoked, about $0.0001 per session on Opus 5.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.