test-generator

Generate go test-ready *_test.go files for Go functions.

Updated Oct 23, 2025
One-click install
npx skills add https://github.com/kis9a/claude-skills-demo --skill test-generator-kis9a
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-generator
Source: https://github.com/kis9a/claude-skills-demo/tree/main/.claude/skills/test-generator
Command: npx skills add https://github.com/kis9a/claude-skills-demo --skill test-generator-kis9a

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill automates the generation of comprehensive test cases for existing functions, dramatically reducing manual testing effort and increasing test coverage.

Core Features & Use Cases

  • Automatic test generation for identified functions (normal, edge, and failure scenarios)
  • Go-compatible output placed in *_test.go files ready to go with go test
  • Coverage improvement reporting: shows how much coverage increases after adding tests
  • Usage scenario: When you have a package with limited tests or none, run this Skill to produce a complete test suite for critical paths.

Quick Start

Run the test-generator on your Go project to generate *_test.go files, then run go test -v -cover to verify improvement.

Frequently Asked Questions about test-generator

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

FAQPage Schema
How do I increase test coverage for my Go functions?

Test coverage measures how much of your code is executed by tests. Increase it by writing tests for untested functions and edge cases. This Skill auto-generates comprehensive test cases—normal, boundary, and error scenarios—for Go functions, then validates coverage gains using go test -cover.

Can I automatically generate Go tests for existing functions?

Yes. This Skill analyzes your existing *_test.go files and identifies coverage gaps, then generates test cases following Go's table-driven testing conventions. Output is ready to run with go test -v -cover, requiring no manual rewrites.

What's the best way to add tests to a Go package with limited coverage?

Run this Skill on your Go project to automatically produce *_test.go files targeting uncovered functions. It generates tests across normal, boundary, and error paths, then reports coverage improvement after validation with go test -cover.

Does this work with existing test files in my Go codebase?

Yes. The Skill targets codebases with existing tests, analyzing *_test.go files to identify which functions lack coverage. It generates additional test cases and integrates them into your test suite without overwriting existing work.

What output format does the test generator produce?

It produces Go-compatible *_test.go code using table-driven testing conventions with clear, specific error messages. Output is immediately executable—run go test to validate and see coverage improvements alongside existing tests.