mcpField
D
data-api

data-api

github.com/stahuraData & databases24193 installsUpdated 26w ago
Repository

About data-api

A skill describing data access conventions for Domo App Platform apps, with @domoinc/query as the default for dataset reads. It also documents manifest mapping and local development requirements.

Key features

  1. 01Query datasets with @domoinc/query
  2. 02Reserve SQL for exceptions
  3. 03Declare datasets in manifest.json
  4. 04Use ryuu-proxy for local API routing
  5. 05Authenticate locally with domo login

Use cases

  1. 01Implement grouped and sorted dataset queries
  2. 02Configure dataset aliases for an app
  3. 03Develop against Domo APIs locally

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/stahura/domo-ai-vibe-rules --skill data-api

After installing, type/data-apiin Claude Code to confirm it loaded.

Details

From the project README

Rule: Domo App Platform Data Access (Toolkit-First)

This rule is toolkit/query-first. Use @domoinc/query for dataset reads in apps.

Canonical Query Approach

1) Use @domoinc/query for dataset queries
yarn add @domoinc/query
import Query from '@domoinc/query';

const salesByRegion = await new Query()
  .select(['region', 'Sales_Amount'])
  .groupBy('region', { Sales_Amount: 'sum' })
  .orderBy('Sales_Amount', 'descending')
  .fetch('sales');
2) Keep SQL as exception-only

If you use SQL (SqlClient), remember it does not automatically respect page filters in dashboards.

import { SqlClient } from '@domoinc/toolkit';

const sqlClient = new SqlClient();
const result = await sqlClient.get(
  'sales',
  'SELECT region, SUM(Sales_Amount) AS total FROM sales GROUP BY region'
);
const rows = result.body.rows;

Required Manifest Wiring

Every dataset still must be declared in manifest.json under datasetsMapping.

{
  "datasetsMapping": [
    { "alias": "sales", "dataSetId": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", "fields": [] }
  ]
}

Critical gotcha:

  • fields must exist (can be []) to avoid manifest parsing errors.

Local Development

  • Use @domoinc/ryuu-proxy for local API routing.
  • Authenticate with domo login.

Checklist

  • datasetsMapping aliases configured and valid
  • Queries implemented with Query (not raw /data/v1 by default)
  • Aggregations use actual dataset field names
  • .aggregate() not used

Comments

Markdown supported