数据与研究

rde-data-apps

metabase/agent-skills

Build or change a Metabase data app on an rde machine: settles what the `metabase-data-apps` skill needs from the local setup (the remote-sync repository, the Metabase URL, the API key rde stores, how the app reaches Metabase), makes sure everything the app reads is Library content already synced into that repository, confirms every sync step with the user, and hands the build to it. Use only when an app is asked for explicitly: "build me an app for X", "create a data app", "make an internal tool / portal in Metabase", "add a page / a form / a filter to my data app". A dashboard, a question, or a metric is not an app; those stay with the `rde` skill.

  • 877 次安装
  • 54 星标
  • 收录于

安装命令

npx skills add https://github.com/metabase/agent-skills --skill rde-data-apps

SKILL.md

rde-data-apps

A data app is a React bundle Metabase serves at /apps/<slug> from data_apps/<slug>/ in the repository connected through remote sync. The metabase-data-apps skill builds it. This skill answers its questions from what rde already knows, so the user is asked only what rde cannot know, makes sure the content the app reads is in that repository before the app is built, then hands over. Sections 4 to 6 override the data-apps skill wherever they differ: the schema scope, the order of commits and pushes, and the confirmation before any sync.

1. The instance

rde status --json: url is the instance (not a secret) and version must be v65+ or a head build. mb auth list --json names the profile whose url matches; use it as $PROFILE. Metabase serves apps only under a license with remote sync and data apps: rde doctor --json, row license. Without one, the user activates it in their own terminal with rde init --only license (or ! rde init --only license in this session); the token never enters the chat. Syncing content needs remote-sync-type set to read-write (mb setting get remote-sync-type --json); switching it is a sync change, confirmed like one (section 6).

2. The repository

contentRepository in rde status --json is the working directory of the remote-sync repository, and the answer to Step 1 of the metabase-data-apps setup guide: name it and use it, do not ask. When it is null and the license has remote sync, ask where the repository should live, then run rde init --only git-sync --git-dir <path> --git-remote local (a bare remote inside ~/.rde, no account). A hosted remote needs a git token, so the user runs rde init --only git-sync themselves. A repository rde creates already ignores .env.local, node_modules/, and the rest a data app must not push.

3. The credentials

The data-apps skill reads DATA_APP_MB_URL and DATA_APP_MB_API_KEY from .env.local at the repository root and forbids the key in the conversation. rde stores the API key mb uses, and rde credentials --api-key prints it alone. When its setup guide reaches the credentials step, or its check prints MISSING, fill the file with this command instead of asking the user, <url> from step 1 and <repo> from step 2. It prints only creds written, keeps the file's other lines, and makes sure .env.local is ignored:

rde-data-apps

A data app is a React bundle Metabase serves at /apps/<slug> from data_apps/<slug>/ in the repository connected through remote sync. The metabase-data-apps skill builds it. This skill answers its questions from what rde already knows, so the user is asked only what rde cannot know, makes sure the content the app reads is in that repository before the app is built, then hands over. Sections 4 to 6 override the data-apps skill wherever they differ: the schema scope, the order of commits and pushes, and the confirmation before any sync.

1. The instance

rde status --json: url is the instance (not a secret) and version must be v65+ or a head build. mb auth list --json names the profile whose url matches; use it as $PROFILE. Metabase serves apps only under a license with remote sync and data apps: rde doctor --json, row license. Without one, the user activates it in their own terminal with rde init --only license (or ! rde init --only license in this session); the token never enters the chat. Syncing content needs remote-sync-type set to read-write (mb setting get remote-sync-type --json); switching it is a sync change, confirmed like one (section 6).

2. The repository

contentRepository in rde status --json is the working directory of the remote-sync repository, and the answer to Step 1 of the metabase-data-apps setup guide: name it and use it, do not ask. When it is null and the license has remote sync, ask where the repository should live, then run rde init --only git-sync --git-dir <path> --git-remote local (a bare remote inside ~/.rde, no account). A hosted remote needs a git token, so the user runs rde init --only git-sync themselves. A repository rde creates already ignores .env.local, node_modules/, and the rest a data app must not push.

3. The credentials

The data-apps skill reads DATA_APP_MB_URL and DATA_APP_MB_API_KEY from .env.local at the repository root and forbids the key in the conversation. rde stores the API key mb uses, and rde credentials --api-key prints it alone. When its setup guide reaches the credentials step, or its check prints MISSING, fill the file with this command instead of asking the user, <url> from step 1 and <repo> from step 2. It prints only creds written, keeps the file's other lines, and makes sure .env.local is ignored: