From test-coverage
Analyzes Go test code structure without running tests to identify e2e and integration coverage gaps. Generates HTML, JSON, and text reports highlighting untested source code.
How this command is triggered — by the user, by Claude, or both
Slash command
/test-coverage:analyze <path-or-url> [--output <path>] [--priority <level>] [--test-structure-only]The summary Claude sees in its command listing — used to decide when to auto-load this command
## Name test-coverage:analyze ## Synopsis ## Description The `test-coverage:analyze` command analyzes test code structure **without running tests**. This command examines test files and source files to identify: - What e2e/integration tests exist in the codebase - What source code has corresponding tests - What source code lacks tests - Test organization and coverage gaps **Focus on E2E Tests:** By default, this command focuses on e2e (end-to-end) and integration tests, excluding unit tests. This ensures analysis targets higher-level test coverage gaps that validate real-world scenario...
test-coverage:analyze
/test-coverage:analyze <path-or-url> [--output <path>] [--priority <level>] [--test-structure-only]
The test-coverage:analyze command analyzes test code structure without running tests. This command examines test files and source files to identify:
Focus on E2E Tests: By default, this command focuses on e2e (end-to-end) and integration tests, excluding unit tests. This ensures analysis targets higher-level test coverage gaps that validate real-world scenarios and system integration.
Language Support: This command currently supports Go projects only.
This command is the foundation for QE or Dev teams to understand their e2e test coverage baseline and identify areas requiring additional testing.
<source-directory>: Path or URL to source code directory/file to analyze
./pkg/, /home/user/project/test/e2e/networking/infw.gohttps://github.com/owner/repo/blob/main/test/file_test.gohttps://raw.githubusercontent.com/owner/repo/main/test/file_test.gohttps://gitlab.com/owner/repo/-/blob/main/test/file_test.go.work/test-coverage/cache/--output <path>: Output directory for generated reports (default: .work/test-coverage/analyze/)
--priority <level>: Filter results by priority (optional)
all, high, medium, lowall--include-test-utils: Include test utility/helper files in analysis (optional)
--include-unit-tests: Include unit tests in analysis (optional)
--test-pattern <pattern>: Custom test file pattern (optional)
--test-pattern "**/*_test.go,**/test_*.go"--test-structure-only: Analyze only test file structure, skip source file analysis (optional)
/test-coverage:analyze ./test/extended/networking/infw.go --test-structure-onlyThe command uses test structure analysis (backend) to analyze test files and source files without running tests.
Two Analysis Modes:
Full Coverage Analysis (default): Analyzes both test files AND source files to identify coverage gaps
Test Structure Only (--test-structure-only): Analyzes ONLY test files to document their structure
.work/test-coverage/cache/Note: If --test-structure-only is used, only test files are discovered; source file discovery is skipped.
vendor/, node_modules/, __pycache__/, .git/, etc.test/unit/, unit/) unless --include-unit-tests is specified*e2e*_test.go, *integration*_test.gotest/e2e/, test/integration/, e2e/, integration/[Serial], [Disruptive], g.Describe(, g.It(--include-test-utils is specified:
*_util.go, *_utils.go, *_helper.go, helpers.go--exclude patterns if specifiedFor each test file:
func Test*, func Benchmark*handler_test.go → handler.goNote: This step is skipped when --test-structure-only is used.
For each source file:
Note: This step is skipped when --test-structure-only is used.
Note: This step is skipped when --test-structure-only is used.
--priority filter if specifiedIn test-structure-only mode, generates test-focused reports:
test-structure-report.html - Interactive report with test cases, helper functions, resource typestest-structure-analysis.json - Machine-readable test metadatatest-structure-summary.txt - Terminal-friendly test summaryIn full coverage mode, generates coverage gap reports:
HTML Report (test-coverage-report.html):
JSON Report (test-structure-report.json):
Text Summary (test-structure-summary.txt):
Console Output:
Invoke the analyze skill to generate analyzer script at runtime and execute analysis. The skill will:
Terminal Output:
Test Structure Analysis Complete
Summary:
Total Source Files: 45
Files With Tests: 30 (66.7%)
Files Without Tests: 15 (33.3%)
Total Functions: 234
Tested Functions: 189 (80.8%)
Untested Functions: 45 (19.2%)
High Priority Gaps:
1. pkg/config.go - No test file (3 exported functions)
2. pkg/validator.go - No test file (5 exported functions)
3. cmd/server/auth.go - Partially tested (4/8 functions)
Reports Generated:
HTML Report: .work/test-coverage/analyze/test-coverage-report.html
JSON Report: .work/test-coverage/analyze/test-structure-report.json
Text Summary: .work/test-coverage/analyze/test-structure-summary.txt
Recommendations:
- Create test files for 15 untested source files
- Add tests for 45 untested functions
- Focus on high-priority gaps first
Exit Status:
/test-coverage:analyze ./pkg/
Analyzes e2e/integration test file structure for a Go project to identify untested functions and files without running any tests. Unit tests are excluded by default.
/test-coverage:analyze ./pkg/ --priority high
Analyzes Go test structure and shows only high-priority gaps (files without tests, untested public functions).
/test-coverage:analyze ./pkg/ --output reports/test-gaps/
Analyzes test structure and generates reports in custom output directory.
/test-coverage:analyze ./test/extended/networking/infw.go --test-structure-only
Analyzes ONLY the test file structure without looking for source files. Generates documentation showing:
Useful for quickly understanding what a test file covers without analyzing source code.
/test-coverage:analyze ./test/e2e/ --test-structure-only
Analyzes all test files in the e2e directory to document the test suite structure without source file analysis.
/test-coverage:analyze https://github.com/openshift/origin/blob/master/test/extended/networking/infw.go --test-structure-only
Downloads and analyzes a test file directly from GitHub. The command automatically converts the GitHub blob URL to a raw URL and caches the download.
/test-coverage:analyze https://raw.githubusercontent.com/openshift/origin/master/test/extended/networking/infw.go --test-structure-only
Analyzes a test file using the raw GitHub URL directly.
To force re-downloading a cached URL, simply delete the cache and run again:
rm -rf .work/test-coverage/cache/
/test-coverage:analyze https://github.com/user/repo/blob/main/test/file_test.go --test-structure-only
The command uses Python for parsing and report generation. No external packages are required - only standard library modules are used.
The command will automatically check for Python 3.8+ and provide installation instructions if missing.
.work/test-coverage/cache/ for reuserm -rf .work/test-coverage/cache/ to force re-download--include-unit-tests to include unit tests.--test-structure-only to analyze only test files (fast, for documentation), or omit it for full coverage gap analysis/test-coverage:gaps - Identify untested code paths with priority-based analysis22plugins reuse this command
First indexed Jan 1, 2026
Showing the 6 earliest of 22 plugins
npx claudepluginhub weliang1/ai-helpers --plugin test-coverage/test-coverageAnalyzes test coverage gaps in a file or directory, prioritizes untested code by risk, generates targeted tests, and reports coverage improvement.
/test-reviewAnalyzes test coverage and testing practices in the codebase, then generates a prioritized testing improvement plan as a markdown report. Optionally scope to files, recent changes, or a pull request.
/analyze-testsAudits test quality across a repository or specified scope, identifying tautological tests, coverage gaming, and missing corner cases.
/analyze-test-gapsMaps codebase to existing tests, identifies untested critical code like APIs and auth, prioritizes gaps by risk, and suggests test strategies.
/analyze-testsAnalyzes Python test suites for quality, coverage, and improvement opportunities. Also supports coverage, quality-only, and detailed report modes.
/audit-testsAnalyzes test coverage using AST-based static analysis and pytest execution. Reports coverage gaps, untested code, skipped tests, layer stats, and quality metrics.