Skip to content
Skill

Add E2E test

Guides an agent to write end-to-end tests that run the built CLI against real Metabase

Add E2E test is an open-source agent skill for developer tools. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

Scripts
None
Platforms
Claude Code, Codex, Cursor
GitHub stars
20
Last commit
License
AGPL-3.0
Listing updated

Similar skills

About Add E2E test

This skill teaches an agent how to add end-to-end tests for the Metabase CLI. The tests drive the built CLI binary against a live Metabase instance started with docker compose, without mocks, so they exercise real network and I/O behavior that unit tests cannot reach.

The skill sets out a pre-flight reading step through the existing e2e harness, then a runtime contract covering how to invoke the CLI, how to read bootstrap credentials, how to resolve seeded entity ids, how to gate suites on server capabilities, and how to isolate config homes per test. It also specifies strict assertion rules for exit codes, error messages and parsed JSON output.

It expects a TypeScript repository using bun and vitest, with a built CLI and a running Metabase stack. The skill includes a self-check grep list and a verification step that runs the project's check command before a test is reported as done.

When your agent uses it

Add an end-to-end test that drives the built CLI against a real Metabase via docker compose. Use whenever the user asks to "add an e2e test for `<command>`", "wire `<noun> <verb>` into tests/e2e", "cover the new command end-to-end", or anything that creates a file under `tests/e2e/`. Loading this skill is mandatory before generating any `tests/e2e/**/*.e2e.test.ts` file or modifying the e2e harness — the runtime contract is strict and easy to violate.

From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.

What it can access

From a static check of its 1 file (21 KB) on GitHub on 4 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.

Check another skill before you install it.

Install

Copy the skill folder to ~/.claude/skills/add-e2e-test to use it in all your projects:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/metabase/metabase-cli.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/add-e2e-test &&
cp -R "$tmp/.claude/skills/add-e2e-test" ~/.claude/skills/add-e2e-test &&
rm -rf "$tmp"

For one project only, put the folder in .claude/skills/add-e2e-test inside it instead.

Claude Code docs on skills

Copy the skill folder to ~/.agents/skills/add-e2e-test to use it in every repository:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/metabase/metabase-cli.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/add-e2e-test &&
cp -R "$tmp/.claude/skills/add-e2e-test" ~/.agents/skills/add-e2e-test &&
rm -rf "$tmp"

For one repository only, put the folder in .agents/skills/add-e2e-test inside it instead.

Codex docs on skills

Copy the skill folder to ~/.cursor/skills/add-e2e-test to use it in every project:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/metabase/metabase-cli.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/add-e2e-test &&
cp -R "$tmp/.claude/skills/add-e2e-test" ~/.cursor/skills/add-e2e-test &&
rm -rf "$tmp"

For one project only, put the folder in .cursor/skills/add-e2e-test inside it instead.

Cursor docs on skills

Run in a terminal (add --scope workspace to install it for the current workspace only):

gemini skills install https://github.com/metabase/metabase-cli.git --path .claude/skills/add-e2e-test

Or copy the folder to ~/.gemini/skills/add-e2e-test yourself.

Gemini CLI docs on skills

For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/add-e2e-test:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/metabase/metabase-cli.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/add-e2e-test &&
cp -R "$tmp/.claude/skills/add-e2e-test" ~/.copilot/skills/add-e2e-test &&
rm -rf "$tmp"

For one project only, put the folder in .github/skills/add-e2e-test inside it instead.

VS Code docs on skills

Get the folder:

git clone --depth 1 https://github.com/metabase/metabase-cli.git

Then copy metabase-cli/.claude/skills/add-e2e-test into your agent's skills folder as add-e2e-test. Agents that support SKILL.md read one folder per skill.

The SKILL.md format

What it does

Harness-first test layout
Points the agent to existing e2e files and harness modules before it writes anything new.
Strict CLI invocation rules
Requires running the built CLI only through the shared runner with isolated config and no inherited environment.
Server capability gating
Explains how suites skip or branch by Metabase feature so lanes pass or skip instead of failing.
Exact assertion guidance
Specifies exact exit codes, full-object payload checks and envelope-aware error message matching.
Self-check and verification
Provides grep checks for forbidden patterns and a final project check before a test is considered done.

Good for

  • Add an end-to-end test for a new Metabase CLI command
  • Wire a new noun and verb into the e2e test folder
  • Cover a CLI flag change against a real Metabase server
  • Gate an e2e suite so it skips on servers lacking a feature

Add E2E test FAQ

When should Add E2E test be used?

When adding an e2e test for a new command, when a command gains a flag or behavior unit tests cannot cover, or when creating a file under the e2e test folder.

Should every new command get an e2e test?

Every new command needs one, but if the command can be fully covered by colocated unit tests, the skill says not to add an e2e test.

Are mocks allowed in these tests?

No. The skill forbids vi.mock, vi.spyOn, vi.hoisted and vi.fn anywhere under the e2e folder.

What must be running before the e2e suite runs?

The skill's local workflow requires building the CLI, starting the e2e stack and running bootstrap before the test command.

How do I install Add E2E test in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/add-e2e-test to use it in all your projects, or to .claude/skills/add-e2e-test in one project.

Does Add E2E test run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

Which AI agents can use Add E2E test?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

What are the best alternatives to Add E2E test?

The closest alternatives to Add E2E test are Add resource command, E2E testing, E2E testing, E2E testing edho ferdian and Byot E2E validation.

Where this comes from

  • Description: from the skill's own SKILL.md.

More from metabase/metabase-cli

  1. Writes unit and Playwright tests for a Metabase data app with mocked queries and actions

    • Open source
    • 20 GitHub stars
    • Developer tools
  2. Plans fixtures, expectations and coverage for testing a transform's logic on known rows

    • Open source
    • 20 GitHub stars
    • Analytics and data
  3. Guides an agent to add a Metabase API resource across client, CLI and e2e tests

    • Open source
    • 20 GitHub stars
    • Analytics and data
  4. Sweeps a whole repository for architectural drift using parallel read-only review passes

    • Open source
    • 20 GitHub stars
    • Developer tools
  5. Runs a strict end-of-task review that flags architectural drift before work is marked done

    • Open source
    • 20 GitHub stars
    • Developer tools
  6. Gives agents the foundations for operating Metabase from the mb CLI

    • Open source
    • 20 GitHub stars
    • Analytics and data