CtrlK
BlogDocsLog inGet started
Tessl Logo

typescript-best-practices

Type-level discipline for TypeScript: discriminated unions, branded types, constructive modeling, narrowing hierarchy, exhaustiveness checks, boundary validation. Use when reading or editing any .ts or .tsx file, modelling domain types, or refactoring an `as` cast out of existing code.

68

Quality

83%

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

82%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-crafted, dense best-practices skill with executable code examples and clear decision hierarchies that respect Claude's competence. The main improvements are tightening a few prose passages and either elaborating or trimming the table rules that lack a matching pattern.

Suggestions

Tighten the borderline prose passages (TimeRange commentary, the 'Weakening the result…' paragraph) to lift conciseness toward fully lean.

Either add short pattern elaborations for the table rules that currently lack them ('Object args', 'Real tests', 'Structured telemetry', 'Schema-derived types') or mark them as intentionally summary-only, to close the progressive-disclosure gap.

Consider adding an explicit decision workflow (e.g. 'when editing a .ts file: check boundaries → narrow → exhaustiveness') with checkpoints to strengthen workflow clarity beyond a principles doc.

DimensionReasoningScore

Conciseness

The body is dense and opinionated with a tight rules table and code-driven patterns that mostly assume Claude's TS competence; minor explanatory prose (e.g. the TimeRange and total-signature commentary) could be trimmed, keeping it just short of fully lean.

4 / 5

Actionability

Provides multiple complete, executable TypeScript examples (DiffState union, branded AgentId, NonEmpty<T>, exhaustiveness default arm, satisfies) that are copy-paste ready and cover the common cases, matching the top anchor.

5 / 5

Workflow Clarity

Clear decision guidance is present — the ordered narrowing hierarchy ('Discriminant switch > in > typeof/instanceof > type guard > as') and the earned-cast diagnostic sequence — but as a principles document it has no multi-step workflow with explicit validation checkpoints, so it sits just below 5.

4 / 5

Progressive Disclosure

Self-contained single file (~90 lines) with a good summary-table overview flowing into elaborated Patterns, no nested references; minor gap is that several table rules ('Object args', 'Real tests', 'Structured telemetry', 'Schema-derived types') have no corresponding pattern elaboration.

4 / 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, specific description that clearly states both capability and trigger conditions with concrete TypeScript terms and file extensions. Its main limitation is the slightly broad '.ts/.tsx file' trigger, which risks overlap with general TS skills.

DimensionReasoningScore

Specificity

Lists six concrete named techniques ('discriminated unions, branded types, constructive modeling, narrowing hierarchy, exhaustiveness checks, boundary validation') with comprehensive domain coverage, but they are capability-nouns rather than verb-actions, leaving a minor framing gap short of a 5.

4 / 5

Completeness

Explicitly states both the 'what' ('Type-level discipline for TypeScript: …') and the 'when' ('Use when reading or editing any .ts or .tsx file, modelling domain types, or refactoring an `as` cast…') with concrete trigger phrases, matching the top anchor.

5 / 5

Trigger Term Quality

Includes natural terms users say — 'TypeScript', '.ts or .tsx file', 'modelling domain types', 'refactoring an `as` cast' — with file extensions present; a few natural synonyms (e.g. 'type safety', 'type error', 'generics') are missing, so it is not fully comprehensive.

4 / 5

Distinctiveness Conflict Risk

The type-level-discipline niche is distinct and well-scoped, but the trigger 'reading or editing any .ts or .tsx file' is broad enough to overlap with general TypeScript/linting skills, giving minor conflict risk short of a 5.

4 / 5

Total

17

/

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.

Validation — 16 / 16 Passed

Validation for skill structure

No warnings or errors.

Repository
monkilabs/opencastle
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.