go-test

go-test is a skill for Claude Code, Codex from Luohaothu/everything-codex. It costs 32 tokens per session (628 once invoked), scanned A, original, MIT.

A Go development workflow that uses test-driven development (TDD): write a failing test first, add the smallest working implementation, then improve the code. It uses table-driven tests, where many input and expected-result cases share one test structure.

In plain words
What is it for?
Use it when adding or changing Go code and you want a test-first workflow with coverage checks.
Why use it?
It helps keep implementation decisions tied to tested behavior and checks whether enough of the code is covered by tests.

Skill for Claude CodeCodex

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/luohaothu/everything-codex/go-test
Any agent
npx skills add Luohaothu/everything-codex --skill go-test
Clone the repo
git clone --depth 1 https://github.com/Luohaothu/everything-codex

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 go-test

README.md
[![agentmods](https://agentmods.dev/badge/skills/luohaothu/everything-codex/go-test.svg)](https://agentmods.dev/skills/luohaothu/everything-codex/go-test)
Your own site
<a href="https://agentmods.dev/skills/luohaothu/everything-codex/go-test"><img src="https://agentmods.dev/badge/skills/luohaothu/everything-codex/go-test.svg" alt="Measured on agentmods" height="20"></a>
Per session 32 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 628 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 $0.00032 $0.00628
Opus 5 $0.00016 $0.00314
Sonnet 5 $0.00006 $0.00126
Haiku 4.5 $0.00003 $0.00063

Measured yesterday against content hash fcf9ecd29954, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

go-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 yesterday.

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.

skills/go-test/SKILL.md · 109 lines

How it starts

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

Go TDD Skill

Enforces test-driven development methodology for Go code using idiomatic Go testing patterns.

TDD Cycle

RED     → Write failing table-driven test
GREEN   → Implement minimal code to pass
REFACTOR → Improve code, tests stay green
REPEAT  → Next test case

Workflow

  1. Define Types/Interfaces: Scaffold function signatures first
  2. Write Table-Driven Tests: Create comprehensive test cases (RED)
  3. Run Tests: Verify tests fail for the right reason
  4. Implement Code: Write minimal code to pass (GREEN)
  5. Refactor: Improve while keeping tests green
  6. Check Coverage: Ensure 80%+ coverage

Test Patterns

Table-Driven Tests

tests := []struct {
    name     string
    input    InputType
    want     OutputType
    wantErr  bool
}{
    {"case 1", input1, want1, false},
    {"case 2", input2, want2, true},
}

for _, tt := range tests {
    t.Run(tt.name, func(t *testing.T) {
        got, err := Function(tt.input)
        // assertions
    })
}

Parallel Tests

for _, tt := range tests {
    tt := tt // Capture
    t.Run(tt.name, func(t *testing.T) {
        t.Parallel()
        // test body
    })
}

Test Helpers

func setupTestDB(t *testing.T) *sql.DB {
    t.Helper()
    db := createDB()
    t.Cleanup(func() { db.Close() })
    return db
}

Coverage Commands

go test -cover ./...                    # Basic coverage
go test -coverprofile=coverage.out ./...# Coverage profile
go tool cover -html=coverage.out        # View in browser
go tool cover -func=coverage.out        # Coverage by function
go test -race -cover ./...              # With race detection

Coverage Targets

Code Type Target
Critical business logic 100%
Public APIs 90%+
General code 80%+
Generated code Exclude

Best Practices

DO:

  • Write test FIRST, before any implementation
  • Run tests after each change
  • Use table-driven tests for comprehensive coverage
  • Test behavior, not implementation details
  • Include edge cases (empty, nil, max values)
  • Always run with -race flag

Read the full file on GitHub · 109 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. yesterday First seen · 109 lines · 32 tokens per session scan A fcf9ecd29954

Subscribe to this mod's changes

go-test is a skill published in the GitHub repository Luohaothu/everything-codex (24 stars, last pushed 24d ago), licensed MIT. It adds 32 tokens to every session and 628 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-09-03.