core/selector-tracing

Diagnose Store selector performance using traceSelectors aggregates, cache metrics, and lifetime summaries.

6|6|Updated Jun 29, 2026
One-click install
npx skills add https://github.com/intent-hq/cloudlands-fe --skill core-selector-tracing-intent-hq
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: core/selector-tracing
Source: https://github.com/intent-hq/cloudlands-fe/tree/main/.agents/skills/themis/core/selector-tracing
Command: npx skills add https://github.com/intent-hq/cloudlands-fe --skill core-selector-tracing-intent-hq

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When a Store-based application recomputes selectors too often or runs slowly, developers lack visibility into why. This Skill guides agents through enabling and interpreting the opt-in selector tracing diagnostics of the themis Store families, turning recomputation, invalidation, cache, and duration data into evidence for a performance diagnosis. ## Core Features & Use Cases - Trace configuration: Configure the flat traceSelectors constructor object for Store, ReactStore, or StreamingStore, choosing the smallest event-category set (execution, cache, invalidation, arguments, results, cadence) that answers the question. - Aggregate interpretation: Read [themis] selector trace summary console rows and lifetime getSelectorTraceSummary() snapshots, including duration aggregates, bounded p95, cache hit ratios, and fixed invalidation labels. - Privacy-safe diagnosis: Diagnose using callback source identity, counts, and durations only, since traces never expose selector arguments, results, or state values. - Use Case: A Svelte view re-renders excessively. Enable execution and invalidation tracing, reproduce the interaction after init(), and compare recomputation counts against invalidation reason labels to find the unstable selector input. ## Quick Start Enable selector tracing on my Store with execution and invalidation categories, then help me interpret the trace summary output to find why my selector keeps recomputing.

Frequently Asked Questions about core/selector-tracing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I enable selector tracing on a themis Store?▼

Pass a flat traceSelectors object as the third constructor argument to Store, ReactStore, or StreamingStore, enabling categories like traceExecution or traceInvalidation. Set summaryEnabled: true to allocate the collector for period aggregates and lifetime snapshots.

How to diagnose selector recomputation performance in a Redux-style store?▼

Enable traceExecution and traceInvalidation, call store.init(), and reproduce the interaction through the normal selector path. Compare recomputationCount and duration aggregates against the fixed invalidation reason labels in the trace summary output.

Does selector tracing work with ReactStore and StreamingStore?▼

Yes, tracing options, events, summary shape, and default-off behavior are shared across Store, ReactStore, and StreamingStore. The tracing observes shared selector computation behind each family's adapter, whether Svelte Readable, Preact signal, or Kefir observable.

Why is getSelectorTraceSummary returning an empty array?▼

The summary is empty when summaryEnabled is false or no lifetime data exists yet. Setting traceSelectors to true enables event categories only; you must explicitly set summaryEnabled: true to allocate the summary collector.

Can selector traces show argument or state values?▼

No, traces never expose selector argument values, result values, or Redux state values by design. They report only callback source identity, interval counts, duration aggregates, cache counters, and fixed invalidation, argument, and result labels.

What are the limitations of the p95 duration metric in trace summaries?▼

The p95Ms value is computed from a bounded ring buffer of at most 64 duration samples, so it reflects a recent window rather than all lifetime events. Treat lifetime count and totalMs separately for long-term analysis.