test-go

test-go is a skill for Claude Code, Codex from sergeyklay/.agents. It costs 109 tokens per session (3,780 once invoked), scanned A, original, Apache-2.0.

A set of instructions for writing and reviewing Go tests, including tests that run without external systems and tests that use real services.

In plain words
What is it for?
It is for creating or improving Go tests, such as unit tests, tests using sample files, HTTP adapter tests, and environment-controlled integration tests.
Why use it?
It helps keep test structure, helpers, subtests, and conditions for running integration tests consistent.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

Good fit It is for creating or improving Go tests, such as unit tests, tests using sample files, HTTP adapter tests, and environment-controlled integration tests.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/sergeyklay/.agents/test-go
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 sergeyklay/.agents --skill test-go
Clone the repo
git clone --depth 1 https://github.com/sergeyklay/.agents

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/sergeyklay/.agents/test-go/github.svg)](https://agentmods.dev/skills/sergeyklay/.agents/test-go)
Your own site
<a href="https://agentmods.dev/skills/sergeyklay/.agents/test-go"><img src="https://agentmods.dev/badge/skills/sergeyklay/.agents/test-go/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 test-go

Your own site · 80×15
<a href="https://agentmods.dev/skills/sergeyklay/.agents/test-go"><img src="https://agentmods.dev/badge/skills/sergeyklay/.agents/test-go.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 109 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,780 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00109 $0.03780
Opus 5 $0.00055 $0.01890
Sonnet 5 $0.00022 $0.00756
Haiku 4.5 $0.00011 $0.00378

Measured today against content hash b681c9b0b667, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

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

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.

.agents/skills/test-go/SKILL.md · 398 lines

How it starts

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

Go Testing

Placeholders

Examples below use two placeholders. They are not literal - substitute the actual names from the project being worked on, matching the case of the surrounding context:

  • {PROJECT} - the project's identifier (e.g. env-var prefix, repo name). In env vars: MYAPP_…. In prose: MyApp or myapp.
  • {integration} - an external system or adapter name (e.g. jira, stripe, claude). In paths: internal/tracker/jira/. In env vars: JIRA_…. In type names: JiraAdapter.

.go files in assets/ use concrete-looking sample names (Adapter, MYAPP_INTEGRATION_TEST, etc.) so the templates stay syntactically valid Go; comments inside each template tell you what to rename.

Decision Framework

Before writing any test, determine which category it belongs to:

Category Characteristics Run condition
Unit Deterministic, no I/O, no network Always (make test)
Unit with fixtures Reads testdata/ files, uses t.TempDir() Always
Unit with httptest Spins up httptest.NewServer, tests HTTP adapters Always
Integration Talks to real external service Env-gated by per-adapter variable: {PROJECT}_{INTEGRATION}_TEST=1

Pick the lightest category that validates the behavior.


Canonical Test Structure

Every test file in this project follows this skeleton: helpers first, then test functions. Internalize it - do not deviate. Declaration order carries the structure, so do not add banner comments to mark the sections; the go-codestyle rule bans them.

package pkg // or pkg_test for black-box

import (
    "testing"
    // stdlib, then project imports, then third-party
)

func helperName(t *testing.T, args ...) ReturnType {
    t.Helper()
    // setup or assertion logic
    // use t.Cleanup() for teardown, never defer in helpers
}

func TestFunctionName(t *testing.T) {
    t.Parallel()
    // ...
}

Read the full file on GitHub · 398 lines

Files

What ships with it

6 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. today Changed · +14 lines b681c9b0b667
  2. 10d ago First seen · 384 lines · 109 tokens per session scan A 0f86cee59718

Subscribe to this mod's changes

test-go is a skill published in the GitHub repository sergeyklay/.agents (5 stars, last pushed today), licensed Apache-2.0. It adds 109 tokens to every session and 3,780 once invoked, about $0.0005 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-31.

Related

Other skills, from other repositories

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

111-java-maven-dependencies

Use when you need to add or evaluate Maven dependencies that improve code quality or domain modeling — including nullness annotations (JSpecify), static analysis (Error Prone + NullAway), functional programming (VAVR), architecture testing (ArchUnit), or money and currency support (JavaMoney) — and want a…

jabrena/plinth · 133 tokens

130-java-testing-strategies

Use when you need to apply testing strategies for Java code — RIGHT-BICEP to guide test creation, A-TRIP for test quality characteristics, or CORRECT for verifying boundary conditions. This should trigger for requests such as Review Java code for testing strategies; Apply RIGHT-BICEP testing strategies in Java code…

jabrena/plinth · 96 tokens

131-java-testing-unit-testing

Use when you need to review, improve, or write Java unit tests — including migrating from JUnit 4 to JUnit 5, adopting AssertJ for fluent assertions, structuring tests with Given-When-Then, ensuring test independence, applying parameterized tests, mocking dependencies with Mockito, verifying boundary conditions…

jabrena/plinth · 160 tokens

421-frameworks-quarkus-testing-unit-tests

Use when you need to write fast unit tests for Quarkus applications — including pure tests with @ExtendWith(MockitoExtension.class), @QuarkusTest with @InjectMock for full CDI mock replacement, @InjectSpy for partial CDI bean mocking, REST Assured for resource-focused tests, @ParameterizedTest with @CsvSource /…

jabrena/plinth · 205 tokens

craft-pest

Testing Craft CMS 5 plugins and modules with Pest — test isolation, database safety, and the markhuot/craft-pest-core harness. ALWAYS load when writing, running, fixing, or reviewing tests for a Craft plugin or module, and whenever a suite touches a real Craft install. Covers why rollback is opt-in, tests/Pest.php +…

michtio/craftcms-claude-skills · 353 tokens