
Go test table driven
Guides an agent to write, structure and refactor Go table-driven tests
Go test table driven is an open-source agent skill for developer tools. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.
- Scripts
- None
- Platforms
- Claude Code, Codex, Cursor
- GitHub stars
- 90
- Last commit
- License
- MIT
- Listing updated
Similar skills
About Go test table driven
This skill gives an agent a decision framework for when a Go test should be a table and when separate subtests are the better choice. It covers struct design rules such as keeping only fields that vary between cases, naming cases as short scenario sentences, and handling expected errors with a bool flag or a sentinel error checked via require.ErrorIs.
The guidance includes a checklist for reviewing existing tables, a symptom-to-fix table for bloated tables with many fields or per-case setup functions, and rules for keeping the loop body small. It also explains when t.Parallel is safe and how loop variable capture differs before and after Go 1.22.
It expects a Go project with the Go toolchain available. The skill's allowed tools include running go and gofmt, and it points to two reference files with fuller worked examples, loaded only when needed.
When your agent uses it
Deep dive on table-driven tests in Go: when to use them, when to avoid them, struct design, subtest naming, advanced patterns like test matrices and shared setup, and refactoring bloated tables into clean ones. Use when writing table-driven tests, refactoring test tables, reviewing table test structure, or deciding whether table-driven is the right approach. Trigger examples: "table-driven test", "table test", "test cases struct", "test matrix", "parametrize tests", "data-driven test", "refactor test table". Not for: general test strategy, mocks, golden files, fuzzing (go-test-quality), benchmarks (go-performance-review).
From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.
What it can access
- Instructions only, no scripts(see the files on GitHub)
- Asks for: Read, Edit, Write, Glob, Grep, Bash(go:*), Bash(gofmt:*)(see the files on GitHub)
- License: MIT(see the files on GitHub)
From a static check of its 3 files (17 KB) on GitHub on 2 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.
Check another skill before you install it.
Install
Download the skill folder from https://github.com/eduardo-sl/go-agent-skills and copy it into your agent's skills folder.
What it does
- When tables fit
- Criteria for deciding whether a set of cases shares one function, assertion pattern and data-only differences.
- Struct design rules
- Guidance on field selection, descriptive case names, and error expectations in table structs.
- Refactoring bloated tables
- A symptom-to-fix guide for tables with too many fields, setup functions or branching logic.
- Parallel subtests
- Notes on when t.Parallel is safe and how loop variable capture depends on the Go version.
- Review checklist
- A short checklist covering case coverage, loop body size and subtest wrapping.
Good for
- Convert a set of copy-pasted Go tests into a single table-driven test
- Decide whether a new test should be a table or separate subtests
- Refactor a test table that has grown setup functions and conditionals
- Review the structure of an existing Go table test
- Add happy path, error and edge cases to a parser or validator test
Go test table driven FAQ
What does the skill need to run?
It requires the Go toolchain and is designed for Claude Code or similar AI coding agents working on Go projects.
When does Go test table driven trigger?
It triggers on requests about table-driven tests, table tests, test matrices, parametrized or data-driven tests, and refactoring test tables. Test strategy, mocks, golden files and fuzzing are handled by a separate skill.
Does Go test table driven modify files?
Its allowed tools include Read, Edit, Write and Bash for go and gofmt, so it can edit test files and run the Go tools.
What license is Go test table driven under?
The skill is released under the MIT license.
Does Go test table driven run scripts?
No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.
Which AI agents can use Go test table driven?
Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.
What are the best alternatives to Go test table driven?
The closest alternatives to Go test table driven are TDD, Go test quality, TDD workflow, Cpp testing and TDD loop.
Where this comes from
- Description: from the skill's own SKILL.md.
More from eduardo-sl/go-agent-skills

Guides Go agents in designing HTTP REST APIs, handlers, middleware and shutdown
- Open source
- 90 GitHub stars
- Developer tools

Reviews Go project structure, dependency direction and module boundaries
- Open source
- 90 GitHub stars
- Developer tools

Guides an AI agent to build Go command-line tools with clean flags, streams and exit codes
- Open source
- 90 GitHub stars
- Developer tools

Guides Go code toward constructor injection, explicit wiring and no global state
- Open source
- 90 GitHub stars
- Developer tools

Guides Go code toward idiomatic design patterns like functional options and factories
- Open source
- 90 GitHub stars
- Developer tools

Guides building Go GraphQL servers with gqlgen, covering N+1 batching and query limits
- Open source
- 90 GitHub stars
- Developer tools




