# Data action

> Data action is an open-source agent skill for databases. Lets your agent create and run Metabase data actions that insert, update or delete rows. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/metabase/metabase-cli/tree/main/packages/cli/skill-data/data-action
- **Repository:** https://github.com/metabase/metabase-cli
- **GitHub stars:** 20
- **License:** AGPL-3.0
- **Skill name:** data-action
- **Collection:** https://github.com/metabase/metabase-cli
- **Categories:** [databases](https://ai-powered.com/categories/databases)
- **Listing updated:** 2026-12-03

## About

This skill walks the agent through building Metabase data actions with the mb CLI. A table action writes one row of a table by its primary key, with parameters derived from the table's columns, while a query action runs a parameterized native SQL INSERT, UPDATE or DELETE with explicitly declared template tags and parameters.

The workflow covers checking that a database supports actions and has the data actions setting enabled, choosing the right type, filing the action in a data actions collection, and executing it with values. It also documents the rules for required and optional inputs, partial updates through optional clauses, and the answers each action type returns.

The agent needs the mb CLI with access to a Metabase instance, and an admin must enable data actions on the target database. Lifecycle commands for listing, inspecting, moving, archiving and deleting actions are included, along with cautions to confirm before running writes against real data.

## When your agent uses it

> Author and run Metabase data actions with the `mb` CLI — table actions that insert, update or delete one row of a table, and query actions that run a parameterized native SQL write (INSERT, UPDATE, DELETE), filed in a collection and run with values. Covers enabling them on a database, picking the type, the collection they go in, each type's body and parameters, running, and the lifecycle. Triggers — "add a data action", "let users update a row", "a button that inserts a record", "add a record to a table", "run a write query", "a form that saves to the database", "delete rows from Metabase". Inside a data app, start with `data-app-actions`.

## 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/packages/cli/skill-data/data-action)
- [Asks for: Read, Write, Edit, Bash, AskUserQuestion](https://github.com/metabase/metabase-cli/blob/HEAD/packages/cli/skill-data/data-action/SKILL.md)
- [License: AGPL-3.0](https://github.com/metabase/metabase-cli/tree/HEAD/packages/cli/skill-data/data-action)

## Features

- **Table action creation:** Builds insert, update or delete actions tied to a single table with exactly one primary key.
- **Native SQL write actions:** Writes parameterized INSERT, UPDATE or DELETE statements using template tags and matching parameters.
- **Database readiness checks:** Verifies the database supports actions and that data actions are enabled before creating one.
- **Optional input clauses:** Uses optional bracketed clauses so one query action can perform partial updates.
- **Execution and lifecycle:** Runs actions with values and covers listing, moving, archiving and deleting them.

## Good for

- Add a button that inserts a new customer record
- Let users update the note on an order row
- Delete a row from a table through a Metabase action
- Run a parameterized write query against a database
- Move or archive an existing data action

## Install

### Claude Code

Copy the skill folder to `~/.claude/skills/data-action` 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/data-action &&
cp -R "$tmp/packages/cli/skill-data/data-action" ~/.claude/skills/data-action &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/data-action` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/data-action` 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/data-action &&
cp -R "$tmp/packages/cli/skill-data/data-action" ~/.agents/skills/data-action &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/data-action` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/data-action` 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/data-action &&
cp -R "$tmp/packages/cli/skill-data/data-action" ~/.cursor/skills/data-action &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/data-action` 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 packages/cli/skill-data/data-action
```

Or copy the folder to `~/.gemini/skills/data-action` yourself.

### VS Code

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

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/metabase/metabase-cli.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/data-action &&
cp -R "$tmp/packages/cli/skill-data/data-action" ~/.copilot/skills/data-action &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/data-action` inside it instead.

### Other agents

Get the folder:

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

Then copy `metabase-cli/packages/cli/skill-data/data-action` into your agent's skills folder as `data-action`. Agents that support SKILL.md read one folder per skill.

## FAQ

### What must be enabled before creating a data action?

Data actions must be turned on for the database by an admin, and the database must report the actions feature. Creation and execution fail with an error until the setting is true.

### Where do data actions have to be stored?

They go in a data actions collection or the data actions root. A regular collection is refused.

### What is the difference between a table action and a query action?

A table action inserts, updates or deletes one row by primary key without SQL. A query action runs a custom native SQL write for anything else, such as computed values or several tables.

### Can the agent run a data action on production data?

The skill says to confirm with the user before running a write against data that matters and to test on a row created for the purpose.

### How do I install Data action in Claude Code?

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

### Does Data action 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 Data action?

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 Data action?

The closest alternatives to Data action are Data app actions, Native SQL, Bigquery basics, Azure data tables py and Db migration agent.

## Where this comes from

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

## Alternatives

- [Data app actions](https://ai-powered.com/skills/data-app-actions): Data app actions is an open-source agent skill for developer tools.
- [Native SQL](https://ai-powered.com/skills/native-sql): Native SQL is an open-source agent skill for databases.
- [Bigquery basics](https://ai-powered.com/skills/bigquery-basics): Bigquery basics is an open-source agent skill for databases.
- [Azure data tables py](https://ai-powered.com/skills/azure-data-tables-py): Azure data tables py is an open-source agent skill for cloud and infrastructure.
- [Db migration agent](https://ai-powered.com/skills/db-migration-agent): Db migration agent is an open-source agent skill for databases.
- [Azure data tables java](https://ai-powered.com/skills/azure-data-tables-java): Azure data tables java is an open-source agent skill for cloud and infrastructure.
- [Db change management](https://ai-powered.com/skills/db-change-management): Db change management is an open-source agent skill for databases.
- [Data archaeology](https://ai-powered.com/skills/data-archaeology): Data archaeology is an open-source agent skill for databases.

---
Source: https://ai-powered.com/skills/data-action
