forensic-test-analysis

Analyze git history to compute test brittleness ratios and detect large test files.

3|2|Updated Oct 27, 2025
One-click install
npx skills add https://github.com/AlabamaMike/forensic-skills --skill forensic-test-analysis
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: forensic-test-analysis
Source: https://github.com/AlabamaMike/forensic-skills/tree/main/.claude/skills/forensic-test-analysis
Command: npx skills add https://github.com/AlabamaMike/forensic-skills --skill forensic-test-analysis

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps teams identify brittle tests and maintenance burden by analyzing git history to compare test changes to production changes, enabling data-driven improvements in test health.

Core Features & Use Cases

  • Brittleness measurement: compute a Test Brittleness Ratio (test_changes / production_changes) to identify unstable tests.
  • Large test file detection: flag test files exceeding size thresholds to curb maintenance burden.
  • Test-only commit detection: locate commits that modify only tests, signaling maintenance overhead.
  • Hotspot integration readiness: correlate with hotspots and complexity trends to prioritize refactoring efforts.
  • ROI guidance: estimate annual maintenance costs and potential ROI from test refactoring.

Quick Start

  1. Run forensic-test-analysis on your repository to extract test health metrics.
  2. Review the generated hotspots and maintenance recommendations, then connect with forensic-hotspot-finder for cross-analysis.
  3. Use forensic-refactoring-roi to estimate ROI from targeted test-suite improvements.

Frequently Asked Questions about forensic-test-analysis

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

FAQPage Schema
How do I measure test brittleness using git history?

Large test files are detected by applying size thresholds to test files extracted from your repository. This flags oversized files to help teams curb maintenance burden and identify targets for refactoring.

Can I integrate test analysis with hotspot and complexity tools?

Yes, the analysis provides hotspot integration readiness by correlating test health metrics with hotspots and complexity trends. This integration helps prioritize refactoring efforts across the codebase effectively.

What's the best way to estimate ROI for test refactoring?

Estimate ROI by analyzing test-only commits and maintenance overhead from git history, then calculate potential annual maintenance cost savings. This guides targeted test-suite improvements to maximize return on refactoring efforts.

Does test forensics work for codebases with ongoing refactoring?

Yes, this analysis applies to codebases with sizable test suites, CI pipelines, and ongoing refactoring. It focuses on detecting brittle tests, large test files, and test-only commits to quantify test health accurately.