Formatting And Highlighting

作者 gopigment6fec49f4ce9d无许可证22 个星标收录于 2026年10月8日更新于 2026年10月8日仓库2天前更新

Execution skill. Use when applying metric default formatting — decimals, prefix, suffix, currency ($/€), percent (%), K/M/bp/thousand/million scaling, thousand separator, sign / zero / negative handling, text mode (Text / Rich Text / URL / Image / LocaleDateTime), boolean display (checkbox / button). Load it when creating a metric whose values are not plain counts -- a ratio, percentage, growth, currency, boolean or text metric (comments, notes, links, URLs) -- even if the user said nothing about formatting.

仅含说明Data & Analytics
AI 生成的概览

通过 create_metric 和 update_metric 工具为指标设置默认的数字、文本和布尔格式。

功能
该技能指导智能体在创建和更新指标的调用中设置 defaultFormat 字段,涵盖小数位、前缀、后缀、货币、百分比、缩放、千位分隔符、符号处理、文本显示模式和布尔显示模式。它提供基于指标名称和数据类型的推断规则,并给出百分比、货币、人数、布尔和富文本指标的 JSON 示例。它还说明条件格式仅限界面操作,静态单元格高亮属于另一个技能。
适用场景
适用于创建或更新取值不是简单计数的指标时,例如比率、百分比、增长率、货币、布尔或文本指标。对于不涉及默认格式的更新调用,以及视图显示模式、聚合器、排序或筛选,应跳过此技能。
运行要求
无需脚本或软件包,仅为说明性内容。它假定可以访问 create_metric 和 update_metric 工具及其 defaultFormat 字段。

Formatting and Highlighting

Set formatting on tool:create_metric / tool:update_metric via the defaultFormat field. A metric's default format applies to every View, Board, KPI, Grid, and Chart that displays it.

Skip this skill for tool:update_metric calls that don't touch default format (renaming, changing dimensions, editing description).

Out of scope: view display modes, aggregators, sort, filter; conditional formatting (UI-only); static cell formatting (background/text color, bold, italic, alignment) -- use skill:designing-boards-and-views (tool:update_view_formatting).

Critical Rules

  • Set formatting on the metric, not on the view. Views have no number-formatting tools.
  • numberFormatOptions is required inside default format. Pass {} if you only set textFormatOptions or booleanFormatOptions.
  • Omitting a field leaves it unset. There is no way to clear an individual field.
  • Modeler context overrides inference. If the modeler states a preference ("use 0 decimals", "prefix all financial metrics with €"), apply it consistently for the session and skip name-based rules below.
  • multiplier is numeric, not a string alias. Use 100 for percent, 0.001 for thousands, 0.000001 for millions, 10000 for basis points.
  • multiplierSuffix is only ever "%" or "bp". Any other scale marker -- a thousand / million / billion letter, in any case -- goes in suffix.
  • If the metric is about a ratio, assume the user will most likely prefer it formatted as a percentage and not as a pure ratio, and set multiplier and multiplierSuffix as if dealing with percentages. Our terminology deviates from the statistical one: a metric named like a ratio (e.g. Revenue / COGS Ratio) is a percentage here, even though the literal reading would be a plain quotient.
  • prefix / suffix are independent of multiplier / multiplierSuffix and stack on either side of the value.
  • For textual metrics, set textDisplayMode -- always use RichText for comment, note, description, report, URL, link; otherwise use Text.

Inference from Metric Name

Contains %, Rate, Ratio, Margin, Growth, Share, Yield, Efficiency: multiplier: 100, multiplierSuffix: "%", numFractionDigits: 1 (use 2 if name implies precision, e.g. Margin %).

Contains Revenue, Cost, Spend, Budget, Price, ARR, MRR, LTV, CAC, Salary, Fee, Expense, Income: prefix: "$" (or the currency the modeler specified). Consider multiplier: 0.000001 + suffix: "M" or multiplier: 0.001 + suffix: "K" when context implies scale.

Contains Headcount, Count, Number of, #, Units, Quantity, FTE: numFractionDigits: 0, no multiplier.

Contains bp, Basis Point: multiplier: 10000, multiplierSuffix: "bp".

Friendly name ends with ($): prefix: "$".

Friendly name ends with (%): multiplier: 100, multiplierSuffix: "%".

Type-Based Defaults

  • Integer: numFractionDigits: 0
  • Number: numFractionDigits: 0 (raise to 1 or 2 when name/formula implies fractional precision: rates, ratios, averages, unit prices)
  • Boolean: booleanDisplayMode: "Checkbox"
  • Text: always use textDisplayMode: "RichText" for comment, note, description, report, URL, link; otherwise textDisplayMode: "Text"

Examples

Percentage or ratio metric:

json
{  "numberFormatOptions": {    "multiplier": 100,    "multiplierSuffix": "%",    "numFractionDigits": 1  }}

Currency metric in millions:

json
{  "numberFormatOptions": {    "prefix": "$",    "multiplier": 0.000001,    "suffix": "M",    "numFractionDigits": 1  }}

Headcount:

json
{  "numberFormatOptions": {    "numFractionDigits": 0  }}

Boolean gate:

json
{  "numberFormatOptions": {},  "booleanFormatOptions": {    "booleanDisplayMode": "Checkbox"  }}

Rich text note:

json
{  "numberFormatOptions": {},  "textFormatOptions": {    "textDisplayMode": "RichText"  }}

Conditional Formatting & Highlighting

Conditional formatting rules are UI-only: the agent cannot apply them. Static cell highlighting is available via tool:update_view_formatting (skill:designing-boards-and-views).

来源与署名

来源:gopigment/ai-plugins位于skills/formatting-and-highlighting提交6fec49f

许可证: 无许可证

内容归原作者所有。SourceWeft 从公开仓库中收录这些内容。

举报或申请下架