Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问许可证需确认审计提醒

metabase-semantic-checker元数据库语义检查器

Agent Skill

metabase-semantic-checker 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

392

周安装

16

GitHub Stars

12

下载量

127
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:metabase-semantic-checker(元数据库语义检查器)
来源仓库:https://github.com/metabase/agent-skills
仓库路径:skills/metabase-semantic-checker
安装命令:
npx skills add https://github.com/metabase/agent-skills --skill metabase-semantic-checker
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/metabase/agent-skills --skill metabase-semantic-checker

简介

用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中快速定位候选结果。

  • 适用于关键词搜索、任务场景匹配和来源线索整理等研究检索场景。
  • 通过 npx skills add 命令从指定 GitHub 仓库安装并使用。
  • 安装前需确认权限范围、维护状态,注意是否涉及联网或文件操作。
  • 建议结合原始 README 核验具体用法和功能边界。

SKILL.md

Metabase semantic checker

The semantic checker validates a tree of Metabase Representation Format YAML files for referential integrity. Schema-level validation (shape of each file, required fields, enum values) is handled separately by npx @metabase/representations validate-schema; the semantic checker runs *after* schema validation and focuses on cross-file and cross-system consistency.

It compiles every MBQL query down to SQL against the database metadata and checks that each entity reference and each column reference resolves to something that actually exists. Concretely, it answers:

  • Does every collection_id, parent_id, dashboard_id, document_id, based_on_card_id, transform tag, snippet name, etc. resolve to an entity that actually exists in the tree?
  • For each MBQL query, do every source-table, field reference, join target, segment, measure, and expression resolve against the database schema? (Verified by compiling the query to SQL.)
  • For each native query, do the referenced tables, columns, and snippets exist?
  • Do dashboards' and documents' embedded card references point at real cards?

Each run takes 1 minute or more — roughly a minute of fixed JVM + metadata-loading overhead before any checks start, plus query-compilation time that scales with the tree.

The checker ships inside the Metabase Enterprise JAR and is invoked via --mode checker. Default Docker image: metabase/metabase-enterprise:latest. Use metabase/metabase-enterprise-head:latest only when the user explicitly wants the in-development build — e.g. testing unreleased checker changes.

Inputs

Two inputs, both required:

  • The representation tree — the repo root containing collections/, databases/, transforms/, python_libraries/. This is what gets checked.
  • The database metadata — a JSON file produced by GET /api/database/metadata. By default located at .metabase/metadata.json. The checker uses it to resolve column/table references inside queries; without it, query-level checks cannot run.

If .metabase/metadata.json is missing, do not run the checker. Instead, tell the user it needs to be fetched first and defer to the metabase-database-metadata skill (which handles .env, credentials, and the fetch). Only run the checker once the metadata file is present on disk.

When to run

Do not run the semantic checker by default when making edits. It is slow (≥1 minute per run) and in most projects is wired up as a CI step that runs on every push or PR — that is where it belongs. Local runs are for targeted diagnosis, not routine validation.

Only run it locally when the user explicitly asks for one of these:

  • verify that all entity references resolve (collections, dashboards, cards, snippets, transform tags, etc.), or
  • verify that all column references in queries — MBQL or SQL — are correct.

Phrasings that count as an explicit ask: "semantic check", "check references", "validate queries against the schema", "make sure the columns still exist", or diagnosing a broken reference the user already suspects. A bare "run the checker" does not count — by default "the checker" means the fast schema checker (npx @metabase/representations validate-schema). Only wording that explicitly names references or queries should trigger the semantic checker.

Otherwise, skip it. After editing YAML, rely on npx @metabase/representations validate-schema for local feedback and leave the semantic check to CI. Do not run it proactively at session start, and do not run it as a self-imposed "finishing step" after edits unless the user asked for it.

If you do run it, batch. Make all the YAML changes first, then run the checker once. Each invocation pays the ≥1-minute fixed overhead; running between edits multiplies that cost. If it surfaces issues, fix everything you can see in one pass before re-running.

Running the checker

Once .metabase/metadata.json exists and Docker is available:

docker pull metabase/metabase-enterprise:latest

docker run --rm \
  -v "$PWD:/workspace" \
  --entrypoint "" \
  -w /app \
  metabase/metabase-enterprise:latest \
  java -jar metabase.jar \
    --mode checker \
    --export /workspace \
    --schema-dir /workspace/.metabase/metadata.json \
    --schema-format concise

Flag reference:

  • --mode checker — selects semantic-check mode (skips server startup, import, etc.).
  • --export /workspace — path inside the container to the representation tree root. With the -v "$PWD:/workspace" mount above, this maps to the current repo root on the host.
  • --schema-dir /workspace/.metabase/metadata.json — path to the database metadata JSON. Despite the -dir suffix the flag accepts a single JSON file. Point it elsewhere only if the user has stored metadata at a non-default path.
  • --schema-format concise — format the input metadata is in. concise matches what @metabase/database-metadata / GET /api/database/metadata produce. Do not change unless the user explicitly has a different dump format.

The container needs no network access for the check itself — pull the image first if the host is offline-prone.

Exit code is non-zero on findings. Surface the checker's stdout/stderr verbatim to the user; do not summarize away specific paths or entity names, since those are how the user locates the broken reference.

Common failure modes

  • "Database metadata not found" / schema load errors.metabase/metadata.json is missing, stale, or malformed. Refer the user to the metabase-database-metadata skill for a fresh fetch.
  • Unknown collection / card / dashboard / snippet / tag reference — the referenced entity_id or name does not exist in the tree. Either the target YAML is missing, or the reference is a typo; grep the tree for the id/name to confirm which.
  • Unknown table or field inside a query — the query references a column that the database metadata doesn't know about. Either the warehouse schema has drifted (refetch metadata), or the query itself is wrong.
  • Docker image missing / not pulled — run docker pull metabase/metabase-enterprise:latest first. On slow networks warn the user; the image is multi-hundred-MB.

Relationship to other skills

  • metabase-representation-format — defines the YAML shape the checker reads. Use it when the user is editing or creating representation files.
  • metabase-database-metadata — owns the .metabase/metadata.json file and the fetch/refresh flow. Invoke it whenever the metadata file is missing, stale, or the user explicitly asks to refresh it before re-running the checker.
  • Schema-level validation (npx @metabase/representations validate-schema) — the fast, local-only check that runs in the Schema Check CI workflow and does not need database metadata. Essentially instant; run it freely between edits. The semantic checker assumes schema-valid input, so run schema validation first if a file looks structurally wrong.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

36.89%
按下载量换算47

Claude

30.57%
按下载量换算39

Cursor

18.91%
按下载量换算24

Gemini CLI

10.44%
按下载量换算13

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills