CtrlK
BlogDocsLog inGet started
Tessl Logo
SkillPublic

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.

68

Quality

85%

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

67%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 body is a well-organized, highly actionable codebase-specific guide with concrete commands, paths, and a decision table, though slightly redundant in places and lacking an explicit fix-and-retry loop. Its main defect is that both deferred-detail references point to files absent from the bundle, leaving the core migration examples unavailable.

Suggestions

Ship the referenced files (references/migration-patterns.md and references/type-compatibility.md) or inline their essential content — as delivered, the bundle's only file is SKILL.md and both clearly-signaled references are broken.

Add an explicit feedback loop to the verification step, e.g. "If typescript:check fails, fix the reported call sites and re-run before proceeding".

Trim the "When to use" section, which restates the frontmatter description's triggers almost verbatim and duplicates the decision guide.

DimensionReasoningScore

Conciseness

The body is dense with codebase-specific knowledge (naming conventions, import path rules, the Orval pipeline) and assumes Claude's competence, e.g. "Generated functions wrap the same `api` module via `api-orval-mutator.ts" with no basic explanations. Not 5: the "When to use" section largely repeats the frontmatter triggers, and lines like "All three patterns should be replaced with generated functions where available" restate the decision table.

4 / 5

Actionability

Concrete throughout: exact search paths ("Core endpoints: `frontend/src/generated/core/api.ts`"), the naming convention ("surveysList — GET /api/projects/{id}/surveys/"), full import statements, runnable commands ("`pnpm --filter=@posthog/frontend typescript:check`", "`hogli test <test_file>`"), and a decision table with specific actions. Not 5: step 4 ("Replace the call") and step 3 defer to references/migration-patterns.md and references/type-compatibility.md, which do not exist in the bundle, so the key before/after examples are not actually available.

4 / 5

Workflow Clarity

A clear 6-step sequence (identify → find equivalent → check compatibility → replace → update types → clean up) culminating in a "Verifying the migration" section with concrete checks (TypeScript check, grep for leftover types, run tests). Not 5: there is no explicit fix-and-retry feedback loop (no "if the check fails, fix and re-run" guidance), and verification guidance is concentrated at the end rather than as in-workflow checkpoints.

4 / 5

Progressive Disclosure

Section structure and reference signaling are good ("See [type-compatibility.md](references/type-compatibility.md) for details"), but the bundle contains no references/ directory — both referenced files are missing, so the clearly-signaled navigation leads nowhere and the deferred core content (before/after migration examples, type-compatibility details) is entirely unavailable. Scored against the actual bundle structure, this is worse than either inlining the content or shipping the files. Not 3: the problem is not organization or unclear signaling but broken/missing reference targets.

2 / 5

Total

14

/

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 what the skill does and when to use it with concrete, code-level trigger tokens, in the pattern of the rubric's good examples. Every phrase is a usable trigger; there is no padding or over-claiming.

DimensionReasoningScore

Specificity

The description closes with four concrete actions — "finding the generated equivalent, swapping imports, adapting call sites, and removing dead manual types" — which comprehensively cover the replacement workflow. Not 4: there are no minor gaps; the actions span the entire migration from discovery to cleanup.

5 / 5

Completeness

It explicitly answers both questions: "Use when migrating frontend code from manual API client calls... to generated API functions and types" (what + when) and "Triggers on files importing from `lib/api`, files with `api.get<`..." (concrete when), plus "Covers the full replacement workflow" (what). This mirrors the 5-anchor example structure of explicit what AND when with concrete trigger phrases.

5 / 5

Trigger Term Quality

It enumerates literal code tokens users would encounter — "`api.get`, `api.create`, `api.surveys.get`, `api.dashboards.list`, `new ApiRequest()`", "files importing from `lib/api`", "`api.get<`", "`api.<entity>.<method>`", "constructs API URLs by hand" — covering call forms, import paths, and pattern variations. Not 4: essentially no natural trigger phrasing for this domain is missing.

5 / 5

Distinctiveness Conflict Risk

Triggers are anchored to codebase-specific artifacts (`lib/api`, `ApiRequest`, generated `Api`-suffixed types, backend serializers), forming a clear niche that no generic skill would match. Not 4: there is no realistic overlap risk with closely related skills since the trigger tokens are unique to this migration.

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

Path

.agents/skills/adopting-generated-api-types/SKILL.md

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.