ワンクリックで
metricflow-semantic-authoring
Author MetricFlow semantic model YAML from database tables with validation and Knowledge Base publishing
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Author MetricFlow semantic model YAML from database tables with validation and Knowledge Base publishing
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Generate MetricFlow metrics from natural language business descriptions
Optional semantic-model profiling workflow that mines historical SQL and bounded column distributions before YAML authoring
Build the project's vector-indexed knowledge base from files plus database metadata — optionally scoped to specific files / tables / datasources / domains. Scan the in-scope material, classify it into business domains, explore each domain's tables and docs in parallel with explore subagents (the validated-query SQL corpus is enumerated directly, no explore needed), then (after the user confirms a generation manifest — or directly, in the same turn, when the user has waived confirmation) route every artifact to its store via storage-classify, generating semantic_models / metrics / reference_sql (and mining any extra knowledge), and refresh AGENTS.md's KB index. The lightweight /init handles the AGENTS.md inventory plus file-based knowledge/memory; this skill owns the heavy vector-store generation.
Create new Datus skills from scratch. Use when users want to build a new skill, scaffold a skill directory, or capture a workflow as a reusable skill. Trigger phrases include "create a skill", "make a skill for", "turn this into a skill", "new skill".
Activate when the gen_job agent detects that the source and target databases differ. Covers cross-database transfer lifecycle - type mapping via adapter Mixin hints, DDL generation, data transfer via transfer_query_result, and lightweight reconciliation.
Mine shortest atomic facts from (question + gold_sql) pairs into ./knowledge/*.md; either by simulating SQL drafting (lite) or by driving the gen_sql subagent in blind iteration (deep)
| name | metricflow-semantic-authoring |
| description | Author MetricFlow semantic model YAML from database tables with validation and Knowledge Base publishing |
| tags | ["semantic-model","metricflow"] |
| version | 1.0.0 |
| user_invocable | false |
| disable_model_invocation | false |
| allowed_agents | ["gen_semantic_model","gen_metrics"] |
Create production-ready MetricFlow semantic model YAML for one or more database tables, validate it, and publish it to the Knowledge Base.
Understand target tables
describe_table and relationship tools as needed.ask_user only when a critical modeling choice cannot be inferred.semantic-sql-history-profiler
skill is available, load that skill and call profile_semantic_model_evidence before modeling
columns or writing YAML.sql_entries_json or sql_queries;
do not truncate to a few representative examples.Model columns
analyze_column_usage_patterns only as a fallback or to fill a narrow gap.type: TIME only for a physical DATE/TIME/TIMESTAMP column, or for a SQL expression / sql_query alias that is guaranteed to return a DATE/TIME/TIMESTAMP value.*_date_sk, *_date_key, *_dt_key, or integer YYYYMMDD keys as type: TIME; model them as identifiers or categorical dimensions unless you explicitly convert them to a real date.sql_query data source that joins the date dimension, selects the real date column with a clear alias, and uses that alias as the primary time dimension and measure agg_time_dimension.identifiers and dimensions. Use identifiers for
primary/join keys and dimensions for grouping/filtering fields.expr: "1" for row-count measures with agg: COUNT.agg for the aggregation type; do not add a type field to measure entries.Write YAML
subject/semantic_models/<current_datasource>/{table_name}.yml.data_source: documents; do not put a top-level metrics: list beside data_source: in the same document.metric: documents.Validate and fix
validate_semantic(scope="semantic_model").edit_file to fix the YAML and call validate_semantic again.validate_semantic succeeds.Publish
end_semantic_model_generation with all generated semantic model file paths.semantic_model_files to validate and publish before reporting success.validate_semantic succeeds.end_semantic_model_generation; final JSON semantic_model_files is the host fallback.