CtrlK
BlogDocsLog inGet started
Tessl Logo

typescript-advanced-design-patterns

TypeScript design patterns that use the type system to enforce correctness at compile time — the builder pattern with required-field tracking, type-safe state machines and event emitters, dependency injection, plugin systems, recursive/deep-readonly utility types, type-safe module encapsulation, advanced generic constraints, and typed API clients. Use when structuring a class or module so invalid usage fails to compile rather than throwing at runtime, e.g. "how do I stop `.build()` being called before required fields are set" or "how do I type an event emitter so payloads match their event name".

67

Quality

81%

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

80%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 overview skill: executable BAD/GOOD anti-pattern examples, a clean one-level-deep reference table verified against the actual bundle, and tight scope boundaries with explicit sibling-skill routing. Its weaknesses are the absence of an explicitly sequenced usage workflow (selection → reference lookup → implementation → type-check is only implicit) and mild redundancy between the 'When to Apply' and 'Use When' sections.

Suggestions

Replace or merge the overlapping 'When to Apply' and 'Use When' sections into one list pairing each trigger question with its reference file, which would simultaneously fix the redundancy and make the selection workflow explicit.

Add a short 3–4 step usage workflow ending in the existing `npx tsc --noEmit` validation step (pick pattern → read its reference file → implement → type-check) so the sequence and checkpoint are explicit rather than implied.

Trim the Mindset paragraph to its actionable core (the runtime-failure-to-compile-error test and the unconstrained-generic rule), cutting roughly a third of its prose.

DimensionReasoningScore

Conciseness

The body is dense with opinionated, non-obvious guidance ('a builder that still lets `.build()` run with missing fields is a fluent API, not a type-safe one') and never explains concepts Claude already knows, but the 10-bullet 'When to Apply' list and the 4-question 'Use When' list overlap noticeably, and the Mindset prose could be tightened — minor over-explanation fitting anchor 4 rather than the every-token-earns-its-place anchor 5.

4 / 5

Actionability

Three complete, compilable BAD/GOOD TypeScript pairs (builder with `build(this: UserBuilder<true>)`, constrained `createInstance` using `ConstructorParameters<T>`/`InstanceType<T>`, typed emitter with `Parameters<T[K]>`) plus the runnable command `npx tsc --noEmit` — copy-paste ready code covering the most common misuse cases, matching anchor 5.

5 / 5

Workflow Clarity

No multi-step sequence is explicitly stated — the implied flow (match the scenario in 'When to Apply', consult the relevant reference file, implement, verify) is implicit, and while the type-check validation checkpoint is provided, routing guidance and steps are never laid out as a sequence, matching anchor 3 ('sequence present but implicit') rather than anchor 4's clearly listed steps.

3 / 5

Progressive Disclosure

A clear overview with 12 one-level-deep references presented in a table with per-file 'Covers' descriptions, all of which exist on disk; pattern details correctly live in the reference files rather than inline, and the inline anti-patterns are appropriate overview-level material — matching anchor 5's well-signaled, easy-to-navigate structure.

5 / 5

Total

17

/

20

Passed

Description

83%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 description that states a clear compile-time-correctness niche, enumerates concrete pattern capabilities, and gives explicit 'Use when' guidance with realistic example user queries in third person. Its only weakness is incomplete coverage of the skill's own scope — form validation and branded types appear in the body and references but not in the description, slightly limiting both trigger coverage and distinctiveness from sibling type-system skills.

Suggestions

Mention form validation (sync and async validators) and branded/nominal types in the description, since dedicated reference files exist for both and users searching those terms currently have no trigger.

Add one disambiguating phrase contrasting this skill with sibling type-mechanics skills (e.g., 'patterns built on top of conditional/mapped types, not the type mechanics themselves') to reduce overlap risk for generic type-system queries.

DimensionReasoningScore

Specificity

Names the domain and many concrete pattern areas ('builder pattern with required-field tracking, type-safe state machines and event emitters, dependency injection, plugin systems, recursive/deep-readonly utility types, type-safe module encapsulation, advanced generic constraints, and typed API clients'), but omits form validation and branded types that the skill's body and references cover — minor gaps matching anchor 4 rather than comprehensive anchor-5 coverage.

4 / 5

Completeness

Clearly answers both what ('TypeScript design patterns that use the type system to enforce correctness at compile time' with an enumerated pattern list) and when ('Use when structuring a class or module so invalid usage fails to compile rather than throwing at runtime, e.g. ...') with concrete trigger phrases, in third-person voice — a direct anchor-5 match.

5 / 5

Trigger Term Quality

Good natural-keyword coverage ('builder pattern', 'state machine', 'event emitter', 'dependency injection', 'plugin system', 'API client') reinforced by verbatim user-style queries ('how do I stop `.build()` being called before required fields are set'), but common variations like 'form validation', 'branded types', and 'DeepReadonly' are missing, so it falls short of the comprehensive synonym coverage of anchor 5.

4 / 5

Distinctiveness Conflict Risk

The niche is clear ('fails to compile rather than throwing at runtime') and triggers are distinctive user questions, but queries like 'write a DeepReadonly type' or generic TypeScript type-system questions could overlap with the sibling typescript-type-system and typescript-utility-types skills — mostly distinct with minor overlap risk, matching anchor 4 rather than the minimal-conflict anchor 5.

4 / 5

Total

17

/

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

allowed_tools_field

'allowed-tools' contains unusual tool name(s)

Warning

Total

15

/

16

Passed

Repository
pantheon-org/tekhne
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.