svelte/selector-scheduling

Configures Store-owned selector emission coalescing and rAF scheduling for Svelte readables.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Svelte components that subscribe to Redux-style selectors can re-render excessively when every state write triggers an emission. This Skill enforces Store-owned selector scheduling so emissions are coalesced and throttled correctly, and prevents developers from adding duplicate debounce, timer, or caching layers that cause stale updates. ## Core Features & Use Cases - Store-first selector creation: Define selectors through store.createSelector(...) and tune coalescing only via the throttledSelectorFrequency Store option (default 64 FPS, range 1-256). - Correct read patterns: Call selector readables at component init, use .select(store.state, ...) for one-shot handler reads, .effect() in sagas, and .withStore(store) for explicit binding. - Anti-pattern guardrails: Blocks wrapping selector readables in memoize, debounce, rAF, or writable-proxy layers, and forbids using readables as audit/event streams. - Use Case: A pointer-tracking component re-renders on every mousemove write. Use this Skill to rely on the Store's built-in rAF coalescing instead of hand-rolling a debounced writable, and move audit logging into an action-driven saga. ## Quick Start Ask the assistant to review your Svelte selector usage and configure Store-owned selector scheduling with the correct throttledSelectorFrequency instead of manual debounce wrappers.

Frequently Asked Questions about svelte/selector-scheduling

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

FAQPage Schema
How do I throttle Svelte store selector emissions?▼

Tune selector emission throttling through the Store constructor's final options argument, for example new Store(reducers, middleware, { throttledSelectorFrequency: 30 }). The default is 64 FPS, and explicit values must be finite numbers in the inclusive 1-256 range.

How to read selector state in Svelte event handlers?▼

Use selectValue.select(store.state, ...args) for one-shot reads inside event handlers, callbacks, services, or tests. Selector readable mode should only be called at component init, never from handlers or async functions.

Should I debounce a Svelte selector readable to reduce re-renders?▼

No. The Store already owns caching and rAF-based coalescing of selector emissions, so wrapping readables in debounce, timers, or writable proxies adds stale updates on top of existing scheduling. Adjust throttledSelectorFrequency instead.

Can selector readables be used as an event or audit stream?▼

No. Selector readables represent the latest derived state and may coalesce intermediate writes, so events can be missed. Use action-driven sagas with takeEvery when every dispatched event must be recorded.

How do I use selectors inside redux-saga with Svelte stores?▼

Use yield* selectValue.effect(...args) inside sagas to read selector state without involving readable scheduling. For explicit non-context binding outside sagas, call selectValue.withStore(store)(...args) after store.init().