Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+21 more

    Test Gap Filler: Find Untested Code & Write Real Tests

    3

    Asking an agent to "write tests" usually gets you shallow happy-path tests, a new framework you did not want, or tests quietly rewritten until they pass.

    Free

    19 uses5.0 (2 reviews)
    Test Gap Filler: Find Untested Code & Write Real Tests

    Test Gap Filler: Find Untested Code & Write Real Tests

    Example session with this skill installed

    Write unit tests for src/orders/ — coverage there is low. Follow our existing test style.

    • Read your context and instructions
    • Compiled the test gap filler

    Summary

    Detected

    Vitest with colocated *.test.ts files, factories in test/factories and msw for HTTP mocks. Coverage for src/orders/ was

    61%; I found 11 untested cases across 3 functions, wrote 14 tests and ran them.

    Gap list (approved plan)

    FunctionMissing cases
    parseOrderempty payload, invalid date, negative quantity
    calcShippingzero weight, max weight boundary, international zone
    syncInventoryAPI timeout, partial failure, retry after 429

    Example test

    it.each([
      [{ qty: -1 }, "quantity must be positive"],
      [{ date: "2026-13-01" }, "invalid date"],
    ])("parseOrder rejects %o", (input, msg) => {
      expect(() => parseOrder(orderFactory(input))).toThrow(msg)
    })
    

    Results

    ✓ src/orders/parse.test.ts (6)
    ✓ src/orders/shipping.test.ts (5)
    ✗ src/orders/inventory.test.ts (3) — 1 expected fail
    Coverage src/orders: 61% → 84%
    

    Mutation check: flipping the weight limit in calcShipping makes 2 new tests fail ✅

    🐞 Probable bug found

    syncInventory sets stock to 0 for

    all items when 1 of N API calls fails (src/orders/inventory.ts:57). Test marked it.fails with a comment; source not modified.

    Run: npx vitest run src/orders
    Next step: want me to fix the inventory bug and flip the test to passing?

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

    About this skill

    Asking an agent to "write tests" usually gets you shallow happy-path tests, a new framework you did not want, or tests quietly rewritten until they pass. This skill does it properly: find the real gaps, test them in your style, prove the tests work.

    What it does

    • Detects your setup: Jest, Vitest, pytest, go test, cargo and more, plus test location, naming, fixtures/factories, mocking style and assertion library, copied from your existing tests. Never introduces a new framework.
    • Finds the gaps: uses your coverage tooling when available (uncovered lines), otherwise enumerates every branch, error path, boundary (empty, null, zero, max, unicode) and async failure.
    • Shows the plan first: a short gap list (function → missing cases) before writing anything.
    • Writes meaningful tests: one behavior per test, descriptive names, Arrange/Act/Assert, table-driven cases, mocks only at boundaries (network, clock, filesystem, randomness), fully deterministic.
    • Runs until green, honestly: if a test fails because the code is wrong, it does not silently change your source. It marks the test expected-fail and reports a probable bug.
    • Mutation sanity check: temporarily breaks the code for key tests to prove they actually fail, then reverts.

    Output

    Tests added per file, coverage before → after, cases per function, probable bugs found and the exact command to run them.

    Best for

    • Raising coverage on legacy modules
    • Testing a feature branch before review
    • Finding hidden bugs in edge cases

    • Focused on unit tests; end-to-end and UI tests are out of scope.
    • Coverage numbers require coverage tooling already configured (e.g. c8/istanbul, pytest-cov); otherwise gaps are found by reading the code.
    • Code with heavy hidden global state may need small refactors to be testable; it will suggest them rather than apply them.

    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 any payment.

    Reviews

    5.0
    2 reviews
    5
    2
    4
    0
    3
    0
    2
    0
    1
    0

    This skill has been used 19 times.

    Trust & safety

    Security scan

    Security scan passed 11 days ago

    • Free with an Agensi account

    Requires

    Project test framework
    Project runtime
    vitest
    Node.js
    jest
    Git

    Permissions

    Terminal / Shell
    Read Files
    Write Files

    Read Files: reads source, existing tests and test config. Terminal: runs your test suite and coverage tooling. Write Files: creates or edits test files only; source code is never modified unless you ask. No network calls or external services.

    Listed11 days ago
    Updated5 days ago

    What's inside

    Frequently Asked Questions

    No. It detects and reuses your existing framework, folder layout, naming, fixtures and mocking style. If no framework is configured, it asks before adding one.

    Never silently. If a test fails because the code is wrong, it marks the test as expected-fail and reports it as a probable bug so you decide.

    JavaScript/TypeScript (Jest, Vitest, Mocha), Python (pytest, unittest), Go, Rust, Java (JUnit) and others your agent can run.

    Yes. By default it scopes to the files changed on your branch versus the default branch, or to any file or folder you name.

    It runs a mutation check: it briefly breaks the code for key tests and confirms they fail, then reverts. Tests that cannot fail are not kept.

    No, but it uses it when available to report before/after coverage. Without it, gaps are found by enumerating branches and edge cases.

    New in Testing & Debugging