1. Habit
  2. Skills
  3. Golang Testing skill
samber · 43K installs

Golang Testing skill
Runs by itself, weekly test audit.

Go tests stay fast, isolated, leak-free.

Install the Golang Testing skill and make it a habit: follow https://gethabit.dev/skills/samber/golang-testing.md

  1. 1Copy
  2. 2Paste into Claude Code, Codex or Cursor
  3. 3It runs by itself

43K installs4K starsMIT licenceSource on GitHub ↗

Golang Testing

by samber · 43K installs

The skill

The golang testing skill helps Go developers write and review production-ready tests: table-driven tests, testify, parallel tests, fuzzing, goleak leak checks, synctest, coverage and integration tests with build tags.

Only when you ask.

The habit

Go tests stay fast, isolated, leak-free.

↻ Runs by itselfweekly test audit

How the habit works.
You don't have to.

Three questionsWhen does it start? How does it check its work? What does it remember?

One run, step by step.
Then it stops.

Stop ruleStops after one audit with at most 20 gaps reported per run.

  1. 01

    Read last report

    The agent opens last week's gap report.

  2. 02

    Audit unit tests

    One sub-agent checks unit test quality and finds gaps with go test -coverprofile=coverage.out ./....

  3. 03

    Audit integration tests

    A second sub-agent checks build tags and isolation of integration tests.

  4. 04

    Audit goroutines

    A third sub-agent checks goroutine leaks with goleak and race conditions.

  5. 05

    Run the suite

    It runs go test -race ./... and the integration tests.

  6. 06

    Write gap report

    It merges the findings into one gap report and marks new and closed gaps.

What it may do.
Nothing more.

Safe by defaultIt writes only in its own folder and asks you before anything goes out.

Is it for you?
Use it when it fits.

Quick checkRead both lists. If the left one sounds like you, the Golang Testing skill helps.

Use it when

  • ✓ You write tests for Go code
  • ✓ You audit a Go test suite for gaps
  • ✓ A Go test is flaky or slow

Skip it when

  • – You need benchmark methods
  • – Your project is not Go

Questions

Golang Testing skill, answered.

Is coverage the goal?

No. The skill treats coverage as a way to find untested paths, not as a target.

Can it write tests too?

Yes, in write mode it scaffolds table-driven tests with gotests. This loop runs audit mode.

What about flaky tests?

Debug mode reproduces and isolates them; the audit flags patterns like order-dependent tests.

How do I install the Golang Testing skill?

Copy the prompt at the top into your agent. It installs the skill from samber/cc-skills-golang and sets up the habit. Or run npx skills add samber/cc-skills-golang --skill golang-testing.

Is the Golang Testing skill free?

Yes. It is published under MIT. Habit is free too.

Golang Testing. Now as a habit.

Install the Golang Testing skill and make it a habit: follow https://gethabit.dev/skills/samber/golang-testing.md

  • Free
  • No account
  • Undo in one line

All samber skills →More code skills →

Works in

  • Claude Code
  • Codex
  • Cursor
  • ChatGPT
  • Claude app

Made by samber, published under MIT. Habit links to the original and never changes it. Is this your skill?

Copying didn't work here. Select the line and copy it by hand.