Skip to content

Guide · Agent skill

How to use the Go Testing Patterns agent skill (go-testing)

Updated · written with AI from the project's own documentation and checked against our catalogue data

The go-testing skill is a set of written rules and Go testing patterns that you load into an AI coding agent, such as Claude, so it writes or reviews Go tests the same way each time. It is for Go developers who want consistent unit tests, and for maintainers of Bubbletea terminal apps who need to test interactive flows and rendered output. After this guide you will know what the skill changes, how to install it, how to ask for it in plain language, and what to check before trusting its output.

Go Testing PatternsGentleman-Programming/gentle-ai · MIT

Quick start

  1. 1Download the ZIP. Download the go-testing skill ZIP from this page.
  2. 2Choose an install location. Pick ~/.claude/skills/ for all projects, or .claude/skills/ inside one project folder.
  3. 3Unzip the skill. Unzip the downloaded file into the folder you chose so the skill files sit in place.
  4. 4Or upload in the Claude apps. If you use the Claude apps, go to Settings → Capabilities → Skills and upload the ZIP.
  5. 5Check the requirements. Confirm you have a Go toolchain with go test, plus Bubbletea and teatest if you test TUI code.
  6. 6Ask for a scoped test task. Describe the package, function, or screen and mention Go tests, coverage, Bubbletea, or golden files.
  7. 7Review the report. Check the agent's report of changed files, scenarios, commands and any skipped integration tests.

What the go-testing skill makes the agent do

An agent skill is a folder of instructions that an AI agent loads when a task matches the skill's description. This skill's description is triggered by requests about Go tests, go test coverage, Bubbletea teatest, and golden files. Once loaded, it asks the agent to follow a fixed set of testing rules rather than its default habits.

  • Prefer table-driven tests for multiple cases and name each case with t.Run(tt.name, ...).
  • Test behavior and state transitions, not implementation details.
  • Use t.TempDir() for filesystem tests and never rely on a real home directory.
  • Skip integration tests that run external commands or slow flows when testing.Short() is set.
  • For Bubbletea, call Model.Update() directly for state changes and use teatest only for full interactive flows.
  • Make golden files deterministic and update them only through the repo's -update path, then rerun tests without -update.
  • Use small mocks or interfaces around system or command execution boundaries.

Install the go-testing skill

Download the skill ZIP from this page. You can install it in one of three places depending on how you use the agent.

For a personal setup available in all your projects, unzip the download into ~/.claude/skills/. For a single project, unzip it into that project's .claude/skills/ folder so it applies only there. In the Claude apps, you can instead upload the ZIP under Settings → Capabilities → Skills.

  • Personal: ~/.claude/skills/
  • Single project: .claude/skills/ inside the project folder
  • Claude apps: Settings → Capabilities → Skills, then upload the ZIP

Check what you need before you start

The skill itself is only instructions. The patterns are written for Go code, so you need a Go toolchain that provides go test. If you want the agent to test terminal UI code, the project also needs the Bubbletea and teatest libraries.

According to the skill's listing, it does not run scripts and does not use the network.

  • Go toolchain (go test)
  • Bubbletea and teatest libraries, only if you test TUI code
  • Scripts: none run by the skill
  • Network: not used by the skill

Trigger the skill with natural requests

You do not need a special command. Describe the testing task in plain language and mention Go, tests, coverage, Bubbletea, or golden files so the skill's description matches. The agent will then apply the rules above.

Ask for a concrete scope. Naming a package, function, or screen usually gets better results than asking for tests for the whole project.

  • Write table-driven tests for the parser in ./internal/config and cover the error cases.
  • Review the Go tests in this package and point out tests that check implementation details.
  • Add teatest coverage for the login flow in our Bubbletea app.
  • Add a golden file test for the rendered help screen and show me how to update it safely.
  • Check coverage for the file-handling code and make sure it uses t.TempDir().

Example: a table-driven test the skill steers toward

The reference examples in the skill show the shape of a table-driven test. Each case has a name, an input, and an expected result, and the loop runs each case as a subtest. Error cases are explicit, as the skill's rules require.

  • Cases are named by scenario, such as valid input or empty input.
  • Errors are checked against wantErr, so failure behaviour is tested as deliberately as success.
func TestProcessInput(t *testing.T) { tests := []struct { name string input string want string wantErr bool }{ {name: "valid input", input: "hello", want: "HELLO"}, {name: "empty input", input: "", wantErr: true}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { got, err := ProcessInput(tt.input) if (err != nil) != tt.wantErr { t.Fatalf("err = %v, wantErr %v", err, tt.wantErr) } if got != tt.want { t.Fatalf("got %q, want %q", got, tt.want) } }) } }

Work through the skill's execution steps

The skill asks the agent to follow a fixed sequence. You can use the same sequence to check its work. It identifies the behaviour under test and the smallest public boundary that proves it, then chooses a test pattern from the decision table, names cases by scenario, and asserts outputs, errors, state, and side effects.

The agent runs the narrow package test first and then the broader suite. For golden updates it runs with -update, inspects the diff, and reruns without -update. The skill's output contract asks for a report of changed test files, scenarios covered, commands executed, golden files updated, and any skipped integration scope.

  • Ask for the report so you can see exactly which commands ran.
  • For golden files, review the diff yourself before accepting it.

What people use it for

  • Adding table-driven unit tests to a Go parser or validator with error cases included.
  • Reviewing an existing Go test suite for tests that check internals instead of behaviour.
  • Testing Bubbletea model state changes by calling Model.Update() directly with messages.
  • Writing teatest coverage for a full interactive flow in a terminal app.
  • Creating and updating golden files for rendered output through a controlled -update step.

Frequently asked questions

Is the go-testing skill free to use?

The directory lists the item under the MIT licence, but the SKILL.md file in the source says Apache-2.0. Check the licence file in the original repository before you reuse or redistribute the skill. The source does not give pricing for the skill.

What do I need to use the go-testing skill?

You need a Go toolchain that provides go test. If you want the agent to test Bubbletea terminal code, you also need the Bubbletea and teatest libraries in that project.

Where do I install an agent skill like this?

Unzip it into ~/.claude/skills/ for personal use or into a project's .claude/skills/ folder for one project. In the Claude apps, upload the ZIP under Settings → Capabilities → Skills.

Does the go-testing skill run scripts or use the internet?

According to the skill's listing, it runs no scripts and uses no network. It contains instructions and reference examples only.

Can the skill test projects that are not written in Go?

No. The patterns are specific to Go, so they add little value for other languages. Use a skill or guide written for your language instead.

How is this different from a general testing guide?

This skill is narrow and opinionated. It sets house rules for table-driven tests, Bubbletea and teatest, golden files, and temporary folders, rather than giving a broad testing strategy.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

Use this skill if you are a Go developer or a Bubbletea maintainer who wants an AI agent to write or review tests with a consistent structure, including golden-file updates done through a controlled -update step. Pick something else if your project is not in Go or if you want a general testing strategy beyond these specific rules.

Download the skill