typescript

Define TypeScript subsystems with runtime schemas and strict compiler settings.

8|Updated Feb 2, 2026
One-click install
npx skills add https://github.com/usurobor/cnos --skill typescript-usurobor
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: typescript
Source: https://github.com/usurobor/cnos/tree/main/src/packages/cnos.eng/skills/eng/typescript
Command: npx skills add https://github.com/usurobor/cnos --skill typescript-usurobor

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Type-checking and runtime behavior often diverge; this skill ensures TypeScript code stays aligned with what runs at runtime, reducing drift.

Core Features & Use Cases

  • Runtime validation at external boundaries using explicit schemas to prevent unchecked input
  • Discriminated unions and branded primitives to prevent subtle type confusion across module surfaces
  • Defined module surfaces and explicit async/error policies to keep boundaries clear
  • Use cases: CLIs, services, tooling, registries, and browser/node applications where runtime/type alignment matters

Quick Start

Define a runtime model, a type model, and boundary validation for your TS subsystem and enable strict compiler settings to align runtime truth with types.

Frequently Asked Questions about typescript

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I keep TypeScript types in sync with runtime behavior?

To keep TypeScript types in sync with runtime behavior, define runtime schemas for external input and enforce strict compiler settings. This reduces drift between static type models and actual execution across CLIs, services, and libraries.

What is the best way to validate external input boundaries in TypeScript?

Validating external input boundaries in TypeScript requires explicit runtime schemas to prevent unchecked data from entering the system. Discriminated unions and branded primitives further prevent subtle type confusion across module surfaces.

When do I need discriminated unions and branded primitives in TypeScript?

You need discriminated unions and branded primitives in TypeScript when preventing subtle type confusion across module surfaces. They ensure that distinct data types remain explicitly separated, maintaining stable APIs and clear module boundaries.

How do I set up a TypeScript subsystem with strict runtime validation?

To set up a TypeScript subsystem with strict runtime validation, define a runtime model, a type model, and boundary validation. Enable strict compiler settings to align runtime truth with types and establish explicit async and error policies.

Does TypeScript runtime validation work for both browser and Node applications?

Yes, TypeScript runtime validation applies to browser and Node applications, alongside CLIs, services, tooling, and registries. It ensures runtime and type alignment matters across any environment where external boundaries must be checked.

Why does my TypeScript type model drift from what runs at runtime?

TypeScript type models drift from runtime behavior when external boundaries lack explicit schemas and compiler settings are not strict. Defining explicit error policies and validating unchecked input prevents this divergence.