go-test

Guide Go table-driven tests through a RED-GREEN-REFACTOR cycle.

24|5|Updated Feb 8, 2026
One-click install
npx skills add https://github.com/Luohaothu/everything-codex --skill go-test-luohaothu
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: go-test
Source: https://github.com/Luohaothu/everything-codex/tree/main/skills/go-test
Command: npx skills add https://github.com/Luohaothu/everything-codex --skill go-test-luohaothu

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Go projects often struggle to adopt test-driven development, leading to delayed feedback, flaky tests, and unclear design. This skill provides a structured approach to write tests first, drive API design with table-driven patterns, and maintain high test coverage.

Core Features & Use Cases

  • Table-driven testing templates: standardized patterns for Go tests that cover multiple inputs and edge cases.
  • RED-GREEN-REFACTOR guidance: a repeatable cycle to implement code with minimal changes while keeping tests green.
  • Coverage targets & quality checks: enforce 80%+ coverage and race condition detection in CI.
  • Use Case: a new Go service starts with failing tests, then incrementally implements minimal code to pass while keeping tests green.

Quick Start

Write a failing table-driven test, then implement the minimal code to pass, and repeat for new cases.

Frequently Asked Questions about go-test

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write table-driven tests in Go?

Table-driven tests in Go use standardized templates to iterate through multiple inputs and edge cases defined in a slice. This Skill provides structured patterns to generate these tests, driving API design and ensuring comprehensive coverage.

What is the RED-GREEN-REFACTOR cycle in Go TDD?

The RED-GREEN-REFACTOR cycle in Go TDD involves writing a failing table-driven test first, implementing minimal code to pass it, and then refactoring. This Skill enforces this repeatable cycle to keep tests green while incrementally adding new cases.

How do I enforce 80% test coverage for Golang projects?

To enforce 80% test coverage in Golang projects, this Skill applies coverage targets and quality checks during CI. It guides writing tests first and detecting race conditions to satisfy code-quality guidance and maintain high coverage.

Can I use this Go TDD approach for projects of any size?

Yes, this Go TDD approach applies to Go projects of all sizes. It provides a structured method to write tests first, drive API design with table-driven patterns, and maintain high test coverage regardless of the project scale.

Why do my Go tests have flaky behavior and delayed feedback?

Flaky behavior and delayed feedback in Go tests often stem from struggling to adopt test-driven development. This Skill solves these problems by providing a structured approach to write tests first and drive API design with table-driven patterns.