test-quality-analyzer — Claude Code command for test analysis
Review test coverage, assertion quality, maintainability, and performance with one command. Use it to find gaps and decide what to improve in a test suite.
npx claude-code-templates@latest --command testing/test-quality-analyzerWhat test-quality-analyzer does
Choose a focus for the analysis: coverage quality, test effectiveness, maintainability, or performance. The command also looks for flaky tests and other testing anti-patterns, then produces metrics and improvement recommendations.
Its instructions include shell checks that look for a directory named coverage and count files matching *.test.* or *.spec.*. Coverage data stored elsewhere may not be included in that context. The command uses Read, Write, Edit, and Bash.
Pass --coverage-quality, --test-effectiveness, --maintainability, or --performance-analysis to select a focus. The output can include quality tracking suggestions alongside findings and ways to improve the test suite.
What it helps with
- find gaps in test coverage
- assess assertion quality and defect detection
- spot flaky tests and testing anti-patterns
- identify slow test execution
- get recommendations for maintaining test code
Example prompts for the agent
- Review test coverage quality:
/test-quality-analyzer --coverage-quality. - Assess how effective and reliable the tests are:
/test-quality-analyzer --test-effectiveness. - Look for maintainability issues:
/test-quality-analyzer --maintainability.
How to install test-quality-analyzer
1claude-code-templates
npx claude-code-templates@latest --command testing/test-quality-analyzer2Manually: put the files in place
.claude/commands/test-quality-analyzer.mdCall it with /test-quality-analyzer. For all projects use ~/.claude/commands/
Manually: put the files in place
~/.codex/prompts/test-quality-analyzer.mdCall it with /prompts:test-quality-analyzer. Codex marks this format deprecated in favour of skills
Manually: put the files in place
.github/prompts/test-quality-analyzer.prompt.mdManually: put the files in place
.gemini/commands/test-quality-analyzer.tomlGemini stores commands as TOML: the prompt text goes into the prompt field
Questions about test-quality-analyzer
How do I install test-quality-analyzer in Claude Code?
Run npx claude-code-templates@latest --command testing/test-quality-analyzer. The command file is .claude/commands/test-quality-analyzer.md.
What does test-quality-analyzer do?
It reviews a test suite for coverage quality, effectiveness, maintainability, or performance. It can also flag flaky tests and other testing anti-patterns.
Which analysis options can I use?
Choose --coverage-quality, --test-effectiveness, --maintainability, or --performance-analysis to focus the review.
Source text
test-quality-analyzer.md · MIT
--- allowed-tools: Read, Write, Edit, Bash argument-hint: "[analysis-type] | --coverage-quality | --test-effectiveness | --maintainability | --performance-analysis" description: Analyze test suite quality with comprehensive metrics and improvement recommendations --- # Test Quality Analyzer Analyze test suite quality with comprehensive metrics and actionable improvement insights: **$ARGUMENTS** ## Current Quality Context - Test coverage: !`find . -name "coverage" -type d | head -1 && echo "Coverage data available" || echo "No coverage data"` - Test files: !`find . -name "*.test.*" -o -name "*.spec.*" | wc -l` test files - Test complexity: Analysis of test suite maintainability and effectiveness patterns - Performance metrics: Current test execution times and resource utilization ## Task Execute comprehensive test quality analysis with improvement recommendations and optimization strategies: **Analysis Type**: Use $ARGUMENTS to focus on coverage quality, test effectiveness, maintainability analysis, or performance analysis **Test Quality Analysis Framework**: 1. **Coverage Quality Assessment** - Analyze coverage depth, evaluate coverage quality, assess edge case handling, identify coverage gaps 2. **Test Effectiveness Evaluation** - Measure defect detection capability, analyze test reliability, assess assertion quality, evaluate test value 3. **Maintainability Analysis** - Evaluate test code quality, analyze test organization, assess refactoring needs, optimize test structure 4. **Performance Assessment** - Analyze execution performance, identify bottlenecks, optimize test speed, reduce resource consumption 5. **Anti-Pattern Detection** - Identify testing anti-patterns, detect flaky tests, analyze test smells, recommend corrections 6. **Quality Metrics Tracking** - Implement quality scoring, track improvement trends, configure quality gates, optimize quality processes **Advanced Features**: AI-powered quality assessment, predictive quality modeling, automated improvement suggestions, quality trend analysis, benchmark comparison. **Quality Insights**: Test ROI analysis, quality correlation analysis, maintenance cost assessment, effectiveness benchmarking. **Output**: Comprehensive quality analysis with detailed metrics, improvement recommendations, optimization strategies, and quality tracking framework.
© davila7 · MIT · davila7/claude-code-templates