# Add resource command

> Add resource command is an open-source agent skill for analytics and data. Guides an agent to add a Metabase API resource across client, CLI and e2e tests. It is available on Claude Code.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code
- **Website:** https://github.com/metabase/metabase-cli/tree/main/.claude/skills/add-resource-command
- **Repository:** https://github.com/metabase/metabase-cli
- **GitHub stars:** 20
- **License:** AGPL-3.0
- **Skill name:** add-resource-command
- **Collection:** https://github.com/metabase/metabase-cli
- **Categories:** [analytics and data](https://ai-powered.com/categories/analytics-and-data), [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-03

## About

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.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/metabase/metabase-cli/tree/HEAD/.claude/skills/add-resource-command)
- [License: AGPL-3.0](https://github.com/metabase/metabase-cli/tree/HEAD/.claude/skills/add-resource-command)

## Features

- **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

## Install

### Claude Code

Copy the skill folder to `~/.claude/skills/add-resource-command` to use it in all your projects:

```sh
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.

### Codex

Copy the skill folder to `~/.agents/skills/add-resource-command` to use it in every repository:

```sh
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.

### Cursor

Copy the skill folder to `~/.cursor/skills/add-resource-command` to use it in every project:

```sh
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.

### Gemini CLI

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

```sh
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.

### VS Code

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

```sh
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.

### Other agents

Get the folder:

```sh
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.

## 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.

## Alternatives

- [Add E2E test](https://ai-powered.com/skills/add-e2e-test): Add E2E test is an open-source agent skill for developer tools.
- [Metabase CLI](https://ai-powered.com/skills/metabase-cli): Metabase CLI is an open-source agent skill for analytics and data.
- [Crud](https://ai-powered.com/skills/crud): Crud is an open-source agent skill for developer tools.
- [Core](https://ai-powered.com/skills/core-metabase): Core is an open-source agent skill for analytics and data.
- [Review](https://ai-powered.com/skills/review-metabase): Review is an open-source agent skill for developer tools.
- [Metadata](https://ai-powered.com/skills/metadata): Metadata is an open-source agent skill for analytics and data.
- [Backend patterns](https://ai-powered.com/skills/backend-patterns): Backend patterns is an open-source agent skill for developer tools.
- [Skmtc CLI](https://ai-powered.com/skills/skmtc-cli): Skmtc CLI is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/add-resource-command
