跳至正文
OpenAgentSkill
浏览已开放 · 目录记录日期 2026-11-21 · 自动更新和账户服务暂时关闭。
浏览器与自动化

dashboards

Use when creating or extending Costory dashboards, generating interesting FinOps overviews (suggest_groupby + suggest_usage_metrics + text widgets), adding or replacing widgets, copying widgets between dashboards, editing dashboardContext (global filter / period / groupBy) via update_dashboard, or applying shared-context inheritance for period, groupBy, metric, currency, and CEL filters. Call get_skill with skillId \"dashboards\" before create_dashboard or update_dashboard.

costory-io · 已有静态检查记录

安装与使用

运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。

npx skills add costory-io/costory-finops-mcp-skills --skill dashboards

技能说明


name: dashboards description: "Use when creating or extending Costory dashboards, generating interesting FinOps overviews (suggest_groupby + suggest_usage_metrics + text widgets), adding or replacing widgets, copying widgets between dashboards, editing dashboardContext (global filter / period / groupBy) via update_dashboard, or applying shared-context inheritance for period, groupBy, metric, currency, and CEL filters. Call get_skill with skillId "dashboards" before create_dashboard or update_dashboard."

Dashboards

A DashboardV2 has a shared dashboardContext input (global theme) and widgets that inherit it by default. Each widget is either a chart (Advanced Explorer queries + chartType) or a text block (type: "text", textContent).

Context-first rule: define the full dashboardContext before listing widgets. Widgets should contain only overrides — never duplicate what already lives in dashboardContext. If two or more widgets share the same period, groupBy, metric, currency, or filter scope, extract that shared value to dashboardContext first.

Temporary compatibility: the deprecated top-level context alias is accepted during migration, but always generate dashboardContext. Never send both.

When to Trigger

  • Creating a new Costory dashboard
  • Generating an interesting overview when the user has not specified every widget (use How to generate interesting dashboards below)
  • Adding, replacing, or removing widgets on an existing dashboard
  • Editing dashboardContext (global filter, period, groupBy, metric, currency) without recreating
  • Copying a widget to another dashboard
  • User asks for a cost overview "by service / by region" style dashboard

Dashboard dashboardContext fields

FieldRoleWidget inheritance
metricIdDefault cost column (e.g. "cost")Cost widgets omit metricId to inherit
currencyUSD, EUR, GBP, CNYCost widgets omit currency to inherit
groupByDefault split dimension — use when most widgets share the same axisCost widgets omit groupBy to inherit (or set null explicitly for totals)
datePreset or startDate/endDateDashboard period — required when chart widgets are present (text-only dashboards may omit). Prefer datePreset whenever an available preset matches the requested rangeWidgets omit from/to/datePreset to inherit
conditionsCelDashboard-wide CEL filter (scope)AND-merged into every cost widget by default
scopeIdOptional saved scopeInherited like other context fields

Each query still needs "type": "cost" (query kind — not inherited). What you omit on cost widgets is metricId, currency, groupBy, and period when they match dashboardContext.

Inheritance semantics

  • Period, metricId, currency, groupBy: omit on widgets when they match dashboardContext.
  • Similarity rule: when widgets or dashboards are very similar, identify the common datePreset/dates, groupBy, metricId, currency, and conditionsCel before writing widgets. Put common values in dashboardContext; widget fields are for exceptions only.
  • groupBy: omit the field to inherit dashboardContext.groupBy; set groupBy: null to explicitly disable grouping for that widget.
  • Period presets: if the user's range maps to an available DatePreset (for example TRAILING_30_DAYS, TRAILING_90_DAYS, LAST_MONTH, YTD), use dashboardContext.datePreset. Use startDate/endDate only for truly custom ranges.
  • conditionsCel: inherited by default. Every cost widget AND-merges dashboard conditionsCel with its own filterCel.
  • extendDashboardConditions: defaults to true (inherit dashboard filter). Set false only when the widget must ignore the dashboard filter entirely.
  • Widget filterCel: widget-specific scope only — do not put the dashboard-wide filter here; put it in dashboardContext.conditionsCel.

Widget types

Two top-level widget kinds in create_dashboard / update_dashboard:

KindHow to identifyRequired fields
Chartomit type, or "type": "chart"title, queries (each with type + name), usually aggBy
Text"type": "text"title, textContent (markdown or plain text)

Chart widget — queries[].chartType

Set chartType on each series (cost / metric / usage / formula / budget / externalMetric). Omit → LINE. Primary series for sizing = first non-formula query (else first query).

chartTypeUse whenTypical aggByNotes
BARCategorical / stacked spend over timeDay / Week / MonthDefault for breakdowns ("by service", "by region")
LINETrends / continuous evolutionDay / Week / MonthMCP default if chartType omitted
AREAFilled trend (e.g. budget vs spend)Day / Week / MonthBudget queries often default to AREA in the product
TABLETabular breakdown / many groupsanyNeeds more grid space; also a valid compare.chartType
WATERFALLRare as a series chartType—Prefer enabling comparison via widget compare (default comparison render is WATERFALL)

Donut (composition for one period): there is no separate DONUT enum. Use chartType: "BAR" + widget aggBy: "Period" (and a groupBy). That is the product donut.

Time series vs period comparison

These are different modes — pick one per widget based on the question.

ModeWhat it answersHow to configurePrefer when the user asks…
Time seriesHow cost (or a metric) evolves within one periodNo compare. Series chartType: BAR / LINE / AREA. aggBy: Day / Week / Month"trend",
阅读完整来源 ↗