/pigment:profiling-model-performancefrom Pigment
Measures compute performance using Performance Insights tools to locate bottlenecks and verify fixes. Covers profiling slow inputs, calculations, and timeouts with tools like performance_profile_change and performance_slowest_changes.
Ships in Pigment. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Measure compute performance with the Performance Insights tools, locate the bottleneck, and verify fixes. This skill covers the tools and their output only:
skill:writing-performant-formulas; iterative horizons: skill:iterating-with-previous-and-cycles.skill:diagnosing-performance-issues.| Tool | Use when |
|---|---|
tool:get_top_blocks_by_performance | Hotspot block unknown; rank blocks app-wide over a time window |
tool:get_blocks_performance | Blocks already known; get their stats without re-ranking the model. Accepts cycle ids: a cycle id is expanded into its metrics |
tool:performance_slowest_changes | No changeId known; rank the slowest user changes of an application over a time window (maximum 7 days) |
tool:performance_profile_change | Slow action reproduced and you have its changeId (UUID) from the audit trail or a slowest-changes result; returns the execution chain with a high-level overview of scopes (counts only) |
tool:performance_profile_change_scope_details | Profile already read; you need to know which dimensions an execution has and which ones its scopes restrict, for a few executions of that change |
tool:performance_changes_statistics | changeIds known; compare aggregated timings across changes (e.g. before/after a fix) without full profiles |
tool:get_top_blocks_by_performance with range_start, range_end, top_n, and criteria: ExecutionTimeSumMs (total cost), ExecutionTimeAvgMs (typical cost), ExecutionCount (churn), CombinedCardinality (data volume, no execution history needed). To rank whole user actions instead of blocks, tool:performance_slowest_changes with applicationId, maxChangesCount, and optionally rangeStart/rangeEnd.changeId.tool:performance_profile_change with changeId, leaving includeAllExecutions omitted.skill:designing-boards-and-views), not formula work.Blocks: line to metrics and read their formulas (tool:search_metrics_and_lists with show_details: true). When the scope matters (scope-loss origin, partial scope), get the scoped dimensions of the suspect executions and their direct ancestors with tool:performance_profile_change_scope_details.changeId, re-profile, compare Duration and scope. For a quick before/after comparison, tool:performance_changes_statistics with both changeIds.includeAllExecutionsAll three change tools take this flag: optional and false by default on tool:performance_profile_change, required on tool:performance_slowest_changes and tool:performance_changes_statistics.
Never set it to true unless the user explicitly asks about all executions: omit it on tool:performance_profile_change, pass false on the two others.
false, only executions that impacted data Members were viewing when the change was made are covered, i.e. the executions that gated what Members saw refreshing.true, deliberately deferred executions are counted too, which inflates timings with work that delayed nobody.A change that comes back with no execution at all is not necessarily an empty change: re-run with true before concluding.
tool:get_top_blocks_by_performance and tool:get_blocks_performance emit the same block lines, under their own header (Top N blocks ranked by performance: / Performance summary for N block(s):):
- {block_id} ({block_type}) — cardinality={n}, executions={count}, avg_ms={avg}, sum_ms={sum}, full_executions={count}, full_avg_ms={avg}, full_sum_ms={sum}, scoped_executions_pct={pct}
| Field | Meaning |
|---|---|
executions, avg_ms, sum_ms | All executions of the block over the window, whatever their scope |
full_executions, full_avg_ms, full_sum_ms | Same stats restricted to full executions: the ones that recomputed the whole block because they ran with no scope |
scoped_executions_pct | (executions - full_executions) / executions * 100 — share of executions that ran scoped |
cycle_id, cycle_last_execution_ms | Only for a metric in a cycle: the cycle and the duration of its last whole execution. The metric's own avg_ms/sum_ms cover only its share of the cycle executions, so compare it to cycle_last_execution_ms to see how much of the cycle it costs. To break a cycle down, pass the cycle id to tool:get_blocks_performance |
Missing stats → widen the time window or switch criteria. Then profile a change on the suspect block.
Always analyze on the all-executions fields (executions, avg_ms, sum_ms) unless the user explicitly asks about full executions. They are the real cost of the block. The full-executions fields exist only to compute scoped_executions_pct; never report full_sum_ms as the block's cost.
scoped_executions_pct (scope-loss signal)A low scoped_executions_pct means the block is almost always recomputed in full, i.e. it is usually executed unscoped. Before concluding, compare it against the other blocks of the same run:
| Situation | Read | Action |
|---|---|---|
| Low on a minority of blocks, the rest healthy | Those blocks' own formulas lose the scope | Strong remodeling candidate: inspect the formula; see skill:writing-performant-formulas |
| Low on the majority of blocks | The user actions themselves were unscoped, not the formulas | Do not recommend formula work on that basis; look at what triggers the recomputes (imports, full data loads, structural changes) |
This is a triage signal, not a diagnosis: confirm with tool:performance_profile_change on a change touching the block (first no scope, full computation in the chain) before recommending a remodeling.
Both tools return one entry per change with aggregated timings over the covered executions:
| Field | Meaning |
|---|---|
durationMs | Wall-clock time of the change, from the user action to the end of the last covered execution |
sumExecutionTimesMs | Total compute time |
sumContentionTimesMs | Total queue wait (previous tentative execution times counted as contention) |
executionsCount | Number of covered executions |
averageExecutionTimeMs / medianExecutionTimeMs / maxExecutionTimeMs | Distribution of the covered execution times |
tool:performance_slowest_changes also returns date; to identify the user action behind a change, look up its changeId in the audit trail.
Rank and report by durationMs unless the user asks about total compute. Changes without any profiled execution are omitted from statistics. Profile the retained change with tool:performance_profile_change before recommending formula work.
Change profiled successfully. N execution(s) found, covering {all executions|only executions that impacted data Members were viewing}.
Executions:
1. **{jobType}**
- Id: {uuid}
- Blocks: Metric(`uuid`), ...
- Dimensions: {count}
- Ready at: Xms, Executed at: Yms, Duration: Zms
- Effective scope: {text}
- Output scope: {text}
- Impacted data Members were viewing: yes|no ← only with includeAllExecutions=true
- Contention while impacting data Members were viewing: {n}ms ← optional
- Depends on: uuid, ... ← optional
The profile is a high-level overview of the scope: to keep it small on big changes, it only counts the dimensions of each execution and the dimensions its scopes restrict. It never says which dimensions they are, nor how many items each is restricted to. For that, see Read Scope Details Output.
| Field | Meaning | Tell the user |
|---|---|---|
| Ready at | Wait for dependencies | Ready at |
| Executed at | Ready + queue contention | Executed at |
| Duration | Compute time | Duration |
| Effective scope | Scope used | Effective scope |
| Output scope | Scope passed downstream | Output scope |
| Impacted data Members were viewing | Recomputed (directly or indirectly) data a Member was viewing at change time | Impacted viewed data |
| Contention while impacting data Members were viewing | Tail of the wait that delayed what Members saw; the rest of the wait was deferrable | Contention while impacting viewed data |
| Depends on | Upstream execution IDs | Dependencies |
Block labels: Metric(...), List(...), Table(...), Cycle(...), Block(app:...).
Scope text:
| Text | Meaning |
|---|---|
no change | No cells written |
no scope, full computation | Full recompute (X = 0) |
X scoped dimension(s) | X dimensions restricted to a subset of their items |
Dimensions: lineEffective scope:| Effective | Output | Interpretation |
|---|---|---|
N scoped dimension(s) | Same count | Scope preserved, as far as counts tell |
N scoped dimension(s) | Higher count | Scope introduced downstream |
| any | no change | Ran, no output (still check Duration) |
no scope, full computation | — | Scope-loss origin candidate |
The first no scope, full computation in the chain is the scope-loss origin: inspect that block's formula.
Counts cannot tell two different dimension sets apart: equal counts on consecutive executions do not prove the same dimensions stayed scoped, and a partial X/Y does not say which dimension lost its scope. Whenever the conclusion depends on which dimensions are scoped, check with tool:performance_profile_change_scope_details before reporting.
tool:performance_profile_change_scope_details takes the changeId and the executionIds (at most 100) to inspect, as listed on the Id: lines of the profile. It returns the dimensions and scopes of those executions in full:
Scope details of N execution(s):
- Execution `{uuid}`
- Dimensions: uuid1, uuid2, ... | none
- Effective scope: {text}
- Output scope: {text}
Scope text is no change, no scope, full computation, or dim:uuid (N modalities), ...: one entry per scoped dimension, restricted to N items. Dimensions of Dimensions: missing from Effective scope: are the unscoped ones (Y − X).
dim:uuid (unknown modalities count) means the dimension is scoped but its item count was not recorded. It still counts as scoped in X/Y. Never report it as a full computation, and never guess the count: say it is unknown.
Depends on:), or the few steps whose X/Y you report. Do not request every execution of a big change.includeAllExecutions=false, every listed execution gated what Members saw refreshing, so work through them by Duration. With true, focus first on executions with Impacted data Members were viewing: yes, then the others. no executions are deliberately deferred, so their extra contention alone is not a defect.Contention while impacting data Members were viewing is the tail of that same wait, ending when the execution ran; the earlier part elapsed while the execution could still be deferred. The line appears only for executions that ended up impacting viewed data. Compare it against the whole contention:
includeAllExecutions=true, the execution never impacted viewed data: its whole wait was deferrable and is not a defect on its own. With the default false, it simply never waited while impacting viewed data.Depends on UUIDs to upstream Id: lines; ancestors appear earlier in the list. A Depends on UUID with no matching Id: is an ancestor that was not covered (deferrable, or hidden by permissions), not a broken chain.| Pattern | Signature | Action |
|---|---|---|
| Cascading scope loss | Scoped runs, then a first no scope, full computation, rest full or no change | Fix the scope-loss origin's formula |
| No change, high Duration | Output scope: no change and Duration > 500 ms | Scope the formula earlier |
| High contention | Executed at ≫ Ready at on many rows | Broad scope or too many parallel branches |
| Late execution impacting viewed data | Impacted data Members were viewing: yes, Executed at ≫ Ready at, and contention while impacting viewed data far below the contention | Explain the late pickup (a Member opened something depending on it mid-change); do not chase that block's formula |
On top of the findings structure in skill:diagnosing-performance-issues, include: execution count, what the profile covered (executions that impacted viewed data, or all of them), approximate wall time, a note that results are filtered by the caller's permissions, the chain with natural block names, X/Y per step, and the scope-loss origin, naming the dimension that lost its scope when checked with tool:performance_profile_change_scope_details. When a step impacted viewed data only for the tail of its wait, say why it appears late in the timeline rather than presenting it as a slow step.
Vocabulary: say ready at, executed at, duration, scope, dependency, impacted viewed data, contention while impacting viewed data. Never say executionId, timeScheduleMs, effectiveScope, effectiveScopedDimensionsCount, clauses, criteria, impactedViewedData, timeContentionWhileImpactingViewedDataMs.
What SKILL.md sets; muted values are Claude Code's defaults
39 skills in this plugin
/aggregating-view-dataExecution skill. Use when a View needs totals or subtotals, when a value must roll up with something other than Sum (average, min, max, count, last), when a snapshot metric adds up across time instead of holding, or when a ratio, percentage, margin, growth or variance metric is added to a Table View or shows a wrong total (e.g. a row for margin as a percent of revenue). Covers metric default aggregators, pivot versus hidden-dimension aggregation, the aggregator reference per value type, and Advanced Aggregators on Table Views./architecting-multi-application-solutionsPlanning skill. Use when deciding how to split work across Pigment applications, designing Hub-and-spoke data flows, or planning Test & Deploy across environments./auditing-a-pigment-applicationExecution skill. Use when auditing, reviewing, or health-checking a Pigment application. Covers the structured audit checklist, severity classification, and output format. Also triggers on requests to clean up, find unused blocks, assess model quality, or find what is wrong with an application./building-a-full-applicationPlanning skill. Use when building a complete Pigment application from scratch or when the request spans multiple modeling phases. This skill, together with any other planning skill the request calls for, is sufficient to produce the full architecture spec; do not load execution skills until the spec is approved and you begin building blocks./building-pigment-framesUse this skill whenever you're building, updating, or troubleshooting a Pigment Frame — a full-page, custom-coded visualisation (JavaScript, canvas, or inline SVG) that reads Pigment data through the PigmentSDK. Reach for it any time a native View (Grid, Chart, KPI) or Board can't produce what's being asked for - a bespoke chart, a custom canvas drawing, an interactive widget, or a standalone page in the left navigation that behaves like a small app. Also use it if a Frame you've already built shows up blank or broken and needs debugging./building-versions-and-planning-cyclesExecution skill. Use when implementing versions, planning cycles, or actuals vs forecast separation, and whenever realized data is extended into a plan or budget — loading actuals then planning the remaining periods, forecasting forward from actuals, Actual/Budget/Plan layering, plan vs actual variance — even when the request never uses the word version. Covers Version Dimensions, Switchover patterns, Actual/Forecast layering, Native Scenarios, and Snapshots.npx claudepluginhub gopigment/ai-plugins --plugin pigmentOther plugins' skills for the same job