add-go-test

add-go-test is a skill for Claude Code, Codex from authgear/authgear-server. It costs 26 tokens per session (395 once invoked), scanned A, original, Apache-2.0.

A set of instructions for writing or extending unit tests in Go, the programming language.

In plain words
What is it for?
Use it when adding or updating Go tests, including tests that use either standard Go testing or the repository's Convey style.
Why use it?
It helps tests match the style already used in the repository and checks the affected package after changes.

Skill for Claude CodeCodex

About the project

Authgear is an open-source identity and authentication service that provides login, account management, multi-factor authentication, passkeys, and single sign-on for applications. SaaS and mobile-app developers can run it themselves or use Authgear Cloud to manage consumer and enterprise user access. The catalogue entries relate to operating and configuring Authgear's authentication workflows.

authgear/authgear-server · 2,024 stars · on GitHub · authgear.com

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

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/authgear/authgear-server/add-go-test.svg)](https://agentmods.dev/skills/authgear/authgear-server/add-go-test)
Your own site
<a href="https://agentmods.dev/skills/authgear/authgear-server/add-go-test"><img src="https://agentmods.dev/badge/skills/authgear/authgear-server/add-go-test.svg" alt="Measured on agentmods" height="20"></a>
Per session 26 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 395 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.1 $0.00026 $0.00395
Opus 5 $0.00013 $0.00198
Sonnet 5 $0.00005 $0.00079
Haiku 4.5 $0.00003 $0.00040

Measured 6d ago against content hash 70fe7249f1b9, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

add-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 6d 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.

.claude/skills/add-go-test/SKILL.md · 40 lines

What it actually says

Follow this skill when adding Go tests.

Critical: Match Existing Test Style First

Always inspect existing *_test.go files in the package first. This repo uses different testing styles in different packages:

  • Convey (BDD-style): Many packages use github.com/smartystreets/goconvey. Identified by import . "github.com/smartystreets/goconvey/convey" and test structure like:

    func TestFoo(t *testing.T) {
      Convey("description", func() {
        // assertions here
        So(result, ShouldEqual, expected)
      })
    }
    
  • Standard testing.T: Some packages use plain *testing.T with manual assertions.

When in doubt, use Convey if the package has any imports of it. Convey provides better error messages and matches the repo's BDD conventions.

Workflow

  1. Inspect the package's *_test.go files first to identify the testing style being used.
  2. Match the local test style exactly. Do not mix styles in the same package.
  3. Add the smallest test file that covers the behavior.
  4. Run go test on the affected package. If the change crosses packages or touches shared code, run the narrowest broader test set that proves the change is safe.

Notes

  • Prefer table-driven tests when the package already uses them.
  • Keep fixtures local to the test file unless they are reused elsewhere.
  • If the test requires generated code or assets, rerun the generator before the final test run.
  • When using Convey, use So() assertions for consistency with the package style, not manual if statements.
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. 6d ago First seen · 40 lines · 26 tokens per session scan A 70fe7249f1b9

Subscribe to this mod's changes

add-go-test is a skill published in the GitHub repository authgear/authgear-server (2,024 stars, last pushed yesterday), licensed Apache-2.0. It adds 26 tokens to every session and 395 once invoked, about $0.0001 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-30.

Related

Other skills, from other repositories

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

gen-test

Generate idiomatic tests for Go packages and handlers in the Meshery project.

meshery/meshery · 18 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

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

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…

samber/cc-skills-golang · 97 tokens

eng-test-conventions

Go test-shape discipline for Compozy. Use when writing or editing test.go under cmd or internal after test placement is justified. Do not use for non-Go tests, fixture-only changes, or as a replacement for eng-consolidate-test-suites.

compozy/compozy · 58 tokens