Index of every page on this site: llms.txt
All skills
soderlind avatar

/wp-mutate

@ba09e3b
Run it yourself

Run mutation testing on WordPress plugins and themes to find weak tests — Pest --mutate or Infection for PHP, StrykerJS for JavaScript — then triage surviving mutants into concrete test improvements.

Use this Skill: https://skilld.dev/gh/soderlind/skills/wp-mutate

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencesglossary.md

≈790 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Mutation Testing Glossary

Canonical vocabulary for wp-mutate. Engines disagree on terminology; translate at the report boundary and always print the canonical word.

Engine translation table

Canonical Pest Infection Stryker
Killed tested killed killed
Survived untested escaped survived
Not covered uncovered not covered NoCoverage
Timed out — timed out timeout
Errored — errored runtime error
Suppressed ignored (@pest-mutate-ignore) ignored (@infection-ignore-all) ignored (// Stryker disable)

The trap worth repeating: Pest's untested means "the test ran the line and did not notice the change". It does not mean "no test exists" — that is Pest's uncovered. Reading Pest output with Infection's vocabulary in your head inverts the diagnosis.

Terms

Mutant — one generated change to a single location in source. A mutation operator (or mutator) is the rule that generated it, e.g. ConditionalBoundary, ReturnValue.

Killed — at least one test failed when the mutant was active. The desired outcome. By convention, timeouts and runtime errors count as killed: the suite noticed something.

Survived — the mutant was on a line that tests executed, and the whole suite still passed. This is the actionable signal, and the only reason to run mutation testing. It means the code path is exercised but its behaviour is not asserted.

Not covered — no test executes the line, so the mutant was never even attempted. This is a coverage gap, not a test-quality gap. Fix it by writing a test, not by strengthening an assertion. Reporting these mixed in with survivors sends people to the wrong work.

Equivalent mutant — a mutant that is semantically identical to the original, so no test can ever kill it. Example: mutating $i++ to ++$i where the value is unused. Equivalent mutants put a hard ceiling below 100% on every real codebase. Detecting them is undecidable in general, so they are a human judgement call, recorded as a suppression with a written reason.

Mutation score — killed / all mutants. Not-covered mutants count against you.

Covered-code score — killed / mutants on covered lines only. Infection calls this Covered Code MSI; Pest approximates it with --covered-only; Stryker calls it mutation score based on covered code.

Report both, always. A suite covering 20% of the codebase can post an excellent covered-code score while the mutation score sits in the teens. Either number alone is a half-truth.

MSI — Mutation Score Indicator. Infection's name for the mutation score.

Ratchet — pinning the minimum threshold at the currently measured score so it can only improve. Preferred over an aspirational fixed target, which tends to get disabled.

Change-detector test — a test that asserts whatever the implementation currently does rather than what it should do. It kills mutants and provides no value, breaking on every legitimate refactor. The main hazard when generating tests to raise a mutation score.

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts2mo3 checks · Risk SAFE
  • Gen Agent Trust Hub2mo

    The wp-mutate skill automates mutation testing for WordPress projects by integrating tools like Pest, Infection, and StrykerJS. It uses a helper script to detect environmental configurations by executing the local PHP binary. The skill analyzes repository source files to provide triage for testing gaps. The analysis identified command execution capabilities and potential indirect prompt injection surfaces, but no malicious intent or data exfiltration was found.

  • Socket2mo

    No alerts

  • Snyk2mo

    Risk: LOW · No issues

Signed by skilld at ba09e3b. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub last week.

Activeupdated 3 months ago
version
1.0.0
Other metadata
compatibility
WordPress plugin/theme projects with an existing PHP test suite (Pest 3+ or PHPUnit) and/or JS tests (Vitest or Jest). Requires Xdebug 3+ with coverage mode or PCOV for PHP.

README badge

README badge for soderlind/skills/wp-mutate