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.

71

Quality

88%

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

77%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 well-structured, actionable, and assumes Claude's competence, with a clear validated workflow. Its main weakness is that the two referenced bundle files are missing, so the progressive-disclosure navigation points to nonexistent detail.

Suggestions

Create `references/type-compatibility.md` and `references/migration-patterns.md` (or remove the broken links), since the body delegates key detail to files that do not exist.

Trim minor teaching lines such as 'Use import type for types to enable proper tree-shaking' — assume Claude already knows this.

Inline at least one complete before/after migration example in the body so the skill remains actionable even if the reference is unavailable.

DimensionReasoningScore

Conciseness

Dense and reference-rich, assuming Claude knows TypeScript/PostHog, with only minor over-explanation (e.g. 'Use import type for types to enable proper tree-shaking') that could be trimmed.

4 / 5

Actionability

Provides executable commands (`pnpm --filter=@posthog/frontend typescript:check`, `hogli build:openapi`, `hogli test`), real import snippets, and a decision table, with minor gaps where full before/after examples are deferred to the reference.

4 / 5

Workflow Clarity

A clear 6-step sequence closes with an explicit verification section (TypeScript check, grep for leftover manual types, run tests) providing the validation checkpoint a batch refactor needs.

5 / 5

Progressive Disclosure

The body signals one-level-deep references to `references/type-compatibility.md` and `references/migration-patterns.md`, but the `references/` directory does not exist, so the navigation is broken and cannot be trusted as written.

3 / 5

Total

16

/

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 best-in-class: it states a concrete what, an explicit and pattern-rich when, and is anchored to specific code constructs that make it highly triggerable and distinct. No vague fluff or over-claims.

DimensionReasoningScore

Specificity

Lists multiple concrete actions — 'finding the generated equivalent, swapping imports, adapting call sites, and removing dead manual types' — giving comprehensive coverage of the migration workflow.

5 / 5

Completeness

Explicitly answers both 'what' (migrate manual API calls and handwritten types to generated equivalents) and 'when' (a 'Use when... Triggers on...' clause with concrete trigger phrases).

5 / 5

Trigger Term Quality

Surfaces concrete code patterns a developer would reference — `api.get`, `api.create`, `api.surveys.get`, `api.dashboards.list`, `new ApiRequest()`, `api.get<`, and import-from-`lib/api` triggers.

5 / 5

Distinctiveness Conflict Risk

Occupies a narrow niche (PostHog frontend generated-API adoption) with highly specific code-pattern triggers, making overlap with unrelated skills minimal.

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: 2 missing

Warning

referenced_paths_exist

Referenced path issues: 2 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.