CtrlK
BlogDocsLog inGet started
Tessl Logo

writing-kea-logics

Guide for writing or reviewing PostHog kea logic files (`*Logic.ts` / `*Logic.tsx`). Use when creating a new logic, adding actions/reducers/selectors/listeners/loaders/forms/router bindings, choosing between reducer vs selector vs cache, deciding between listeners and `kea-subscriptions`, wiring React with `useValues`/`useActions`/`BindLogic`, or onboarding to kea conventions. Read keajs.org for upstream API; this skill captures PostHog-specific conventions and idioms.

74

Quality

93%

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

86%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 well-structured, actionable skill body with executable templates, concrete commands, and exemplary progressive disclosure via a pattern index. Slight conciseness loss from repeated upstream-docs prompts and a large anatomy block.

Suggestions

Consolidate the repeated 'Read keajs.org for upstream API' guidance into a single 'When in doubt' section to trim duplicate tokens.

Consider moving the full anatomy template into a reference file and keeping only a minimal skeleton inline, since the pattern index already routes to per-topic references.

Add an explicit validation checkpoint in the decision flow (e.g. 'confirm the chosen container does not duplicate state already derived elsewhere') to lift workflow clarity.

DimensionReasoningScore

Conciseness

Largely lean and assumes Claude's knowledge of kea, but the 'Read keajs.org' guidance is repeated across the intro, core principles, and 'When in doubt', and the anatomy block is heavy — minor trims available.

4 / 5

Actionability

Provides copy-paste-ready TypeScript templates (anatomy, typegen block) and concrete commands (`pnpm --filter=@posthog/frontend typegen:file ...`, `typegen:check`), covering the common cases fully.

5 / 5

Workflow Clarity

The decision flow is a clear sequenced 1–4 list and the typegen loop ends with an explicit validation step ('run the full typegen:check and typescript:check once at the end'), but the primary flow is a decision tree rather than a checkpointed pipeline.

4 / 5

Progressive Disclosure

Overview body with a well-signaled pattern-index table pointing one level deep to per-job references (state-decision, loading-data, forms, etc.), with clear navigation and no nested-reference chains.

5 / 5

Total

18

/

20

Passed

Description

100%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 concretely states both capabilities and trigger conditions with file extensions and synonyms, occupying a clear niche. No first/second person voice issues and no vague fluff.

DimensionReasoningScore

Specificity

Lists multiple concrete actions — 'writing or reviewing', 'creating a new logic', 'adding actions/reducers/selectors/listeners/loaders/forms/router bindings', 'choosing between reducer vs selector vs cache', 'wiring React with useValues/useActions/BindLogic' — giving comprehensive coverage rather than vague language.

5 / 5

Completeness

Explicitly answers 'what' (guide for writing/reviewing kea logic files) and 'when' via a concrete 'Use when...' clause enumerating trigger scenarios, matching the top anchor.

5 / 5

Trigger Term Quality

Natural terms a PostHog dev would say ('new logic', 'adding listeners', 'reducer vs selector', 'wiring React') plus file extensions (`*Logic.ts`/`*Logic.tsx`) and synonyms (listeners vs `kea-subscriptions`), matching the comprehensive-synonym anchor.

5 / 5

Distinctiveness Conflict Risk

Scoped to 'PostHog kea logic files' with distinct, niche triggers (kea builders, typegen) and minimal overlap with other skills.

5 / 5

Total

20

/

20

Passed

Validation

87%

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

Validation — 14 / 16 Passed

Validation for skill structure

CriteriaDescriptionResult

relative_links

Relative link issues: 14 missing, 4 suspicious

Warning

referenced_paths_exist

Referenced path issues: 27 missing

Warning

Total

14

/

16

Passed

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.