.agents/skills/metrics/SKILL.md
Compute statistical metrics on table data
npx skillsauth add starlake-ai/starlake-skills metricsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Computes statistical metrics on a table's data. Metrics are based on the metric type defined on each attribute: continuous for numeric columns (min, max, mean, stddev, etc.) and discrete for categorical columns (distinct count, frequency distribution).
starlake metrics [options]
--domain <value>: Domain name (required)--schema <value>: Table/schema name (required)--authInfo k1=v1,k2=v2: Auth info for the connection (e.g. gcpProjectId=my-project)--reportFormat <value>: Report output format: console, json, or htmlMetrics are configured per attribute in table YAML files:
# In table.sl.yml
table:
attributes:
- name: "total_amount"
type: "decimal"
metric: "continuous" # min, max, mean, median, variance, stddev, percentiles
- name: "status"
type: "string"
metric: "discrete" # count distinct, category frequency
- name: "order_id"
type: "long"
# No metric - not computed
| Metric Type | Computed Values |
|---|---|
| continuous | min, max, sum, mean, median, variance, stddev, skewness, kurtosis, 25th/75th percentiles, missing values, row count |
| discrete | count distinct, category frequency, top categories, row count |
# metadata/application.sl.yml
application:
metrics:
active: true
discreteMaxCardinality: 10 # Max distinct values for discrete metrics
path: "{{SL_ROOT}}/metrics" # Custom metrics output path
Metrics are stored in the SL_METRICS audit table for historical tracking and analysis. This enables:
starlake metrics --domain starbake --schema orders
starlake metrics --domain starbake --schema orders --authInfo gcpProjectId=my-gcp-project
starlake metrics --domain starbake --schema products --reportFormat json
development
Design SQL transformations for data pipelines with quality checks and dependency management. Use when the user says "design transforms" or "create SQL transformations".
devops
Plan and track sprint progress for data pipeline implementation. Use when the user says "sprint planning" or "plan data sprint".
testing
Analyze data sources in depth: schema, quality, volume, and extraction strategy. Use when the user says "analyze data source" or "profile this data source".
data-ai
Design Starlake-compatible table schemas with types, constraints, privacy, and expectations. Use when the user says "design schema" or "create table definition".