write-test

Generate minimal failing tests for reproduced Metabase bugs.

10|Updated Mar 2, 2026
One-click install
npx skills add https://github.com/metabase/repro-bot --skill write-test-metabase
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: write-test
Source: https://github.com/metabase/repro-bot/tree/main/.claude/skills/write-test
Command: npx skills add https://github.com/metabase/repro-bot --skill write-test-metabase

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill automates writing minimal failing tests for bugs that have been reproduced in a repro worktree, enabling fast isolation of regressions and producing reproducible evidence for triage and patching.

Core Features & Use Cases

  • Test type detection: Determines whether a Clojure unit test, Jest/component test, or Cypress end-to-end test is appropriate based on the root cause.
  • Patterned test generation: Locates relevant source and test files, follows existing repository test patterns, and writes minimal failing assertions that reproduce the bug.
  • Execution and artifact saving: Runs the test via the MCP run_test tool, records whether the test fails as expected, and saves a test-diff.patch for review and submission.

Quick Start

Use the write-test skill to create and run a minimal failing test for a reproduced Metabase bug in repro/<ISSUE-ID>.

Frequently Asked Questions about write-test

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate failing tests for reproduced Metabase bugs?

You can generate failing tests for reproduced Metabase bugs by locating relevant source files and writing minimal failing assertions that follow existing repository patterns, which are then executed via the MCP run_test tool and saved as a patch file.

What is the best way to write minimal failing tests for Clojure, Jest, and Cypress?

Writing minimal failing tests for Clojure, Jest, and Cypress involves detecting the appropriate test type based on the root cause, locating existing test patterns, and generating targeted assertions that isolate the regression in a repro worktree.

Can I use the MCP run_test tool to run Cypress and Jest component tests?

Yes, the MCP run_test tool executes Cypress end-to-end scenarios and Jest component tests, recording whether the generated assertions fail as expected to demonstrate and isolate regressions within the reproduced bug worktree.

Does this skill detect whether a Clojure unit test or frontend test is needed?

The skill detects the appropriate test type by analyzing the root cause of the reproduced bug, determining whether a backend Clojure unit test, a frontend Jest component test, or a Cypress end-to-end scenario is required for isolation.

How do I save a test-diff patch file for a reproduced bug regression?

To save a test-diff patch file for a reproduced bug regression, the skill executes the generated failing test via the MCP run_test tool, verifies the failure, and automatically saves the patch file for review and submission.

Why do I need a repro worktree to isolate Metabase regressions?

A repro worktree is needed to isolate Metabase regressions because it provides the controlled environment required to reproduce the bug, locate relevant source files, and write minimal failing assertions that accurately demonstrate the regression.