/atlanai-analytics:metrics-generationfrom Atlan Analytics
Builds, tests, edits, and saves metrics and SQL queries from dashboards, BI files, models, or query history. For refreshing, fixing, proposing, or publishing metrics.
Ships in Atlan Analytics. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
A capability. It turns surveyed sources into metric and sql_query definitions, checks
them, changes them, and saves them on this machine or to Atlan Trident. The engine lives in this
skill's modules/metrics/; the plugin drives the conversation and Atlan Trident publication. A
person can call it directly; analytics-demo, analytics-build and analytics-ask call it.
Read shared conventions first: task authorization, privacy, read-only SQL and status reporting apply.
A helper or ENGINE result with show_first carries a chip or card the build has reached: show it
before any other words or call, and do what its side view line says. It is the update on that
step: add no words of your own about it. Run each helper command on its own and read all it
returns: a script or filter of yours drops its chip. Between calls, write nothing of your own: no working notes, no line about a card before or after it, and never a file path or a step's, gate's or helper's own name.
Paths:
<metrics-dir> is this skill's directory (${CLAUDE_PLUGIN_ROOT}/skills/metrics-generation
in Claude Code). ENGINE means python3 "<metrics-dir>/scripts/analytics_agent.py" metrics --runtime <runtime>.<build-dir> is the analytics-build skill's directory beside it. It holds the shared
helpers: PROJECT is <build-dir>/scripts/project.py and CONTEXT is
<build-dir>/scripts/context_contracts.py. EDIT is
python3 "<build-dir>/../analytics-demo/scripts/edit_metric.py" --run-dir "<run>".This skill needs the complete Analytics plugin, including its sibling analytics-build
skill. A standalone download that misses either cannot initialize the engine; refresh the
plugin when the dispatcher reports missing module files.
generate ("Which dashboard, file or past queries should I build from?"), the
metric for edit ("Which metric should I change?"), the destination for save ("Keep these
on this machine, or save them to Atlan Trident?"). Then show the definition and its check status
and stop.Every operation needs a survey. With none in the run, run source-survey inventory first.
| Operation or argument | Does | Procedure |
|---|---|---|
generate, or metrics with a scope | Authors the selected metrics and what they depend on, with every surveyed source as context | The metrics workflow and the metrics module |
check | Runs each definition on the data and records what passed, what is untested and what is held | Build and check, section 4 |
edit | Changes one definition's rule, re-checks it and returns the difference | Below |
save | Keeps definitions on this machine or publishes them to a workspace, or moves saved ones to another workspace | Publication, contracts; a move is publication step 6 |
dashboard | A Power BI or Tableau dashboard to metrics | Dashboard through the metrics module; a saved dashboard-helper job uses legacy readback |
propose | A metric gap or correction from this conversation, for its owners | The proposal workflow; no metric save |
generate: scan everything, then buildRead every surveyed source before authoring any metric. The engine sees the whole survey even when the selection is two names, so a source read later cannot contradict a formula written earlier. Author the selected names and their dependencies, through the complete collection's gates in one run; do not author the rest of the survey unasked.
All sources use the one engine: demos, local files, dashboards and query history. Models and
BI files need no warehouse; query-log filtering and CONTEXT are permitted. Do not create a
second authoring path because an executor is missing; mark SQL untested and keep the work.
Effective compiler-review failures become structured publication holds; never bypass them.
edit: change a rule| The definition is | Do |
|---|---|
| In this run, not yet published | Write {"name", "changes": [{"path", "value"}], "before", "after"} (each rule in plain words; a path is a field of the metric's or saved query's definition in the run's context/metrics.json or context/queries.json, such as formula, source.sql, mandatory_filters or a query's sql, or its description) to a file outside the run and run EDIT <that file>: it changes the definition, re-checks it and hands over the edit card in show_first, which says the change. On a warehouse it returns run_on_warehouse with sql: run that with the warehouse tool, then EDIT a file holding the metric's name and result (the rows, or {"error": ...}), and the card comes then. Without a card, return "Changed ." then "Before: · " and "After: · " |
| Published, and the person owns the run that made it | The same, then one native question, "Save this change to Atlan Trident too?" (Save it (Recommended), Keep it on this machine), its text holding the edit card's lines in a terminal; on yes, save as a revision of the same metric, never a new one |
| Published by someone else, or the request came from an answer | propose: a proposal for its owners. It never saves |
Keep the metric's identity through an edit. If reconciliation changes a definition or a count, say which and show its check status again: " already had , so I'm using that definition. Its test: ." (reconciliation).
save: this machine or AtlanTrident writes use the Atlan MCP connection with the person's sign-in. If Trident tools are missing or sign-in is required, follow connection recovery and resume the save.
Return to the caller, or show the person, for each definition this request made or changed:
": . Counts . From
Never expose credentials or identifying query literals. Keep eval answers and gold outside all metric-generation context.
Before sending: the first sentence is the result; one next step, not a menu; no apology, no closing offer; commas and full stops, no em dashes or exclamation marks.
agents/openai.yaml (opens in a new tab)modules/__init__.py (opens in a new tab)modules/metrics/__init__.py (opens in a new tab)modules/metrics/contracts/README.md (opens in a new tab)modules/metrics/contracts/metric-definition.schema.json (opens in a new tab)modules/metrics/contracts/sql-query-definition.schema.json (opens in a new tab)modules/metrics/driver.py (opens in a new tab)modules/metrics/engine/AGENT_GUARDRAILS.md (opens in a new tab)modules/metrics/engine/LICENSE (opens in a new tab)modules/metrics/engine/PIPELINE.md (opens in a new tab)modules/metrics/engine/README.md (opens in a new tab)modules/metrics/engine/constraints.txt (opens in a new tab)modules/metrics/engine/docs/guides/CARD_CONTRACT.md (opens in a new tab)modules/metrics/engine/docs/guides/customer-access.md (opens in a new tab)modules/metrics/engine/docs/guides/power-bi-service-inputs.md (opens in a new tab)modules/metrics/engine/examples/plugs/postgres-direct/README.md (opens in a new tab)modules/metrics/engine/examples/plugs/postgres-direct/pyproject.toml (opens in a new tab)modules/metrics/engine/examples/plugs/postgres-direct/src/metrics_agent_postgres/__init__.py (opens in a new tab)modules/metrics/engine/gates/author-metric-card/GATE.md (opens in a new tab)modules/metrics/engine/gates/author-metric-card/references/reading-sql.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub atlanai/atlan-plugins --plugin atlanai-analytics7 skills in this plugin
/accuracy-checkAtlan Analytics: test your agent on an eval set, a list of questions with known answers, score it and explain each wrong answer. Use when asked to test or score accuracy, or to show a question of a check. Not for writing evals (eval-generation)./analytics-askAtlan Analytics: answer data questions from metrics and saved queries in Atlan Trident, or a setup kept on this machine. Use for totals, rates, trends, breakdowns and follow-ups. Not for setup or writing metrics (analytics-build, metrics-generation)./analytics-buildAtlan Analytics: set up, resume or hand off metrics on your data. Use for metrics in .atlan-analytics/: a metric's details, SQL or checks, what's ready, saving, a new workspace, or questions on a folder's dashboards. Not for a demo (analytics-demo)./analytics-demoGuided Atlan Analytics demo on made-up data: build an agent for a sample firm, save its metrics, ask it, then build a dashboard. Use when someone wants to try, see or learn Atlan Analytics. Not for their own data (analytics-build)./eval-generationAtlan Analytics: write an eval set to test your agent, 20 questions your team already asks, each with a known answer, kept here or saved to Atlan Trident. Use when asked to build evals or golden questions. Not for metrics (metrics-generation)./source-surveyAtlan Analytics: see what a warehouse, folder or dashboard holds: connections, key tables, what a source covers, metric names. Use when asked what data exists, which tables to use, or if a source works. Not for building metrics (metrics-generation).Other plugins' skills for the same job