go-test-analysis

Analyze Go module test coverage and suggest missing test cases.

Updated Jul 29, 2025
One-click install
npx skills add https://github.com/dieguscl/dotfiles --skill go-test-analysis
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: go-test-analysis
Source: https://github.com/dieguscl/dotfiles/tree/main/claude/skills/go-test-analysis
Command: npx skills add https://github.com/dieguscl/dotfiles --skill go-test-analysis

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps developers identify and address gaps in their Go test coverage, ensuring critical parts of their codebase are adequately tested.

Core Features & Use Cases

  • Module Discovery: Automatically finds all Go modules within a project.
  • Coverage Analysis: Compares source code with test files to pinpoint missing tests for functions, methods, and types.
  • Priority Ranking: Ranks uncovered code by criticality (e.g., public APIs, business logic).
  • Test Suggestions: Provides outlines for concrete test cases, including edge cases and table-driven structures.
  • Use Case: A developer can use this skill to quickly understand which parts of a new Go package lack sufficient test coverage before merging a pull request.

Quick Start

Analyze the test coverage for the Go module located at '/path/to/your/go/module'.

Frequently Asked Questions about go-test-analysis

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

FAQPage Schema
How do I find missing tests in my Go modules?

Go test coverage gap analysis compares your source code with test files to pinpoint missing tests. It automatically discovers Go modules and catalogs exported functions to identify which parts of your codebase lack adequate test coverage.

How do I prioritize untested Go code by criticality?

To prioritize untested Go code by criticality, you analyze test coverage gaps and rank uncovered functions by importance. This ensures public APIs and business logic receive higher priority for testing than less critical code paths.

Can I generate table-driven test case outlines for uncovered Go functions?

Yes, you can generate table-driven test case outlines for uncovered Go functions. By performing coverage gap analysis, the system provides concrete test case suggestions, including edge cases and table-driven structures for exported functions.

Does this coverage gap analysis work with multiple Go packages in a project?

Yes, coverage gap analysis works with multiple Go packages in a project. Module discovery automatically finds all Go modules within a project, catalogs source files and exported functions, and performs coverage gap analysis across the discovered packages.

What is the best way to check Go test coverage before a pull request?

The best way to check Go test coverage before a pull request is to analyze coverage gaps across your modules. This identifies missing tests for functions and methods, prioritizing uncovered code by criticality to ensure critical business logic is tested before merging.