Skip to main content
command

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.

Install into Claude Code · claude-code-templates All methods and platforms ↓
npx claude-code-templates@latest --command testing/test-quality-analyzer
Open on GitHub

What 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-analyzer

2Manually: put the files in place

.claude/commands/test-quality-analyzer.md

Call it with /test-quality-analyzer. For all projects use ~/.claude/commands/

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

Similar slash commands

All slash commands for Testing and QA →

From the same set495

The whole set →
code-review-checklist A skill that walks a reviewer through context, functionality, quality, security, performance and tests. Useful on pull requests and audits. 365installs vercel-edge-function Generate a TypeScript starter for a Vercel Edge Function, with request handlers and examples for geolocation or JWT checks. Use it when adding an edge API route to a Next.js project. 364installs vercel-environment-sync A hook that inspects environment variables after an .env edit and points you to the right Vercel sync commands. Useful when local and deployed values drift apart. 363installs prepare-release Automates software release preparation by validating git status, bumping semantic versions, running test suites, and generating changelogs. 363installs update-dependencies This command checks for outdated packages and security issues, then guides dependency updates by strategy. Use it for routine upgrades or a security-focused pass. 356installs developer-growth-analysis Reads your recent Claude chat history, spots skill gaps in your work, and sends a growth report to your Slack DMs. 355installs log Writes a finished task's report into your tracker or notes: time spent, status, commits. Useful when the coding happens in Claude but the record lives in Linear or Obsidian. 351installs create-worktrees Pulls every open pull request through GitHub CLI and sets up a separate git worktree for each branch under ./tree/. Useful when you want several PRs checked out at once without switching branches in the main checkout. 351installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor