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

Passed

No findings from the security scan

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.

The content is a well-structured, executable guide that keeps the body concise while pushing per-job detail into well-signaled one-level-deep references. It is highly actionable with real commands and code, with only minor conciseness and validation-checkpoint gaps.

Suggestions

Tighten the 'Decision flow' and 'Pattern index' overlap — the four decision-flow questions already point to state-decision.md, so the pattern-index row for the same file could be merged or deduplicated.

Add one explicit validation/checkpoint line in the typegen iteration loop (e.g. 'confirm types:check passes before moving on') to match the example's validate-then-proceed pattern.

The line about pre-release kea versions and pnpm-workspace.yaml is useful but could move to a short 'versions' note to keep the opening lean.

DimensionReasoningScore

Conciseness

The body is lean and assumes Claude's competence (no primers on what kea or React are), with only minor over-explanation in the decision-flow section that slightly overlaps the pattern index.

4 / 5

Actionability

Provides a complete executable anatomy example, concrete `pnpm --filter=@posthog/frontend typegen:*` commands, a specific one-file regeneration loop, and exact annotation syntax for keyed logics.

5 / 5

Workflow Clarity

The typegen section gives a clear iterate-then-validate loop ('run the full typegen:check and typescript:check once at the end to confirm nothing else broke') and the decision flow is sequenced; minor validation checkpoints elsewhere are implicit rather than called out.

4 / 5

Progressive Disclosure

SKILL.md is an overview that routes to 11 real, one-level-deep reference files via a clear 'You want to... / Read' table plus a companion-skill pointer, all verified to exist in ./references/.

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.

The description is a strong, concrete two-part statement covering both what the skill does and when to invoke it, with rich natural trigger terms. It is distinct to the PostHog kea niche and avoids vague fluff.

DimensionReasoningScore

Specificity

Lists multiple concrete actions (creating a logic, adding actions/reducers/selectors/listeners/loaders/forms/router bindings, choosing reducer vs selector vs cache, wiring React) with comprehensive coverage of the skill's scope.

5 / 5

Completeness

Explicitly answers 'what' ('Guide for writing or reviewing PostHog kea logic files') and 'when' via a concrete 'Use when...' clause enumerating multiple trigger scenarios.

5 / 5

Trigger Term Quality

Includes natural trigger tokens users would say — file patterns `*Logic.ts`/`*Logic.tsx`, `useValues`/`useActions`/`BindLogic`, `kea-subscriptions`, 'onboarding to kea' — with synonyms and file extensions well covered.

5 / 5

Distinctiveness Conflict Risk

Scoped tightly to PostHog kea logics with niche-specific triggers, making conflict with unrelated skills unlikely.

5 / 5

Total

20

/

20

Passed

Validation

93%

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

Validation15 / 16 Passed

Validation for skill structure

CriteriaDescriptionResult

relative_links

Relative link issues: 4 suspicious

Warning

Total

15

/

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.