跳到正文
cccskills
免费在 GitHub 公开

semantic-model-builder

Build structured semantic layer documentation for metrics, dimensions, and entities. Activate when you need to define a business metric, document a data model, or create YAML definitions compatible with dbt Semantic Layer or similar frameworks.

中文简介正在准备中。当前显示原文说明。

查看安装方法

包含的文件(9)

  • SKILL.md2.5 KB
  • assets/dimension_definition.yaml892 B
  • assets/entity_definition.yaml1.0 KB
  • assets/metric_definition.yaml1.5 KB
  • references/dbt_semantic_layer_guide.md4.3 KB
  • references/dimension_hierarchy_patterns.md3.9 KB
  • references/metric_definition_framework.md3.3 KB
  • scripts/metric_template_generator.py4.2 KB
  • scripts/model_yaml_validator.py5.0 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

When to use

  • A stakeholder asks "how is [metric] calculated?" and no canonical definition exists
  • You're setting up dbt Semantic Layer and need YAML metric/dimension/entity definitions
  • Multiple teams are using different SQL queries for the same metric — you need to codify the one true definition
  • You're building a data catalog entry for a core model and need structured metadata

Process

  1. Identify the object type — decide whether you're documenting a metric, a dimension, or an entity. Use the frameworks in references/metric_definition_framework.md for metrics and references/dimension_hierarchy_patterns.md for dimensions.
  2. Gather the definition inputs — collect: calculation logic (SQL or formula), business context, data source(s), grain, edge cases, and known gotchas. Ask the data owner if anything is unclear.
  3. Generate the YAML template — run scripts/metric_template_generator.py to scaffold the initial YAML structure for the object type. Fill in the generated template.
  4. Validate the YAML — run scripts/model_yaml_validator.py to check required fields, type constraints, and reference integrity (referenced dimensions exist in the same file).
  5. Add dbt context — if this will be deployed to dbt Semantic Layer, consult references/dbt_semantic_layer_guide.md for the exact field names and constraints for your dbt version.
  6. Save final definitions — save metrics to assets/metric_definition.yaml, dimensions to assets/dimension_definition.yaml, entities to assets/entity_definition.yaml.

Inputs the skill needs

  • Required: the metric name or model name to document
  • Required: calculation logic — SQL snippet, formula, or plain-English steps
  • Required: business context — who uses it, what decision it informs, what a "good" value looks like
  • Optional: data source table(s) and column names
  • Optional: target semantic layer framework (dbt Semantic Layer, Cube.js, LookML, etc.)
  • Optional: existing YAML to validate

Output

  • assets/metric_definition.yaml — filled metric YAML definition(s)
  • assets/dimension_definition.yaml — filled dimension YAML definition(s)
  • assets/entity_definition.yaml — filled entity YAML definition(s)
  • Validation report from scripts/model_yaml_validator.py (inline output)

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Rigorous A/B test statistical analysis. Use when analyzing experiment results, calculating statistical significance, checking for sample ratio mismatch, or validating test design before launch.

中文简介正在准备中。当前显示原文说明。

nimrodfisher/data-analytics-skills4812026年9月25日 更新

Track and document analytical assumptions and decisions. Use when making analytical choices, documenting trade-offs, ensuring transparency, or creating audit trails for analytical work.

中文简介正在准备中。当前显示原文说明。

nimrodfisher/data-analytics-skills4812026年9月25日 更新

Structured, reproducible analysis documentation. Use when documenting analysis findings, creating analysis notebooks, ensuring reproducibility, or building analysis archives for future reference.

中文简介正在准备中。当前显示原文说明。

nimrodfisher/data-analytics-skills4812026年9月25日 更新

Structure analysis approach before starting work. Use when receiving new analysis requests, breaking down complex questions into steps, or planning iterative analysis workflows.

中文简介正在准备中。当前显示原文说明。

nimrodfisher/data-analytics-skills4812026年9月25日 更新

Pre-delivery quality assurance for analysis work. Use when reviewing analysis before sharing with stakeholders, checking for completeness, validating assumptions, or ensuring clarity of recommendations.

中文简介正在准备中。当前显示原文说明。

nimrodfisher/data-analytics-skills4812026年9月25日 更新

Post-analysis learning and process improvement. Use when completing major analysis projects, documenting lessons learned, or improving team analytical practices.

中文简介正在准备中。当前显示原文说明。

nimrodfisher/data-analytics-skills4812026年9月25日 更新

查看 nimrodfisher 的全部技能

报告此技能的问题