Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+21 more

    Test-Theatre Gate: Mutation & Fuzz Check

    1

    Tests can run the code without checking what it returns.

    $15

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    Test-Theatre Gate: Mutation & Fuzz Check

    Test-Theatre Gate: Mutation & Fuzz Check

    Example session with this skill installed

    The coding agent added discounts and a checkout guard to discount.mjs and says all tests pass. Before I merge, check whether those tests actually protect the logic, and whether canCheckout survives bad input.

    • Read your context and instructions
    • Compiled the test-theatre gate

    Baseline: npm test passes. I ran test-theatre-gate on discount.mjs.

    $ node scripts/witness.js mutate discount.mjs
    mutation gate: discount.mjs …

    {
      "total": 6,
      "capped": false,
      "killed": 3,
      "survived": [
        { "line": 3, "mutation": "> → >=",
          "snippet": "if (total > 50) return total - 5;" },
        { "line": 2, "mutation": "&& → ||",
          "snippet": "if (total >= 100 && isMember) return total * 0.9;" },
        { "line": 8, "mutation": "return true → return false",
          "snippet": "return true;" }
      ],
      "ignored": [],
      "rejectedExemptions": [],
      "score": 0.5,
      "clean": false
    }
    

    ✗ 3 mutant(s) SURVIVED — those lines are test-theatre.

    $ node scripts/witness.js fuzz discount.mjs canCheckout
    { "throwsOn": [
    { "input": "null", "error": "Cannot read properties of null (reading 'items')" },
    { "input": "undefined", "error": "Cannot read properties of undefined (reading 'items')" },
    { "input": "empty object", "error": "Cannot read properties of undefined (reading 'length')" },
    … 17 more inputs, same pattern …

      ],
      "neverThrows": false }
    

    discount.mjs was restored unchanged after the run.

    What this means

    1. No test checks the $50 boundary: a test for discount(50, false) === 50 would kill line 3.
    2. No test gives a big order to a non-member, so && vs || goes unnoticed: add discount(200, false) === 195.
    3. The only "checkout works" test asserts the result isn't undefined, so returning false passes too: assert canCheckout({ items: [1] }) === true.
    4. canCheckout throws on null and on objects without items. Add a guard if it can get bad input.
      I'd add these four tests before merging.

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

    About this skill

    ## Agent Trust: are the agent's tests actually testing anything? When an agent writes both the code and the tests, a passing suite proves less than it seems. Tests can run the code without checking what it returns. Mutation testing shows this: change the code on purpose, and if the tests still pass, they weren't guarding that line. ### What it does **mutate**: for one source file, it: 1. Times a baseline run of your test command (default `npm test`) 2. Applies one mutation at a time: `>=`↔`>`, `<=`↔`<`, `===`↔`!==`, `==`→`!=`, `&&`↔`||`, `return true`↔`return false`, `+ 1`↔`- 1` (code only, not comments) 3. Reruns your tests for each mutant: a failing test "kills" the mutant; a passing suite means it **survived** 4. Restores the original file, and self-heals from an atomic backup if a previous run was killed **fuzz**: calls an exported function with hostile inputs (null, undefined, NaN, Infinity, empty and huge strings and arrays, circular objects, toxic getters and more) and reports every input that throws. Reviewed exceptions can be recorded in `witness.baseline.json` with a written reason (20+ characters); short reasons are rejected. ### When an agent should use it - An agent wrote code and tests and you want to know if the tests mean anything - Before merging a PR whose tests all pass - Hardening a function that must never throw on bad input ### What it outputs JSON + a one-line summary: total mutants, killed, survived (line, mutation, snippet), ignored (baselined), rejected exemptions, score and a clean flag. Fuzz returns the inputs that threw and a `neverThrows` flag. Exit 0 = clean; non-zero = survivors or throwing inputs. The skill tells the agent to propose a test that kills each survivor. ### Limitations - Built for JavaScript/TypeScript projects (fuzz needs an ES module). Mutation is text-based and only touches spaced operators, so it is not a full mutation framework. - Mutates one file per run and reruns your whole test command for each mutant, so slow suites take time. `--cap` limits the number of mutants and `--timeout` bounds each run. - Some survivors are genuine "equivalent mutants" that no test could catch. Record those in the baseline with a reason rather than forcing a test. ### Open source, packaged skill Original work by Simon Gant. The core logic is public under the MIT licence (witness). This listing is the packaged, tested agent skill: SKILL.md workflow, CLI and docs. Requires Node.js 18+, zero dependencies, no network, no API keys.

    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

    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 today

    Requires

    Node.js 18+
    Project test runner
    Node.js

    Permissions

    Runs local Node.js scripts (`node scripts/witness.js` and `node scripts/runner.js`) through the agent's shell. Spawns the project's test command (default npm test) and temporarily edits the target source file, always restoring it, including from an atomic backup if a previous run was killed. No network access, no environment variables read.

    Listedtoday

    What's inside

    Frequently Asked Questions

    It edits the target file one mutation at a time and always restores it, including after errors. If a run is hard-killed, the next run restores the file from the atomic backup. Commit or stash first anyway, as you would before any tool that edits files.

    About one full test run per mutant. On the small example above it took under two seconds; large suites take longer. Use `--cap` and `--timeout` to bound it.

    It is built and tested for JS/TS projects. The fuzz command needs an ES module.

    A deliberate bug your tests didn't notice. Each one points to a line that needs a sharper assertion.

    The core logic is MIT open source (witness). You are paying for the packaged, tested agent skill and workflow.

    New in LLM Ops