mutation-testing

6
1
Source

Run mutation testing on a Clojure namespace, generate tests to kill surviving mutations, and open draft PRs with Linear issue tracking.

Install

mkdir -p .claude/skills/mutation-testing && curl -L -o skill.zip "https://mcp.directory/api/skills/download/2604" && unzip -o skill.zip -d .claude/skills/mutation-testing && rm skill.zip

Installs to .claude/skills/mutation-testing

About this skill

Mutation Testing Skill

This skill runs mutation testing end-to-end: generates a coverage report, groups functions, shells out to claude -p to write tests, verifies mutations are killed, and creates draft PRs with Linear issues.

Prerequisites

  • A running nREPL connected to the Metabase dev environment
  • LINEAR_API_KEY environment variable set with a valid Linear personal API key
  • gh CLI authenticated with GitHub
  • claude CLI available on PATH

Reference Files

  • dev/src/dev/coverage.clj — mutation testing engine (generates reports, runs mutations)
  • dev/src/dev/mutation_testing.clj — orchestration, Linear API, PR helpers

Invocation

The argument is a Clojure namespace, optionally followed by a base branch:

/mutation-testing metabase.lib.order-by
/mutation-testing metabase.lib.order-by --base-branch release-x.52.x
/mutation-testing metabase.lib.order-by --project-id abc-123
/mutation-testing metabase.lib.order-by --base-branch release-x.52.x --project-id abc-123
  • --base-branch: defaults to the value in config (set via set-config!), or "master" if not configured.
  • --project-id: if provided, issues are added to this existing Linear project instead of creating a new one.

Steps

1. Parse arguments

Parse $ARGUMENTS to extract:

  • namespace (required) — the first positional argument
  • --base-branch (optional) — if present, the next argument is the base branch name
  • --project-id (optional) — if present, the next argument is an existing Linear project ID

2. Load and configure

(require '[dev.mutation-testing :as mut-test] :reload)
(require '[dev.coverage :as cov] :reload)

If this is the first invocation (or the REPL was restarted), set up the Linear team:

(mut-test/list-teams!)
(mut-test/set-config! {:team-id "<id>"})

3. Run

(mut-test/run! '<target-ns>)
;; Or with options:
(mut-test/run! '<target-ns> {:base-branch "release-x.52.x"})
(mut-test/run! '<target-ns> {:project-id "abc-123"})
(mut-test/run! '<target-ns> {:base-branch "release-x.52.x" :project-id "abc-123"})

Pass the opts map with :base-branch and/or :project-id if those flags were provided in the arguments.

This will:

  1. Generate a baseline mutation testing report
  2. Create a Linear project for the namespace
  3. Group functions by coverage relationships
  4. For each group: create branch → invoke Claude to write tests → verify → retry if needed → commit & push → create Linear issue → create draft PR
  5. Print a summary with PR links

4. Handle failures

If a group fails mid-processing, run! catches the error and continues to the next group. To retry a single group manually:

;; Get the parsed namespace info
(def parsed (mut-test/parse-namespace '<target-ns>))

;; Run coverage to get the data
(def coverage-results (cov/test-namespace (:target-ns parsed) [(:test-ns parsed)]))

;; Group and find the one you want
(def groups (mut-test/group-functions coverage-results))

;; Process just that group
(mut-test/process-group! parsed (nth groups <index>))

5. Verify the prompt (dry run)

To inspect what Claude will see without invoking it:

(def parsed (mut-test/parse-namespace '<target-ns>))
(def coverage-results (cov/test-namespace (:target-ns parsed) [(:test-ns parsed)]))
(def groups (mut-test/group-functions coverage-results))
(println (mut-test/build-test-prompt
           (merge (select-keys parsed [:target-ns :test-ns :source-path :test-path])
                  (select-keys (first groups) [:fn-names :mutations]))))

Configuration

  • Team ID: Set once per REPL session via (mut-test/list-teams!) and (mut-test/set-config! {:team-id "..."})
  • Project ID: Set automatically when run! calls create-project-for-namespace!
  • Base Branch: Defaults to "master". Override via (mut-test/set-config! {:base-branch "release-x.52.x"}) or pass {:base-branch "..."} as the second arg to run!
  • Project ID: If set (via set-config! or run! opts), run! reuses the existing Linear project instead of creating a new one

You might also like

flutter-development

aj-geddes

Build beautiful cross-platform mobile apps with Flutter and Dart. Covers widgets, state management with Provider/BLoC, navigation, API integration, and material design.

297790

drawio-diagrams-enhanced

jgtolentino

Create professional draw.io (diagrams.net) diagrams in XML format (.drawio files) with integrated PMP/PMBOK methodologies, extensive visual asset libraries, and industry-standard professional templates. Use this skill when users ask to create flowcharts, swimlane diagrams, cross-functional flowcharts, org charts, network diagrams, UML diagrams, BPMN, project management diagrams (WBS, Gantt, PERT, RACI), risk matrices, stakeholder maps, or any other visual diagram in draw.io format. This skill includes access to custom shape libraries for icons, clipart, and professional symbols.

220415

godot

bfollington

This skill should be used when working on Godot Engine projects. It provides specialized knowledge of Godot's file formats (.gd, .tscn, .tres), architecture patterns (component-based, signal-driven, resource-based), common pitfalls, validation tools, code templates, and CLI workflows. The `godot` command is available for running the game, validating scripts, importing resources, and exporting builds. Use this skill for tasks involving Godot game development, debugging scene/resource files, implementing game systems, or creating new Godot components.

215297

nano-banana-pro

garg-aayush

Generate and edit images using Google's Nano Banana Pro (Gemini 3 Pro Image) API. Use when the user asks to generate, create, edit, modify, change, alter, or update images. Also use when user references an existing image file and asks to modify it in any way (e.g., "modify this image", "change the background", "replace X with Y"). Supports both text-to-image generation and image-to-image editing with configurable resolution (1K default, 2K, or 4K for high resolution). DO NOT read the image file first - use this skill directly with the --input-image parameter.

224234

ui-ux-pro-max

nextlevelbuilder

"UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient."

175201

rust-coding-skill

UtakataKyosui

Guides Claude in writing idiomatic, efficient, well-structured Rust code using proper data modeling, traits, impl organization, macros, and build-speed best practices.

167173

Stay ahead of the MCP ecosystem

Get weekly updates on new skills and servers.