---
title: "Cube build model: review, setup & limitations · Undominated.ai"
canonical: https://undominated.ai/skills/cube-cube-build-model/
description: "Cube's skill for authoring and changing a Cube semantic model in YAML on a dev-mode branch, through the Cube MCP tools or the Cube CLI, with validation, commit, and publishing only on an explicit request."
---

# Cube build model: review, setup & limitations · Undominated.ai

> Cube's skill for authoring and changing a Cube semantic model in YAML on a dev-mode branch, through the Cube MCP tools or the Cube CLI, with validation, commit, and publishing only on an explicit request.

[← Explore all skills](/skills/)

DATA AND ANALYTICS / Cube

# Cube build model

Cube's skill for authoring and changing a Cube semantic model in YAML on a dev-mode branch, through the Cube MCP tools or the Cube CLI, with validation, commit, and publishing only on an explicit request.

 [See setup guidance ↓](#setup)[Original source ↗](https://docs.cube.dev/docs/integrations/agent-skills)

SOURCE REVIEW

 Reviewed 2026-10-21
 Evidence 5 linked sources
 Publisher Cube
 Licence [Apache-2.0 ↗](https://github.com/cube-js/cube-agent-skills/blob/5e5ef13c40f3bfc101d575b568b5c5a3447d6fcb/LICENSE)
 Revision 5e5ef13c40f3
 [Read what was—and wasn’t—checked ↓](#review)

“Author and change a Cube semantic model — add or edit cubes, views, measures, dimensions, joins and pre-aggregations in YAML — on a dev-mode branch through the Cube MCP tools or the Cube CLI, then commit and build. …”

 [Cube · upstream description ↗](https://github.com/cube-js/cube-agent-skills/blob/5e5ef13c40f3bfc101d575b568b5c5a3447d6fcb/skills/cube-build-model/SKILL.md) Our analysis follows below.

01 / THE REASONING

## Why this made the selection.

 - Spells out the write loop for both paths: seven Cube MCP tool steps (startDataModelEdit, read, writeDataModelFile with its recompile and validationError, getDataModelChanges, searchDataModel and runQuery on the same branchName, commitDataModelChanges, then mergeToDefaultBranch only on an explicit publish request) and an eight-step CLI dev-mode block that ends with build-status --wait and exit-dev-mode.
- Names the failures it guards against: writes rejected off a dev-mode branch, a dev branch of the deploy branch committing straight to production, a measure that compiles but is not exposed in a view (checked with `cube meta`), and `cube deploy` deleting remote files that are not in the local directory.
- Cube Dev, Inc. publishes it as one of nine skills in cube-js/cube-agent-skills under Apache-2.0, next to a Claude plugin that bundles the hosted Cube MCP server at https://cubecloud.dev/mcp.

### A good fit for

 - Add a measure, dimension, cube, view or join to an existing Cube model on a dev-mode branch
- Fix a model error by validating the dev working copy and reporting the file and member Cube names
- Check and build one new pre-aggregation rollup on the dev branch
- Confirm a new member is exposed in a view with `cube meta` before checking its numbers with cube-run-query

### Weigh up before choosing

 - The skill directory skills/cube-build-model last changed in a commit dated 2026-09-23 (git log at the pin), the same date as the pinned revision 5e5ef13c.
- Needs the Cube MCP server (bundled in the Cube plugin, or the Cube connector) or the Cube CLI, and network access to Cube Cloud, as the frontmatter compatibility line says. The README says every skill checks for the MCP tools or the CLI first and stops with instructions.
- The CLI install line that the skill preflight and the README print, `curl -fsSL https://raw.githubusercontent.com/cube-js/cube/master/install-cli.sh | sh`, pipes an unpinned script from the cube-js/cube master branch into a shell. This review did not read or run that script.
- Publishing writes to the deploy branch: cube:mergeToDefaultBranch or `cube data-model merge-to-default` makes the change live for everyone, and the CLI merge deletes the feature branch unless --keep-branch is passed. The skill says to merge only when the user explicitly asks.
- Entering dev mode directly on the deploy branch makes `commit` land in production; the skill relies on the agent creating a feature branch first. `--branch` defaults to the per-user active dev-mode branch, which the skill warns makes it easy to write to the wrong place across deployments.
- `cube deploy` replaces the project from local files, lands on the active dev-mode branch or otherwise on the deploy branch, and deletes remote files that are not in the local directory unless --keep-missing is passed.
- A pre-aggregation build runs real queries against the warehouse.
- The README says Cursor and Snowflake Cortex Code support is coming next and, until then, to copy skills/ into that agent's skills directory.
- LICENSE is the Apache License 2.0 text with the appendix copyright line left as the template `Copyright [yyyy] [name of copyright owner]`; the SKILL.md frontmatter and .claude-plugin/plugin.json also say Apache-2.0.

02 / THE REVIEW RECORD

## What we actually inspected.

Source review has boundaries. A clear record is more useful than a “safe” badge.

### Material inspected

 - skills/cube-build-model/SKILL.md
- README.md
- LICENSE
- .mcp.json
- .claude-plugin/plugin.json
- .claude-plugin/marketplace.json
- The git tree at 5e5ef13c, which holds nine skills/*/SKILL.md files

### Our findings

 - SKILL.md opens with "Writes state." and says the API rejects file writes on any branch that is not a dev-mode branch.
- Merging to the deploy branch appears in both paths and is reserved for an explicit publish request; `cube deploy` is documented as a separate workflow that replaces the project and deletes remote files absent locally unless --keep-missing.
- .mcp.json declares one server, cube, of type http at https://cubecloud.dev/mcp.
- The repository holds nine SKILL.md skills, and the README's only install lines install the whole plugin or the whole skill set.
- LICENSE is the Apache License 2.0 text; its appendix copyright line is the unfilled template.

### Not established by this review

 - Not executed: it was not installed or run.
- No model was edited, validated, committed, merged or deployed, and no pre-aggregation was built.
- The Cube CLI install script, the hosted MCP server and docs.cube.dev were not fetched or called.
- The repository's evals/ prompts, mocks and graders were not read.

The review applies to the material and revision named here. A newer upstream release can change its behavior.

03 / PUT IT TO WORK

## Add a skill to your workflow.

[Upstream setup instructions ↗](https://github.com/cube-js/cube-agent-skills/blob/5e5ef13c40f3bfc101d575b568b5c5a3447d6fcb/README.md)
 - For Claude Code the README prints `/plugin marketplace add cube-js/cube-agent-skills` and `/plugin install cube@cube`. They install the cube plugin, which bundles the hosted Cube MCP server and all nine skills, not this skill alone; the README then says to run `/mcp`, select `plugin:cube:cube` and sign in to Cube.
- For Codex, Copilot, Gemini CLI and other skills.sh-compatible agents the README prints `npx skills add cube-js/cube-agent-skills`. It installs all nine SKILL.md skills under skills/ at this revision, not this skill alone, and the README says to add the MCP server separately or install the Cube CLI.
- The README's Cube CLI line is `curl -fsSL https://raw.githubusercontent.com/cube-js/cube/master/install-cli.sh | sh`, followed by `cube login` or `export CUBE_API_URL=... CUBE_API_KEY=...`. It pipes an unpinned script into a shell.

### Before you start

 - The Cube MCP server (Cube plugin or Cube connector) or the Cube CLI, with network access to Cube Cloud
- A Cube Cloud sign-in: OAuth for the MCP server, or cube login or CUBE_API_URL and CUBE_API_KEY for the CLI
- A deployment and a feature branch to enter dev mode from

### Compatibility

Claude Code · OpenAI Codex · GitHub Copilot · Gemini CLI

### Implementation

YAML

### Cube Cloud sign-in; writes, commits and can publish model changes

 - Calls the Cube MCP tools cube:startDataModelEdit, listDataModelFiles, readDataModelFile, writeDataModelFile, getDataModelChanges, searchDataModel, runQuery, commitDataModelChanges, switchUserBranch, mergeToDefaultBranch, getPreAggregationStatus and buildPreAggregation. The bundled .mcp.json points the server at https://cubecloud.dev/mcp over http, and the README says it signs in with OAuth and acts as the signed-in user with their access rules.
- On the CLI path, uses credentials from `cube login` (opens a browser) or the CUBE_API_URL and CUBE_API_KEY environment variables, and runs `cube whoami` and `cube context list` before writing.
- Runs `cube data-model` branches, create-branch, dev-mode, put, commit, rename, delete, merge-to-default and exit-dev-mode, plus `cube validate`, `cube deployments build-status`, `cube meta` and `cube deploy`, against the user's deployment.
- Writes the full model listing to /tmp/model.json, and uploads local files (for example ./orders.yml, or stdin) with `cube data-model put`.
- Deletes model files with `cube data-model delete`; `cube deploy` deletes remote files that are not in the local directory unless --keep-missing is passed.
- Publishes to the deploy branch, live for everyone, with cube:mergeToDefaultBranch or `cube data-model merge-to-default`, which the skill reserves for an explicit user request.
- Starts pre-aggregation builds, which run real queries against the warehouse.

### Cost model

Apache-2.0 for the skill files. The files read state no price for Cube Cloud, the hosted MCP server or the warehouse; the skill notes that a pre-aggregation build runs real warehouse queries.

04 / FOLLOW THE EVIDENCE

## The source trail.

Our notes are separate from the original resource. Check upstream before adopting a new version.

 - [cube-build-model SKILL.md at 5e5ef13c ↗](https://github.com/cube-js/cube-agent-skills/blob/5e5ef13c40f3bfc101d575b568b5c5a3447d6fcb/skills/cube-build-model/SKILL.md) Checked 2026-10-21 https://github.com/cube-js/cube-agent-skills/blob/5e5ef13c40f3bfc101d575b568b5c5a3447d6fcb/skills/cube-build-model/SKILL.md Supports: upstreamDescription, license, whySelected, bestFor, language, limitations[1], limitations[2], limitations[3], limitations[4], limitations[5], limitations[6], limitations[8], access.permissions, install.prerequisites, review.findings
- [Repository README at 5e5ef13c ↗](https://github.com/cube-js/cube-agent-skills/blob/5e5ef13c40f3bfc101d575b568b5c5a3447d6fcb/README.md) Checked 2026-10-21 https://github.com/cube-js/cube-agent-skills/blob/5e5ef13c40f3bfc101d575b568b5c5a3447d6fcb/README.md Supports: compatibility, install, whySelected, limitations[1], limitations[2], limitations[7], access.permissions, review.findings
- [Apache-2.0 LICENSE at 5e5ef13c ↗](https://github.com/cube-js/cube-agent-skills/blob/5e5ef13c40f3bfc101d575b568b5c5a3447d6fcb/LICENSE) Checked 2026-10-21 https://github.com/cube-js/cube-agent-skills/blob/5e5ef13c40f3bfc101d575b568b5c5a3447d6fcb/LICENSE Supports: license, limitations[8], review.findings
- [Bundled MCP server config (.mcp.json) at 5e5ef13c ↗](https://github.com/cube-js/cube-agent-skills/blob/5e5ef13c40f3bfc101d575b568b5c5a3447d6fcb/.mcp.json) Checked 2026-10-21 https://github.com/cube-js/cube-agent-skills/blob/5e5ef13c40f3bfc101d575b568b5c5a3447d6fcb/.mcp.json Supports: whySelected, access.permissions, review.findings
- [Claude plugin manifest at 5e5ef13c ↗](https://github.com/cube-js/cube-agent-skills/blob/5e5ef13c40f3bfc101d575b568b5c5a3447d6fcb/.claude-plugin/plugin.json) Checked 2026-10-21 https://github.com/cube-js/cube-agent-skills/blob/5e5ef13c40f3bfc101d575b568b5c5a3447d6fcb/.claude-plugin/plugin.json Supports: publisher, homepage, license, whySelected, limitations[8]

KEEP COMPARING

## Other approaches to consider.

Related by category or shared topics. These are alternatives to inspect, not a measured quality order.

 [### Adding a dbt unit test ↗ Writes a dbt unit test that mocks upstream inputs instead of querying production.](/skills/dbt-labs-adding-dbt-unit-test/)[### Querying the dbt information schema ↗ Answers from the project metadata, with two routes, instead of guessing the DAG.](/skills/dbt-labs-querying-the-dbt-information-schema/)[### Upgrading dbt ↗ Plans a dbt v1 migration to 1.12 using adapter-specific issue bundles and a recorded verification gate.](/skills/dbt-labs-upgrading-dbt/)

 [AI Tools ↗](/tools/)[Skills ↗](/skills/)[Agents ↗](/agents/)[MCP Servers ↗](/mcp-servers/)[Workflows ↗](/workflows/)

## Continue your investigation

 - [Choose a toolkit](/tools/)
- [Inspect execution hosts](/agents/)
- [Check tool access](/mcp-servers/)
- [Check project dependencies](/check-repo/)
