metabase/agent-skills

metabase-custom-viz

Build, change, debug, and package Metabase custom visualizations — React plugins made with @metabase/custom-viz and uploaded to Metabase as a .tgz.

소스 보기

사용 방법

  1. 설치 명령을 복사하고 자신의 에이전트 환경에 설치하기 전에 소스 패키지를 확인하세요.
  2. 필요한 도구, 인증 정보, 지원 환경은 원본 문서에서 확인하세요.
  3. 입력과 원하는 산출물을 설명하고 출처와 결과를 대조하세요.
npx skills add https://github.com/metabase/agent-skills --skill metabase-custom-viz

시작 전 확인

  • 설치에는 모델 구독, API 한도, 파일 접근 권한이 포함되지 않습니다.
  • 별점 수와 설치 수는 활동 지표이며 독립적인 품질·보안 검증이 아닙니다.
원본 Skill 문서

원본 저장소의 제목, 예시, 코드, 표, 링크, 이미지를 유지해 표시합니다.

Metabase custom visualizations

You orchestrate. You talk to the user, pick the flow, run phases, and carry state between them. You do not write viz code outside a phase.

Paths: phases/… and references/… are under <skill-dir>, the directory holding this SKILL.md. <sdk> is node_modules/@metabase/custom-viz/dist in the project. Other paths are relative to the project root. Phase files hold the full instructions for their executor, including their Input:; knowledge lives in references/. Never restate either in a handoff — pass only the phase's input and the paths above.

Setup

  1. Project: the working directory has metabase-plugin.json and

@metabase/custom-viz in package.json → use it. Otherwise take a name from the request (ask only if there is none) as <name>, run npx @metabase/custom-viz@latest init "<name>", and work in the directory it prints. init lowercases <name> and turns spaces into - for the directory and "name" in package.json and metabase-plugin.json; <name> as given becomes the display name. Keep <name> to letters, digits, spaces and -: init rejects most other characters.

  1. node_modules/ missing → npm install.
  2. <version> is version in

node_modules/@metabase/custom-viz/package.json. Its major is below the major of npm view @metabase/custom-viz version → tell the user this skill targets the latest @metabase/custom-viz major, offer to upgrade it, and stop.

  1. Metabase source: the host rules (sandbox, colors, column types) live

in the public Metabase repo. <ref> is custom-viz-v<version>, the tag the installed SDK was released from. .claude/metabase-src/.ref holds <ref> → the files are cached, skip the download. Otherwise delete .claude/metabase-src/ (an older SDK's copy), then download each file below, keeping its path, with curl (never a web fetch tool: it summarizes); a file missing at <ref> comes from master: curl -fsSL --create-dirs -o .claude/metabase-src/<path> https://raw.githubusercontent.com/metabase/metabase/<ref>/<path> || curl -fsSL --create-dirs -o .claude/metabase-src/<path> https://raw.githubusercontent.com/metabase/metabase/master/<path>

  • frontend/src/metabase/utils/scripts-sandbox/distortions-dom-mutate.ts
  • frontend/src/metabase/utils/scripts-sandbox/distortions-event.ts
  • frontend/src/metabase/utils/scripts-sandbox/distortions-blocked-apis.ts
  • frontend/src/metabase/utils/scripts-sandbox/distortions.ts
  • frontend/src/metabase/ui/colors/types/color-keys.ts
  • frontend/src/metabase/ui/colors/constants/accents.ts
  • frontend/src/metabase-lib/v1/types/utils/isa.ts

Every file downloaded → write <ref> to .claude/metabase-src/.ref.

<mb> is .claude/metabase-src. Add .claude/metabase-src/ to the project .gitignore when the line is missing. Now read the four scripts-sandbox files, color-keys.ts and accents.ts, each whole with the Read tool — never grep, head, sed or cat | …. The blocked lists sit mid-file; a partial read misses entries and the viz breaks at runtime. isa.ts on demand.

Then read references/project.md and references/operations.md.

Phases

  • phases/refine.md — you
  • phases/build.md — a subagent: spawn it with the Agent tool and tell

it to read and follow that file. Never write src/index.tsx yourself: build needs a fresh context holding only the build statement and its references.

  • phases/verify.md — a subagent, spawned like build; read-only. It

reviews the code fresh, without this session's view of it

  • phases/iterate.md — you
  • phases/debug.md — you
  • phases/ship.md — you

When executing a phase yourself, follow that file only; skip reading files whose content is still in your context. Only when the Agent tool is unavailable, run build yourself.

References

  • project.md — files, build statement format, libraries, defaults, checks
  • api-contract.md — host behavior the types cannot express
  • known-mistakes.md — bugs with symptoms, fixes, detectors
  • sandbox-restrictions.md — what the sandbox blocks at runtime
  • operations.md — dev server, connecting Metabase, reading a question,

renaming, user edits

  • fix-log-rules.md — format and rules of .claude/fix-log.md

State

  • .claude/build-statement.md — the build statement; written by refine,

kept current by iterate and debug. Missing while src/index.tsx is already a viz → reconstruct it from the code in the project.md format, confirm with the user, write it.

Start

Route:

  • src/index.tsx is still the scaffold's thumbs-up/down template (no

viz built yet) and the user wants a viz → Create

  • Change, new setting, restyle, rename → iterate
  • Misbehavior report → debug
  • "ship it", "package it", "build the archive" → Ship
  • Question about the viz, the API or the setup → answer from the

references and the code; no phase

Create

refine → build → iterate. Build returns open questions → ask the user, fold the answers into .claude/build-statement.md, re-run build.

Verify

Run verify. clean → back to the caller. Findings → show them to the user; never fix them unasked: the code may be the user's. Ask: fix them (debug, one finding per symptom), keep editing (iterate), or go on as is.

Ship

Run Checks (project.md). Failures → fix them first (debug). Then Verify, always: the user may have edited src/index.tsx in their editor. Fixed findings → start this Ship section over; clean → run phases/ship.md.

Phase exits

  • iterate returns misbehavior → debug; verify → Verify, then

iterate; done → Ship

  • debug returns → iterate
같은 저장소의 Skills

더 많은 Skills

모든 Skills
metabase
커뮤니티

metabase-cli

Drive a Metabase instance from the terminal via the mb CLI: auth profiles, databases and schemas, schema sync and field-values rescan, tables, fields, cards (questions, models, metrics) run as JSON/CSV/XLSX, dashboards and dashcards, collections and their tree, snippets, segments, measures, transforms and transform-jobs, settings, search, git-sync. Use for any Metabase operation from the terminal: "log into metabase", "what profiles do I have", "list cards", "run card 42 as CSV", "create a trans

1시간 설치 수
1
GitHub Stars
55
업데이트
11월 10일
metabase
커뮤니티

metabase-rde

Expert data engineering with Metabase at the center of any company's stack: explore and profile raw warehouse tables, build clean tables as Metabase transforms pinned by transform tests, build the semantic layer (models, metrics, measures, segments, metadata), design dashboards, answer questions with checked numbers, reconcile against a reference, change delivered definitions safely. Use for data work, not one mb command (metabase-cli): "make sense of my data", "model this raw schema", "set up a

1시간 설치 수
2
GitHub Stars
50
업데이트
10월 20일
metabase
커뮤니티

metabase-data-apps

Build and change Metabase data apps, the React apps Metabase serves at /apps/ from dataapps/ / in the Git repository connected through remote sync. Use when the user asks to create, scaffold, set up, or remove a data app; to show Metabase tables, metrics, or saved questions in one, or work with its generated metabase.data.ts schema; to add pages or routing; to add a form or button that writes data through an action; or to migrate an app Metabase marks Outdated, or whose npm run typecheck or npm

1시간 설치 수
29
GitHub Stars
50
업데이트
10월 10일
metabase
커뮤니티

rde

Expert data engineering with Metabase at the center of any company's stack: explore and profile raw warehouse tables, build clean tables as Metabase transforms pinned by transform tests, build the semantic layer (models, metrics, measures, segments, metadata), design dashboards, answer questions with checked numbers, reconcile against a reference, change delivered definitions safely. Use for data work, not one mb command (metabase-cli): "make sense of my data", "model this raw schema", "set up a

1시간 설치 수
40
GitHub Stars
50
업데이트
10월 10일