Skip to content
Skill

Add resource command

Guides an agent to add a Metabase API resource across client, CLI and e2e tests

Add resource command is an open-source agent skill for analytics and data. It is available on Claude Code.

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

Similar skills

About Add resource command

This skill is a contract for building a new Metabase resource end to end in the metabase-cli monorepo. It covers the Zod domain schema in the client package, the resource methods that hold every API path, the presentation view, the list and get commands, and an end-to-end test suite that runs against the built CLI.

The workflow starts with a pre-flight read of an existing resource, then lays out the layers in order so each one feeds types into the next. It also sets rules that a type checker would not catch, such as stripping compact projections, keeping wire envelopes private to the resources layer, and recording feature requirements per method for different Metabase server versions. A self-grep checklist and a run of the repository's check, build and e2e commands close out the work, followed by a review pass.

It expects a TypeScript repository with Bun, Zod, and a local or seeded Metabase instance for the e2e tier. The skill is written for Claude Code and is meant to be loaded whenever a new top-level subcommand backed by an untyped Metabase endpoint is being added.

When your agent uses it

Add a Metabase API resource end-to-end — Zod schema in `packages/client/src/domain/`, methods in `packages/client/src/resources/`, list/get commands in `packages/cli/src/commands/<noun>/`, unit tests where logic warrants them, and a comprehensive e2e suite. Use whenever the user asks to "add a card/dashboard/<noun> command", "wire up `/api/<endpoint>` end-to-end", "add list/get for <noun>", or anything that introduces a new top-level subcommand backed by a previously-untyped Metabase resource. Loading this skill is mandatory before generating any file under `packages/client/src/domain/`, `packages/client/src/resources/`, `packages/cli/src/commands/<noun>/`, or `tests/e2e/<noun>.e2e.test.ts` — the contract is strict and the dependencies between layers are easy to break.

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 (45 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-resource-command 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-resource-command &&
cp -R "$tmp/.claude/skills/add-resource-command" ~/.claude/skills/add-resource-command &&
rm -rf "$tmp"

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

Claude Code docs on skills

Copy the skill folder to ~/.agents/skills/add-resource-command 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-resource-command &&
cp -R "$tmp/.claude/skills/add-resource-command" ~/.agents/skills/add-resource-command &&
rm -rf "$tmp"

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

Codex docs on skills

Copy the skill folder to ~/.cursor/skills/add-resource-command 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-resource-command &&
cp -R "$tmp/.claude/skills/add-resource-command" ~/.cursor/skills/add-resource-command &&
rm -rf "$tmp"

For one project only, put the folder in .cursor/skills/add-resource-command 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-resource-command

Or copy the folder to ~/.gemini/skills/add-resource-command yourself.

Gemini CLI docs on skills

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

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

For one project only, put the folder in .github/skills/add-resource-command 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-resource-command into your agent's skills folder as add-resource-command. Agents that support SKILL.md read one folder per skill.

The SKILL.md format

What it does

Domain schema pattern
Defines how to write a full resource schema and a compact projection using Zod.
Resource method conventions
Describes the naming, parameter order and transport rules for client endpoint methods.
Version feature gating
Explains how methods and response shapes are tied to supported Metabase server generations.
CLI command structure
Shows the list and get command files, view bindings and window helpers to use.
End-to-end test rules
Sets exact assertions for exit codes, error strings and parsed payloads in e2e suites.
Self-grep and close-out checks
Provides grep checks and verification commands to run before declaring the work done.

Good for

  • Add a list and get command for a new Metabase resource like cards or dashboards
  • Wire an existing /api endpoint into the client and expose it as a CLI subcommand
  • Write an e2e test suite for a new resource command
  • Handle a Metabase response shape that differs between server major versions
  • Check a new command for layer violations before opening a pull request

Add resource command FAQ

When does Add resource command trigger?

It is meant to load when the user asks to add a resource or list/get command for a Metabase endpoint, or before generating files under the domain, resources, command and e2e test paths.

What does Add resource command change in the repository?

It describes files to create or update across the client and CLI packages and the e2e tests, including the public barrel, client composition, version requirements and the command help list.

What tools does Add resource command need?

It relies on Bun scripts for check, build and e2e tests, and on a Metabase instance for the e2e tier.

How do I install Add resource command in Claude Code?

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

Does Add resource command 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 resource command?

Claude Code. It reads skills in the SKILL.md format; the install steps on this page show where to put the folder.

What are the best alternatives to Add resource command?

The closest alternatives to Add resource command are Add E2E test, Metabase CLI, Crud, Core and Review.

Where this comes from

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

More from metabase/metabase-cli

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

    • Open source
    • 20 GitHub stars
    • Developer tools
  2. Writes unit and Playwright tests for a Metabase data app with mocked queries and actions

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

    • 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