CtrlK
BlogDocsLog inGet started
Tessl Logo

adopting-generated-api-types

Use when migrating frontend code from manual API client calls (`api.get`, `api.create`, `api.surveys.get`, `api.dashboards.list`, `new ApiRequest()`) and handwritten TypeScript interfaces to generated API functions and types. Triggers on files importing from `lib/api`, files with `api.get<`, `api.create<`, `api.<entity>.<method>`, manual interface definitions that duplicate backend serializers, or any frontend file that constructs API URLs by hand. Covers the full replacement workflow — finding the generated equivalent, swapping imports, adapting call sites, and removing dead manual types.

75

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.

A well-structured, highly actionable migration skill: concrete code, exact commands, a useful decision table, and clean progressive disclosure into two real reference files. The only slack is a mildly trimmable under-the-hood section and an implicit rather than explicit validation feedback loop.

Suggestions

Consider trimming or condensing the 'How generated functions work under the hood' section — the reassurance that HTTP behavior is unchanged could be a single line rather than a code diagram.

Make the verification feedback loop explicit, e.g. 'If typescript:check fails, fix the reported call sites and re-run before proceeding' to mirror the validate→fix→retry pattern.

DimensionReasoningScore

Conciseness

Mostly lean and assume Claude's competence, but the 'How generated functions work under the hood' section and the pipeline re-statement in the Overview are minor instances that could be trimmed without losing actionable value.

4 / 5

Actionability

Fully executable guidance: concrete import paths, copy-paste import conventions, exact commands ('pnpm --filter=@posthog/frontend typescript:check', 'hogli build:openapi', 'hogli test'), and a decision table mapping scenarios to concrete actions.

5 / 5

Workflow Clarity

A clear 6-step sequence plus a 'Verifying the migration' checklist (typescript:check, grep for leftover types, run tests) provides real validation checkpoints, but the error-recovery feedback loop is implicit rather than an explicit 'if check fails, fix and re-run'.

4 / 5

Progressive Disclosure

Clear overview with two well-signaled, one-level-deep references (references/type-compatibility.md and references/migration-patterns.md, both real files with no further nesting); detail appropriately split out and easy to navigate.

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.

An exemplary description: it states the precise migration task, enumerates concrete trigger patterns a developer would naturally grep for, and cleanly separates 'what' from 'when'. Third-person imperative voice is maintained throughout with no fluff.

DimensionReasoningScore

Specificity

Lists multiple concrete actions — 'finding the generated equivalent, swapping imports, adapting call sites, and removing dead manual types' — and names the specific legacy patterns, giving comprehensive coverage.

5 / 5

Completeness

Explicitly answers both 'what' (migrate manual API calls and handwritten types to generated equivalents) and 'when' ('Use when migrating...', 'Triggers on files importing from lib/api...') with concrete trigger phrases.

5 / 5

Trigger Term Quality

Comprehensive natural/technical trigger coverage including synonyms and variations: 'api.get', 'api.create', 'api.surveys.get', 'api.dashboards.list', 'new ApiRequest()', 'lib/api', 'api.get<', 'api.<entity>.<method>'.

5 / 5

Distinctiveness Conflict Risk

A narrow, codebase-specific niche (PostHog generated API types) with highly distinct code-pattern triggers, minimal risk of firing for an unrelated skill.

5 / 5

Total

20

/

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.

Validation16 / 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.