cube-build-content
Create and update saved content in Cube — workbooks, reports, dashboards, folders and scheduled notifications — through the Cube MCP tools or the Cube CLI. Use whenever someone wants to build or change something people will look at: make a dashboard, save a query as a report, add a chart, organize content into folders, publish a workbook, or schedule a report to go out on a cadence. Triggers on "build me a dashboard", "save this as a report", "add a chart for", "publish this workbook", "schedule this weekly", "move these into a folder", "duplicate that dashboard". To find existing content first use cube-explore-content; to check a query returns the right numbers before saving it use cube-run-query.
- License 许可
- Apache-2.0
- 最近更新
- 2026-10-01
- Stars
- ★ 4
- Forks
- 0
01 前言 Front Matter
- name
- cube-build-content
- license
- Apache-2.0
- description
- Create and update saved content in Cube — workbooks, reports, dashboards, folders and scheduled notifications — through the Cube MCP tools or the Cube CLI. Use whenever someone wants to build or change something people will look at: make a dashboard, save a query as a report, add a chart, organize content into folders, publish a workbook, or schedule a report to go out on a cadence. Triggers on "build me a dashboard", "save this as a report", "add a chart for", "publish this workbook", "schedule this weekly", "move these into a folder", "duplicate that dashboard". To find existing content first use cube-explore-content; to check a query returns the right numbers before saving it use cube-run-query.
- compatibility
- Needs the Cube MCP server (bundled in the Cube plugin, or the Cube connector) or the Cube CLI, and network access to Cube Cloud.
03 SKILL.md 正文
Build Cube content
Writes state. Reports and dashboards are what people see, so a mistake here is visible to more than the person who made it.
Choose the path
Cube MCP tools are written cube:<tool> below: the cube server this plugin
bundles. Through the Cube connector, the same tools carry the connector's name.
If the Cube MCP tools are available (this plugin's
cube server or the Cube connector), use them for workbooks, reports, dashboards and folders:
- Verify the query with
cube:runQueryfirst — seecube-run-query. cube:createWorkbook— returnsworkbookIdand aurl. Skip it when the user named a workbook to build into.cube:createReportwith thatworkbookId, one per chart. Reports take Cube SQL (sqlQuery) and achartCategory. OmitworkbookIdonly for a standalone exploration, which is what the Sheets and Excel add-ons list.cube:readWorkbook, thencube:updateDashboardto lay the reports out.cube:publishDashboard— returns the liveurl. Give it to the user.
Change an existing report in place with cube:readReport and cube:updateReport
rather than recreating it. cube:manageFolders lists and creates folders.
Scheduled notifications, duplicating a workbook, and connecting a report to an external spreadsheet are CLI-only. Use the CLI path below for those, and for everything when the MCP tools are not connected. The order of operations and conventions apply to both paths.
Preflight (CLI)
command -v cube >/dev/null || echo "Cube CLI not installed: curl -fsSL https://raw.githubusercontent.com/cube-js/cube/master/install-cli.sh | sh"
cube whoami || echo "Not authenticated. Interactive: cube login. Headless: set CUBE_API_URL + CUBE_API_KEY."
cube context list
Order of operations
Content hangs off a workbook, so build outward from one:
- Verify the query first. Run it with
cube-run-queryand confirm the numbers are right. Saving a wrong query is how a bad number gets an audience. - Create or pick a workbook.
- Add reports to it.
- Publish it as a dashboard if people need to consume it.
- Schedule it if it should arrive on a cadence.
Workbooks
cube workbooks create <deployment> --name "Revenue review"
cube workbooks update <deployment> <workbook> --name "Revenue review Q3"
cube workbooks duplicate <deployment> <workbook>
cube workbooks dashboard <deployment> <workbook> --data '<dashboard-input>'
cube workbooks publish <deployment> <workbook> # makes the dashboard
cube workbooks delete <deployment> <workbook>
Duplicating an existing workbook is usually a better starting point than creating an empty one — it inherits layout and conventions the team already uses.
Reports
cube reports create <deployment> --workbook <workbook> --name "Revenue by month" --json-query '<query>'
cube reports update <deployment> <report> --json-query '<query>'
cube reports refresh <deployment> <report>
cube reports delete <deployment> <report>
--json-query takes the same query shape cube-run-query sends to the load
endpoint — measures, dimensions, timeDimensions, filters. Take the query you
already verified rather than retyping it; retyping is where a filter goes
missing.
Complex bodies go through -d/--data, which accepts inline JSON, @file.json
or - for stdin. Dedicated flags override values in --data.
cube reports connect-workbook is for placing a report in an external
spreadsheet, not attaching it to a Cube workbook. For that workflow use:
cube reports connect-workbook <deployment> <report> --external-workbook-id <id> --result-location <range>
Folders
cube folders create <deployment> --name "Finance"
cube folders update <deployment> <folder> --name "Finance & RevOps"
cube workspace move <deployment> --type WORKBOOK|REPORT|FOLDER --id <id> --folder <folder> # omit --folder for the root
cube folders delete <deployment> <folder>
Scheduled notifications
cube notifications create <deployment> --data '{"scheduleType":"WEEKLY","dashboardPublicId":"<id>","dayOfWeek":1,"hour":9,"timezone":"Europe/London"}'
cube notifications recipients add <deployment> <notification> --data '{"recipients":[{"type":"USER","userId":<id>}]}'
cube notifications recipients list <deployment> <notification>
cube notifications update <deployment> <notification> --data '<UpdateNotificationInput JSON>'
scheduleType is HOURLY, DAILY, WEEKLY, MONTHLY or CUSTOM (with
customCron), dayOfWeek runs 0–6 from Sunday, and hour is 0–23 in
timezone. A recipient's type is USER, EMBED_USER or SLACK. For
the full body, cube spec notification --json prints the schemas.
Before changing or deleting a schedule, list its recipients and say who is currently receiving it. People notice when a report stops arriving, and they rarely connect it to a change someone made.
Conventions
- Name things the way the user said them. Do not tidy "MRR" into "Monthly Recurring Revenue" unless asked.
- Report the id of everything you create, and the URL if the output carries one. The user's next step is opening it.
- Creating is cheap and deleting is not. When a request is ambiguous between "change the existing one" and "make a new one", make a new one and say so.
When something fails
| Symptom | Cause |
|---|---|
| Report saves but shows no data | The query is wrong, not the report — verify with cube-run-query |
Member not found |
Stale member name; the model changed. Re-check with cube-explore-model |
| Publish does nothing visible | The workbook had no reports yet — add them first |
| 403 | The account can read the workspace but not write to it |
04 同仓库更多 Skills
cube-run-query
Run queries against a Cube deployment's semantic layer and interpret the results — through the Cube MCP tools when they are connected, or the Cube CLI from a terminal. Use whenever someone wants numbers out of Cube — pull a metric, check a total, compare periods, verify that a measure returns what it should, sanity-check a model change. Triggers on "how many", "what's the total", "show me revenue by month", "did that measure work", "what's our MoM growth", "pull the numbers for", and any request to verify a model change against real data. To find out what is queryable first use cube-explore-model; to change the model use cube-build-model; to save a result as a report or dashboard use cube-build-content.
cube-explore-model
Search and inspect a Cube semantic model — cubes, views, measures, dimensions, joins, and the files they live in — through the Cube MCP tools or the Cube CLI. Use whenever someone wants to know what data is available in Cube, where a metric is defined, which cube a field belongs to, how two cubes join, or what a change would affect. Triggers on "what can I query", "what measures do we have", "where is revenue defined", "show me the data model", "what's in this deployment", "which cube has customer email", and impact questions like "what breaks if I rename this". Read the model with this skill before changing it. To edit the model use cube-build-model; to run a query and get numbers back use cube-run-query; to browse workbooks, dashboards and reports use cube-explore-content.
cube-explore-content
Find and inspect saved content in a Cube workspace — workbooks, dashboards, reports, folders and scheduled notifications — using the Cube CLI, or the Cube MCP tools for content you already have a link to. Use whenever someone wants to know what already exists rather than build something new: locate a dashboard, list reports, see what a report queries, find who a notification goes to, or check what saved content references a model field before renaming it. Triggers on "what dashboards do we have", "find the revenue report", "where is that workbook", "what's in this folder", "who gets this scheduled report", "is anything using this field". To create or edit content use cube-build-content; to inspect the semantic model itself use cube-explore-model.
cube-embed
Set up and debug Cube embedded analytics — embed sessions, embed tokens, embeddable dashboards and embed tenants — using the Cube CLI. Use whenever someone is shipping Cube analytics inside their own product: mint a session for an end user, enable a dashboard for embedding, set up multi-tenant isolation so each customer sees only their data, or debug why an embedded view is empty or unauthorized. Triggers on "embed this dashboard", "embedded analytics", "our customers need to see", "multi-tenant analytics", "the iframe is blank", "embed token", "sign the embed URL", "customer-facing dashboard". For internal access control use cube-admin; for the dashboards themselves use cube-build-content.
cube-deploy
Manage Cube deployments and their lifecycle — create deployments, deploy a project, check build status, manage environments and environment variables, connect a GitHub repo, and tail logs — using the Cube CLI. Use whenever someone wants to ship, configure or debug a deployment rather than change the model inside one. Triggers on "deploy this", "did the build pass", "why did the build fail", "set an environment variable", "create a deployment", "connect our repo", "show me the logs", "what regions are available", "the deployment is down". To change model files use cube-build-model; for users and access use cube-admin.
cube-configure-agent
Inspect and tune Cube's in-product AI agent — its rules, certified queries and Agent Skills — by authoring markdown in the semantic model, through the Cube MCP tools or the Cube CLI. Use whenever someone wants the Cube agent to answer better: teach it a business definition, stop it making a recurring mistake, certify a trusted query, capture a repeatable workflow as a skill, or find out why it answered the way it did. Triggers on "the agent keeps getting X wrong", "teach the agent that", "make the agent always", "add a certified query", "create an agent skill", "why did the agent say that", "what rules does the agent have". To change the underlying model use cube-build-model; to explore what is queryable use cube-explore-model.