Skip to content

Go Testing Patterns

Guides the agent to write focused Go tests, Bubbletea/TUI tests, and golden-file updates.

Stars
8,181
Licence
MIT
Files
2 files

What it does

When you ask an AI agent to write or review Go tests, this skill gives it a set of house rules and patterns to follow. It steers the agent toward table-driven tests, testing behavior rather than internal details, using temporary folders for file tests, skipping slow integration tests in short mode, and handling terminal UI (Bubbletea) and golden-file snapshot tests in a consistent way.

Great for

  • Go developers who want an agent to add or review unit tests with consistent structure
  • Maintainers of Bubbletea terminal apps who test interactive flows and rendered output
  • Teams that use golden files and want updates done through a controlled -update step

Skip it if

  • Projects not written in Go, since the patterns are Go-specific (wrong language, little value)
  • Teams wanting a general testing strategy beyond these rules; it is a narrow, opinionated guide

Try asking

  • “Write table-driven tests for this Go parser, including error cases”
  • “Add teatest coverage for the install flow in my Bubbletea TUI”
  • “Review my new Go test files and suggest missing scenarios”
  • “Update the golden files for the rendered help output and show me the diff”
Step-by-step guide: how to use Go Testing PatternsInstall, first run, examples, tips and FAQs

Install in 3 steps

  1. 1

    Download the skill

    The ZIP contains the 2 original files, the MIT licence and an attribution note.

    go-testing.zip
  2. 2

    Add it to your agent

    Claude Code (all projects)

    mkdir -p ~/.claude/skills && unzip go-testing.zip -d ~/.claude/skills/

    Claude Code / Agent SDK (this project only)

    mkdir -p .claude/skills && unzip go-testing.zip -d .claude/skills/

    Claude apps (web/desktop): Settings → Capabilities → Skills → Upload skill, and choose the ZIP.

  3. 3

    Ask for the task

    No special command needed — the agent reads the skill's description and loads it when your request matches. Try one of the prompts above.

Get better results

  • Point the agent at the specific package or file so it runs the narrow test first, as the skill instructs.
  • Ask for a list of scenarios covered and skipped integration tests, which the skill's output contract requires.
  • Review golden-file diffs yourself before accepting them; the skill asks the agent to inspect them too.

What's inside

  • references/examples.md
  • SKILL.md

Redistributed unmodified from Gentleman-Programming/gentle-ai under the MIT licence. The assessment was drafted with AI from the skill's files on 2026-10-29. Skills can instruct your agent to run code — read SKILL.md and any scripts before installing.