Omni content builder

From exploreomni/omni-agent-skills · View interactive version

Omni content builder is an AI agent skill from the GitHub repository exploreomni/omni-agent-skills. Create, update, and manage Omni Analytics documents and dashboards programmatically — document lifecycle, drafts, tiles, visualizations, filters, controls, and layouts — using the Omni CLI. Use this skill whenever someone wants to build a dashboard, create a workbook or document, add tiles or charts

How to use this skill

Skill file

Omni Content Builder

Create, update, and manage Omni documents, dashboards, and apps programmatically via the Omni CLI — document lifecycle, drafts, workbook models, filters, controls, and dashboard content.

Tip: Use omni-model-explorer to understand available fields and omni-content-explorer to find existing dashboards to modify or learn from.

Documents are created and edited through the v2 documents API (omni documents v2-*) — an explicit envelope of queryPresentations, controls, containers, and settings, edited through a draft → publish flow.

Design defaults

The mechanics here build a correct dashboard; for a good one, apply Omni's Dashboarding Best Practices. Its defaults apply when nobody has said otherwise. They never override direction you have been given: a requested layout, chart type, palette, or control placement wins; so does the convention of an existing dashboard you are editing or an org theme in force. When a request conflicts with a default, follow the request and, at most, mention the default once. The defaults: the answer top-left, 3–5 charts per page, functional color, the chart matched to the question, controls next to what they drive, a parent control for complexity, and charts that read without hovering. Each with its detail: references/design-defaults.md.

For an operational or exec dashboard, also apply references/dashboard-style.md (Building dashboards people can act on):

Known Issues & Safe Defaults

Prerequisites

# Verify the Omni CLI is installed — if not, ask the user to install it
# See: https://github.com/exploreomni/cli#readme
command -v omni >/dev/null || echo "ERROR: Omni CLI is not installed."

# Verify the CLI has the v2 documents commands — if not, ask the user to upgrade it
omni documents v2-get --help >/dev/null 2>&1 || echo "ERROR: CLI is too old for the v2 documents API — upgrade it."
# Show available profiles and select the appropriate one
omni config list
# If multiple profiles exist, ask the user which to use, then switch:
omni config use <profile-name>

# Confirm the active profile is authenticated and inspect your permissions:
omni whoami whoami

Auth: if whoami or any call returns 401, ask the user to run ! omni config login <profile>. Profile setup, when you may run the login yourself, and --schema: the **CODE3** rule.

Commands

omni documents --help              # Document operations (v2-* + lifecycle)
omni dashboards --help             # Dashboard downloads
omni models yaml-create --help     # Writing model YAML
omni documents v2-create --schema  # Body schema + example (add --depth 1 for an overview, --field PATH to drill in)

Build and edit documents with the documents v2-* commands — always. The command for each task, and the document-management commands that have no v2 form (list, discard a draft, delete, move, duplicate, downloads, layout upgrade): references/documents-v2.md.

Dashboard Architecture

Omni dashboards are built from documents. A document's v2 state is an envelope of four slices, queryPresentations, controls, containers, and settings (annotated in references/documents-v2.md):

Build queries on a topic

Build every tile's query on a topic whenever possible: set the query table to the topic's base view and pass join_paths_from_topic_name: <topic>, plus topicName: <topic> on the presentation (the presentation-level topicName is tile-specific — a standalone query has no equivalent). Joined-view fields then resolve through the topic's join map from the base view. The full shape, a worked example and how to verify it: omni-query → Build queries on a topic.

A tile not built on a topic still runs, but restricted queriers and viewers can't see it, and a Restricted Querier can't author one, so every tile you build as a Restricted Querier must be topic-based. Access Boost and raw-SQL tiles: references/queryPresentations.md.

Document Management

Create a document with documents v2-create, by name alone or with the full envelope (tiles, controls, settings) in one --body. Rename through a draft patch (--name, then publish). Delete, move, and duplicate with documents delete / move / duplicate; only published documents can be duplicated. Examples, the create-body key points, and the end-to-end build workflows: references/document-lifecycle.md.

Update Existing Dashboard

Edits go through the draft flow; the published dashboard is untouched until you publish. Read the document with omni documents v2-get <identifier> (find it first with omni-content-explorer or omni documents list), send only what changes with omni documents v2-patch-draft <identifier> --body @patch.json and a summary, and keep the returned draftIdentifier. Read the draft back with v2-get-draft and run the affected queries (see Validation Loops), iterate with v2-patch-draft-by-identifier, then publish with v2-publish-draft and share the link (see URL Patterns), or abandon the draft with discard-draft. Each step, the error map and recipes: references/updating-dashboards.md.

Updating a Dashboard's Model

Dashboard-specific fields go in the document's workbook model, which extends the shared model. First decide where a new field belongs, based on your access (omni whoami whoami --model-id <sharedModelId>): a table calculation, a branch on the shared model, or this workbook model. Never write to the schema model. A field that exists only on an unmerged branch needs a branch-bound draft. Write workbook-model YAML as the whole file read with --mode combined, sent with "mode": "combined"; a body holding only your new fields marks every field you left out as ignored. The decision steps, the yaml-create recipe, the order for building a tile on a new field, and how to verify it: references/workbook-model.md.

Dashboard Filters & Controls

Filters and interactive controls share one envelope slice: controls: {data, order}. Each entry is {config, map} — config holds the filter/control definition, map optionally scopes it per tile. Include them at create time or patch them in later (controls merge by key like tiles); a create-body example is in references/controls.md.

Model it or control it? Whether a filter belongs in the model as a filter-only field or on the dashboard as a control, including what a Restricted Querier can do: references/controls.md.

Document Settings

settings is a shallow-merged object; patch only the keys you're changing. The keys and their values: references/documents-v2.md.

Layout (containers)

The containers tree decides where tiles and controls render: a reserved "filter-bar" stack, then one page container per page, each holding a 24-column grid of tile stacks with gridPosition {x,y,w,h}. Multi-page dashboards, page switchers, grouped bands, in-tile controls, and sizing rules: references/containers.md.

URL Patterns

After creating or finding content, always give the user a direct link on the active profile's base URL (no trailing slash): /dashboards/{identifier} for a dashboard, /w/{identifier} for a workbook, /dashboards/{draftIdentifier} for a draft. Never return a literal placeholder unless credentials are unavailable and you say the URL is a template. Where each identifier comes from: references/document-lifecycle.md.

Validation Loops

Every build or update must be validated before publishing: broken tiles, bad field references, and misconfigured specs show "Chart unavailable" or "No data" with no API error.

  1. Validate the model with omni models validate <modelId>.
  2. Test every query first with omni query run, including the filters the dashboard will use.
  3. Check each viz spec: prefersChart: true, the spec under visConfig.visConfig.config, and a chartType that matches its visType and configType. For a layer-compiled spec, the extra checks are in references/layers.md.
  4. Verify the draft before publishing: read it back with v2-get-draft, run each tile's query (omni documents get-queries + omni query run), and report each tile's status and row count.

What to check in each response, the full viz-spec table, the checklist, and an optional browser check with its own waiting rules: references/validation-and-testing.md.

Dashboard Downloads

Downloads are asynchronous: omni dashboards download, poll download-status to a terminal state, then download-file. Formats, page and per-chart selection, and "Job failed to render": references/downloads.md.

Docs Reference

Omni docs pages for documents, queries and charts: references/docs-links.md.

Related Skills

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.