test-diff-analyzer

Analyze test run differences to identify flaky tests and consistency issues.

18|5|Updated Nov 3, 2025
One-click install
npx skills add https://github.com/mvillmow/ml-odyssey --skill test-diff-analyzer
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-diff-analyzer
Source: https://github.com/mvillmow/ml-odyssey/tree/main/.claude/skills/test-diff-analyzer
Command: npx skills add https://github.com/mvillmow/ml-odyssey --skill test-diff-analyzer

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps identify flaky tests by comparing results across multiple test runs and CI.

Core Features & Use Cases

  • Run and capture tests: Run tests and collect logs for comparison.
  • Compare runs: Diff multiple test outputs to expose instability.
  • Root cause guidance: Provide indicators of when and why tests fail.

Quick Start

Run tests and capture: pixi run mojo test -I . tests/ > /tmp/test_run_1.log Compare two runs: diff -u /tmp/test_run_1.log /tmp/test_run_2.log Identify flaky tests: grep "FAILED" /tmp/test_run_*.log | sort | uniq -c

Frequently Asked Questions about test-diff-analyzer

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

FAQPage Schema
How do I identify flaky tests across multiple test runs?

Flaky tests are identified by comparing test outputs across runs to expose inconsistencies. Capture logs from each run, diff the outputs to find tests that pass sometimes and fail others, then analyze failure patterns to pinpoint which tests fail unpredictably.

Can I use this to diagnose test failures between local and CI environments?

Yes. Compare test logs from local runs against CI logs using diff analysis to expose environment-specific failures. The Skill extracts failure indicators and consistency scores to reveal why tests behave differently across local vs CI setups.

What does a consistency score tell me about test stability?

A consistency score quantifies how often a test produces the same result across multiple runs. Higher scores indicate stable tests; lower scores flag flaky tests that need investigation and remediation.

How do I capture test logs for comparison?

Run your test suite and redirect output to log files using commands like `pixi run mojo test > /tmp/test_run_1.log`. Repeat across multiple runs or environments, then use diff to compare outputs and identify instability.

What's the best way to handle tests that fail inconsistently before code changes?

Before/after code-change reconciliation uses diff analysis to separate pre-existing flaky failures from new ones introduced by your changes. Compare baseline test logs against post-change logs to isolate the actual impact of your code.

Do I need special tools to extract failure patterns from test logs?

No. Standard log analysis with grep and sorting (e.g., `grep "FAILED" /tmp/test_run_*.log | sort | uniq -c`) exposes failure patterns. The Skill automates this analysis to compute consistency metrics and provide remediation guidance.