Agent skill · Data & Analytics

metricflow_ingest

Map a MetricFlow semantic_model or metric into ktx semantic layer sources. Covers the MetricFlow to ktx primitive table, `extends:` inheritance flattening, metric-type handling (simple / derived / ratio / cumulative / conversion), `model: ref('x')` resolution, and four worked examples. Load when the turn contains `.yml`/`.yaml` files with top-level `semantic_models:` or `metrics:`.

Kaeliogithub.com/KaelioGitHub ↗
claude-codecodexApache-2.0
Install
npx skills add Kaelio/ktx --skill metricflow_ingest --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 1
SKILL.md size: 15 KB
Bundled scripts: none
Path: packages/cli/src/skills/metricflow_ingest/SKILL.md
Open the folder on GitHub →
Where it comes from
Source: Kaelio/ktx
Stars: 1,526 · +15 this week
Language: TypeScript
Read our review of the source →

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# MetricFlow to ktx Semantic Layer A MetricFlow `semantic_model` maps to an SL source; MetricFlow `measures` map to ktx measures; MetricFlow `entities` map to ktx `joins`; MetricFlow `metrics` (top-level) map to ktx measures OR to cross-model derived measures. Files in one WorkUnit are ALWAYS part of the same logical entity (a connected component, possibly spanning `extends:` + cross-model metric refs). Flatten inheritance and cross-file references at write time. ## Mapping table | MetricFlow | ktx form | Notes | |---|---|---| | `semantic_model: X { model: ref('t') }` with measures + dimensions | **Overlay** named `X` with `measures`, computed-only `columns`, `column_overrides`, `joins` | The `model:` ref resolves to a manifest table. | | `semantic_model: X { model: source('s','t') }` | **Overlay** named `X` over table `t`. | Same shape; `source()` still resolves to a physical table. | | `semantic_model: X { model: <literal> }` with no manifest entry | **Standalone** with explicit `sql:`, `grain:`, `columns:` | Happens when the dbt manifest isn't available. | | `semantic_model: Y { extends: X }` | **Merge** Y's measures/dimensions/entities into X's overlay, or write a single overla

What's inside
Steps it walks through
  1. Mapping table
  2. Identifier Verification Protocol
  3. Flattening extends:
  4. model: ref resolution
  5. Cumulative metrics - sql-standalone fallback
  6. Conversion metrics - flag for human
  7. Provenance markers
  8. Example 1 - single semanticmodel to overlay
  9. Example 2 - extends chain → one flattened overlay
  10. Example 3 - derived metric spanning two semanticmodels
  11. Example 4 - filtered metric creates a new measure
More from ktx
All skills →
About this skill
What does the metricflow_ingest skill do?

Map a MetricFlow semantic_model or metric into ktx semantic layer sources. Covers the MetricFlow to ktx primitive table, `extends:` inheritance flattening, metric-type handling (simple / derived / ratio / cumulative / conversion), `model: ref('x')` resolution, and four worked examples. Load when the turn contains `.yml`/`.yaml` files with top-level `semantic_models:` or `metrics:`.

How do I install it?

Run `npx skills add Kaelio/ktx --skill metricflow_ingest --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From Kaelio/ktx, a repository with 1,526 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going