CtrlK
BlogDocsLog inGet started
Tessl Logo

using-kea-disposables

Use when adding timers (`setInterval`, `setTimeout`), event listeners (`window.addEventListener`, `document.addEventListener`, `MediaQueryList.addEventListener`), or any other resource that needs cleanup inside a kea logic. Every logic has `cache.disposables.add(setup, key?, options?)` and `cache.disposables.dispose(key)` available via the globally registered `disposablesPlugin` from the `kea-disposables` package. Replaces the bare `cache.foo = setInterval(...)` + `beforeUnmount: clearInterval(cache.foo)` pattern and auto-pauses background work when the tab is hidden.

72

Quality

87%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide

SecuritybySnyk

—

The risk profile of this skill

SKILL.md
Quality
Evals
Security

Quality

Content

82%Weight 40%Scale 1-5

Reviews the quality of instructions and guidance provided to agents. Good implementation is clear, handles edge cases, and produces reliable results.

A highly actionable, well-structured skill with comprehensive executable examples and a clear before/after conversion pattern. The main gap is a slightly verbose unmount-gotchas section and the absence of an explicit post-conversion verification step.

Suggestions

Add a short 'Verify' step to the conversion workflow (e.g. run the affected logic's tests / check the unmount no longer leaves timers running) so the refactor has an explicit checkpoint.

Tighten the 'Calling into the manager after unmount' section — the `isDisposed` + storybook-context caveats can be condensed to the one rule and a single example pointer.

Consider moving the lengthy 'Examples in the codebase' gallery into a `references/examples.md` file, keeping the canonical example inline and pointing out for the rest.

DimensionReasoningScore

Conciseness

Efficient and assumes Claude's competence (no basic-concept padding), but the 'Calling into the manager after unmount' section's `isDisposed`/storybook-context caveats run long and could be trimmed.

4 / 5

Actionability

Fully executable, copy-paste-ready examples cover the common cases — unnamed poller, keyed intervals, `setTimeout` spam-replacement, window/`MediaQueryList`/`visibilitychange` listeners, plus before/after conversion.

5 / 5

Workflow Clarity

Clear sequence (when → pattern → choosing a key → `pauseOnPageHidden` → dispose early → after-unmount → examples → anti-patterns) with a concrete before/after conversion, but no explicit verify/test checkpoint after converting a logic.

4 / 5

Progressive Disclosure

No bundle files exist and the skill is self-contained with well-organized section headers; the 'Examples in the codebase' block is long enough that it could plausibly split into a separate reference, which keeps this just short of a 5.

4 / 5

Total

17

/

20

Passed

Description

92%Weight 40%Scale 1-5

Based on the skill's description, can an agent find and select it at the right time? Clear, specific descriptions lead to better discovery.

A strong, specific description that clearly states what the skill does and when to reach for it, scoped tightly to kea disposables. It is slightly heavy on technical API names where more natural user phrasing would help trigger matching.

Suggestions

Add a couple of natural-language synonyms (e.g. 'polling', 'subscriptions', 'teardown', 'cleanup') alongside the API method names so the description matches how users phrase the need.

Consider leading with the plain-language trigger ('Use when a kea logic needs to clean up a timer, listener, or subscription') before the API specifics.

DimensionReasoningScore

Specificity

Names the domain and multiple concrete actions — adding timers (`setInterval`, `setTimeout`), event listeners, `cache.disposables.add`/`dispose`, replacing the bare `cache.foo = setInterval` + `beforeUnmount` pattern, and auto-pausing on tab hide — giving comprehensive coverage.

5 / 5

Completeness

Explicitly answers both 'what' (every logic has `cache.disposables.add`/`dispose`, replaces the bare pattern, auto-pauses background work) and 'when' ('Use when adding timers... event listeners... or any other resource that needs cleanup inside a kea logic') with concrete trigger phrases.

5 / 5

Trigger Term Quality

Good keyword coverage with natural terms ('timers', 'event listeners', 'resource that needs cleanup'), but it leans on technical method names (`MediaQueryList.addEventListener`) rather than the natural synonyms a user would say, so a few natural terms are missing.

4 / 5

Distinctiveness Conflict Risk

Scoped to 'inside a kea logic' and the `kea-disposables` package, giving it a clear niche with distinct triggers and minimal overlap with other skills.

5 / 5

Total

19

/

20

Passed

Validation

100%

Checks the skill against the spec for correct structure and formatting. All validation checks must pass before discovery and implementation can be scored.

Validation — 16 / 16 Passed

Validation for skill structure

No warnings or errors.

Repository
PostHog/posthog
Reviewed

Table of Contents

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.