Show Stats Display

Show_Stats_Display renders KPI summary cards inside chat. Use it for metric rollups and compact executive summaries, not for trends, grouped comparisons, or leaderboards.

When To Use

  • Use Show_Stats_Display for short KPI grids, headline metrics, and scorecard-style summaries.

  • Use Show_Chart when the output is primarily a trend, comparison, or leaderboard.

  • Use the govtribe-chart-graphics shell skill when the output needs bespoke layout, chart annotations, or presentation polish.

Contract

  • Required top-level keys:

    • id

    • stats

  • Optional top-level keys:

    • title

    • description

    • locale

Stat Rules

  • Each item in stats must be an object with:

    • key

    • label

    • value

  • Optional per-stat keys:

    • format

    • diff

    • sparkline

  • Unsupported keys are rejected instead of ignored.

value

  • value may be either:

    • plain text

    • a numeric JSON value

  • If format.kind is number, currency, or percent, value must be a numeric JSON value, not a quoted string like "42500000" or "37%".

format

  • format is an optional strict object, not a shorthand string and not an ad hoc bag of keys.

  • Use "compact": true for large money or count values so KPI tiles stay compact, for example $2.4B, $844.4M, or 1.2K.

  • Supported shape:

  • Supported kind values:

    • text

    • number

    • currency

    • percent

  • Supported basis values for percent formatting:

    • fraction

    • unit

diff

  • diff is an optional strict object.

  • Supported shape:

  • The widget applies the sign and percent symbol automatically. Send 12.4 or -0.8, not "+12.4%".

sparkline

  • sparkline is an optional strict object.

  • Supported shape:

  • data must contain at least 2 numeric points.

Canonical Example

Surface Selection

  • Use Show_Stats_Display when the takeaway is a small set of headline metrics.

  • Use Show_Chart when the user needs a chart grammar such as a trend, comparison, or leaderboard.

  • Use govtribe-chart-graphics when the result needs bespoke graphics, multi-panel layout, or presentation-ready styling.

Last updated

Was this helpful?