with one click
mutation-testing
Run mutation testing on a Clojure namespace, generate tests to kill surviving mutations, and open draft PRs with Linear issue tracking.
Menu
Run mutation testing on a Clojure namespace, generate tests to kill surviving mutations, and open draft PRs with Linear issue tracking.
| name | mutation-testing |
| description | Run mutation testing on a Clojure namespace, generate tests to kill surviving mutations, and open draft PRs with Linear issue tracking. |
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.
LINEAR_API_KEY environment variable set with a valid Linear personal API keygh CLI authenticated with GitHubclaude CLI available on PATHdev/src/dev/coverage.clj — mutation testing engine (generates reports, runs mutations)dev/src/dev/mutation_testing.clj — orchestration, Linear API, PR helpersThe 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.Parse $ARGUMENTS to extract:
--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(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>"})
(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:
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>))
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]))))
(mut-test/list-teams!) and (mut-test/set-config! {:team-id "..."})run! calls create-project-for-namespace!"master". Override via (mut-test/set-config! {:base-branch "release-x.52.x"}) or pass {:base-branch "..."} as the second arg to run!set-config! or run! opts), run! reuses the existing Linear project instead of creating a new oneMigrate Emotion styled-components to Mantine components with style props and CSS modules. Use when converting .styled.tsx files or removing @emotion imports from components.
Update or build a Metabase design-system component (frontend/src/metabase/ui — Chip, Badge, Alert, Switch, etc.) to match a Figma spec described in a Linear issue. Use when a ticket asks to restyle an existing `metabase/ui` component or implement a new one from Figma. Covers: checking out the issue, mapping the component (usage/blast radius for an existing one, or scaffolding a new one), building a Storybook showcase matrix (before styling for existing components, after for new ones), styling from exact Figma tokens while iterating with the user, and committing + migrating call sites LAST.
Review TypeScript and JavaScript code changes for compliance with Metabase coding standards, style violations, and code quality issues. Use when reviewing pull requests or diffs containing TypeScript/JavaScript code.
Write TypeScript and JavaScript code following Metabase coding standards and best practices. Use when developing or refactoring TypeScript/JavaScript code.
Guide Clojure and ClojureScript development using REPL-driven workflow, coding conventions, and best practices. Use when writing, developing, or refactoring Clojure/ClojureScript code.
Export content from a running Metabase instance, validate with checkers, edit YAML, and import back. Use when the user wants to export, import, or run the full serdes round-trip workflow.