Loading...
Loading...
Wire a semantic layer into a nao agent so that metric queries are routed through a single source of truth. Supports dbt MetricFlow (dbt Cloud with Semantic Layer), Snowflake (views or semantic views via MCP), an in-house nao YAML semantic layer, or other tools (via MCP discovery). Installs the right MCP server, updates RULES.md to route metric queries through the semantic layer, and (for the nao YAML option) generates starter metric files. Use after a first round of tests has shown the agent struggling with metric reliability. Do not use for raw rule writing (write-context-rules) or first-time setup (setup-context).
npx skill4agent add getnao/nao add-semantic-layernao testRULES.mdquery_metric(...)| Option | Type | When |
|---|---|---|
| dbt MetricFlow | Metric store | Already running dbt Cloud with the Semantic Layer enabled. |
| Snowflake views / semantic | Semantic layer | Snowflake; using curated views or native semantic views. |
| nao semantic files | Semantic layer | No existing layer. Want a lightweight in-repo YAML. |
| Other | Varies | Looker/LookML, Cube, AtScale, etc. |
.claude/mcp.json{
"mcpServers": {
"dbt-mcp": {
"command": "uvx",
"args": ["dbt-mcp"],
"env": {
"DBT_HOST": "us1.dbt.com",
"MULTICELL_ACCOUNT_PREFIX": "your_prefix",
"DBT_TOKEN": "${DBT_TOKEN}",
"DBT_PROD_ENV_ID": "your_env_id",
"DISABLE_SEMANTIC_LAYER": "false",
"DISABLE_DISCOVERY": "true",
"DISABLE_SQL": "true",
"DISABLE_ADMIN_API": "true",
"DISABLE_REMOTE": "false"
}
}
}
}MULTICELL_ACCOUNT_PREFIXDBT_PROD_ENV_IDDBT_HOSTDBT_TOKENlist_metricsdbt Core (local-only) is not supported here — no metric-store API to route through.
write-context-rules## Key Metrics Referencequery_metricMRR → query via dbt MCP query_metric (semantic layer)## Analysis Process{
"mcpServers": {
"snowflake": {
"command": "uvx",
"args": ["mcp-server-snowflake"],
"env": {
"SNOWFLAKE_ACCOUNT": "your_account",
"SNOWFLAKE_USER": "your_user",
"SNOWFLAKE_PASSWORD": "${SNOWFLAKE_PASSWORD}",
"SNOWFLAKE_WAREHOUSE": "your_warehouse",
"SNOWFLAKE_DATABASE": "your_database",
"SNOWFLAKE_SCHEMA": "your_schema",
"SNOWFLAKE_ROLE": "your_role"
}
}
}
}SEMANTIC_VIEWanalytics.metrics.*write-context-rules## Key Metrics Referencesemantics/semantic.yamltemplates/semantic.yamlnametypedescriptionvaluesnamedefinitiontablecolumnaggregationgraindimensionsfilterswrite-context-rules## Key Metrics Referencesemantics/semantic.yamlRULES.mdnao chatnao testcreate-context-testsaudit-contextwrite-context-rulesRULES.mdwrite-context-rules.claude/mcp.json${ENV_VAR}.gitignoretemplates/semantic.yaml