Use when expanding/flattening coralogix_dashboard variables_v2, or editing static values[].label defaults. Build typed SDK VariableV2 structs from flat TF models; wrap value/label, promql, dataprime, scope, and spans shapes.
66
78%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
Fix and improve this skill with Tessl
tessl review fix ./.claude/skills/dashboard-variables-v2-wire-shape/SKILL.mdvariables_v2 wire shapeTrigger: Editing variables_v2 expand/flatten (variables_v2.go) or static values[].label schema/plan modifier (dashboard_schema/variables_v2.go).
Fix: Keep Terraform UX flat, then build typed SDK models (not map[string]any JSON):
SingleStringValue{Value: &StringValueLabel{...}} (same for regex/lucene/interval/numeric)id string ↔ UUID{Value: ...} via ExpandDashboardUUIDquery string ↔ PromQlQuery{Value: ...} via ExpandPromqlQueryquery string ↔ CommonDataprimeQuery{Text: ...}scope short name ↔ DATASET_SCOPE_* via existing enum mapsvalue = { type, value } ↔ SpanField via ExpandSpansField / FlattenSpansField{type, selected_values} ↔ {equals|notEquals: {selection: {list: ...}}}label_filters → omit/nil (avoid null↔[] drift)value_display_options: schema AtLeastOneOfChildren rejects {} (Framework cannot plan null when config keeps the block; omit the block or set a regex)multi_string.list.values → flatten known empty list, not null (values is Required)display_type, order, refresh, data_mode) → OptionalEnumPointer (never pointer-to-empty)VariableV2 id/name/display_name/display_type/source/value, static/query all_option + values_order_direction, ValueLabel value/label, AllOption.include_all, logs FieldValue.observation_field, metrics LabelValue.label_name) are non-pointer SDK values — expand with requiredEnumValue / derefOrZero / ValueString(), flatten by address (&variable.Source) and types.StringValue / types.BoolValue. TF schema stays Optional+Computed+Default where already defaulted; do not re-mark schema Required just because the Go type lost *.values[].label: Optional+Computed + StaticValueLabelFromValue (omit → plan=value). Flatten always stores API label (incl. label==value). Never UseStateForUnknown — needed for omit→set→omit and omit→value-change. Expand still copies value if label null/unknown.
On flatten, fill missing oneof siblings as null from schema AttrTypes (API omits unset arms).Why: OpenAPI types nest wrappers and proto enums; flat TF fields must be wrapped into typed SDK structs or the API returns 400 / ObjectValueFrom fails. Label defaults via plan (not flatten-to-null) so omit, custom, explicit label=value, and value changes all round-trip without drift.
d49bc4c
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.