Works with the AI Agents you already use

    Test Fix

    by Rowin Luximon

    1

    Diagnose, classify, and repair failing Vitest, Jest, or Playwright tests with minimal, safe patches.

    $9

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned

    Test Fix

    Example session with this skill installed

    Fix the failing tests in the current directory and make the suite green.

    • Read your context and instructions
    • Compiled the test fix

    I have analyzed the test suite. The diagnostic run identified 3 failures across the Vitest suite. After re-running the failing files, I classified one as a flake and two as consistent bugs requiring patches.

    Verdict: 3 failures: 1 source bug, 1 wrong test, 1 flaky — patches in patches/, nothing applied yet.

    Test Failure Analysis

    FailureCauseRiskPatch File
    auth.service.spec.ts > login()source bugLowpatches/01.md
    ui.component.spec.ts > render()wrong testMedpatches/02.md
    api.integration.ts > fetch()flakyN/AReported only

    Proposed Patch: patches/01.md

    --- src/services/auth.service.ts
    +++ src/services/auth.service.ts
    @@ -42,1 +42,1 @@
    - if (user.attempts > 5) return false;
    + if (user.attempts >= 5) return false;
    

    Rationale: The auth service allowed 6 attempts due to an off-by-one error, while the specification requires a lockout at the 5th attempt.
    Risk: Low.

    Proposed Patch: patches/02.md

    --- src/components/ui.component.spec.ts
    +++ src/components/ui.component.spec.ts
    @@ -12,1 +12,1 @@
    - expect(label).toBe('Submit');
    + expect(label).toBe('Send');
    

    Rationale: The test expected 'Submit', but the updated design docs and production code correctly use 'Send'.
    Risk: Medium.

    Next steps

    1. Review patches/01.md and approve to fix the auth service logic.
    2. Review patches/02.md to confirm the UI label change matches the new spec.
    3. Investigate the api.integration.ts flake manually as it may indicate a network race condition.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Debug and repair failing test suites without compromising code quality. This skill handles the cycle of identifying failures, isolating flakiness, and generating minimal patches for approval. It eliminates the tedious process of manually re-running tests to verify consistency and prevents the common mistake of weakening assertions just to make a suite green.

    What it does

    • Auto-detection identifies Vitest, Jest, or Playwright runners from package.json automatically.
    • Flake classification re-runs failing tests to distinguish between consistent bugs and intermittent flakes.
    • Root cause analysis evaluates whether a failure stems from a production bug or an outdated test assertion.
    • Minimal patching generates unified diffs for the smallest possible fix required to restore the suite.
    • Safety reporting creates a patch registry with risk assessments and rationales before any code is modified.

    How it works

    1. Diagnose by running the test suite via the provided Node scripts to capture a JSON snapshot of all failures.
    2. Classify by re-executing failing files to separate consistent failures from flaky ones.
    3. Judge each failure by reviewing source code and documentation to determine if the bug is in the code or the test.
    4. Propose fixes by writing unified diffs and risk levels to a local patches/ directory.
    5. Report the verdict and wait for explicit user approval before applying any specific patch.

    Frameworks & tools

    Built for Node 22.6+ environments. Supported runners include Vitest, Jest, and Playwright. The skill uses custom TypeScript scripts for test execution and classification.

    Why this beats prompting it yourself

    Standard prompts often "hallucinate" passes by simply skipping tests or adding arbitrary timeouts. This skill enforces a strict diagnostic workflow that requires proof before changing an assertion and explicitly forbids weakening the test suite.

    Use cases

    • Stabilizing a CI/CD pipeline plagued by intermittent test failures.
    • Resolving regressions after a major dependency update or refactor.
    • Cleaning up a legacy test suite with inherited technical debt.

    Known limitations

    Requires Node 22.6 or higher for optimized script execution. Cannot automatically fix flaky tests; these are reported for manual review to avoid masking race conditions.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scan

    Security scan passed 11 days ago

    Software
    Node.js 22.6+
    A project using Vitest, Jest
    orPlaywright
    vitestjest

    A free manual edition (workflow and rules, no scripts) is public under MIT-0: github.com/WinSoftLabs30/test-fix-skill. This paid edition adds the two tested scripts and their suite.

    Permissions

    Terminal / Shell
    Read Files
    Write Files
    Environment Variables

    File Scopes

    **/*.test.*
    **/*.spec.*
    patches/**

    Shell runs your project's own test commands. Writes are limited to the JSON report path and proposed patches. The scripts make no network calls and send no telemetry; npx may install your own runner if it is not installed yet.

    Listed11 days ago
    Updated9 days ago

    What's inside

    Frequently Asked Questions

    This skill supports Node.js environments (version 22.6+) and is compatible with the Vitest, Jest, and Playwright testing frameworks. It automatically detects your runner by analyzing your package.json file during the diagnostic phase.

    Unlike simple prompts that might delete failing tests to "fix" them, Test Fix follows a strict diagnostic workflow. It classifies failures as consistent or flaky and generates minimal, safe patches that preserve test integrity rather than just making the suite turn green.

    No, the skill never modifies your source code without permission. It generates a unified diff and a risk assessment for each fix in a local directory, requiring your explicit approval before any patches are applied to your codebase.

    Test Fix handles flaky tests by isolating and reporting them rather than attempting a 'blind' fix. This ensures that underlying race conditions or environmental issues are brought to your attention for manual review instead of being masked by arbitrary timeouts.

    You will receive the full suite of custom TypeScript diagnostic scripts, the AI agent workflow for root cause analysis, and a comprehensive guide for integrating the skill into your local development or CI/CD environment.

    New in Testing & Debugging

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Testing & Debugging.