check-test-quality-go

Analyze Go test files for quality issues and anti-patterns.

1|Updated Dec 17, 2025
One-click install
npx skills add https://github.com/lepinkainen/skills --skill check-test-quality-go
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: check-test-quality-go
Source: https://github.com/lepinkainen/skills/tree/main/check-test-quality-go
Command: npx skills add https://github.com/lepinkainen/skills --skill check-test-quality-go

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires tree-sitter>=0.23.0, tree-sitter-go>=0.23.0.

What problem does it solve?

Analyze Go test files to identify quality issues, anti-patterns, and code smells in Go tests. This tool helps you quickly detect external dependencies, overly complex tests, flaky patterns, and common anti-patterns to improve test reliability and maintainability.

Core Features & Use Cases

  • External Dependency detection in *_test.go files
  • Complexity and anti-patterns scanning with actionable recommendations
  • Flaky pattern detection including time.Sleep and goroutine synchronization
  • Output structured guidance to refactor tests and improve reliability

Quick Start

Run the skill with your Go project containing tests to get a comprehensive quality report.

Frequently Asked Questions about check-test-quality-go

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

FAQPage Schema
How do I detect flaky patterns and anti-patterns in Go test files?

To detect flaky patterns in Go test files, statically analyze *_test.go code to surface time.Sleep usage, goroutine synchronization issues, and external dependencies. The analysis applies four scripts to collect structured JSON data and synthesizes findings into a prioritized report.

What is the best way to scan Go tests for external dependencies and code complexity?

Scanning Go tests for external dependencies and complexity involves statically parsing *_test.go files to extract code smells. This process identifies anti-patterns and generates structured guidance with actionable suggestions to refactor tests and improve overall reliability.

Does this static analysis require tree-sitter to parse Go test files?

Yes, statically analyzing Go test files requires tree-sitter version 0.23.0 or higher and the tree-sitter-go parser. These dependencies enable the four analysis scripts to extract syntax structures and identify quality issues within the test code.

How do I get a structured report of quality issues across all my Go test files?

To get a structured quality report across Go test files, run the analysis on your project directory. It deduplicates collected JSON data and returns a deterministic structure containing per-issue details like file, line, severity, pattern, and code snippet, plus a summary for quick remediation.

Can I use this to find suggestions for refactoring unreliable Go tests?

Yes, you can use this to find suggestions for refactoring unreliable Go tests. The generated report includes a specific suggestion field for each identified issue, providing actionable recommendations to resolve complexity, flaky patterns, and external dependencies.