type-alias-compression

Installation
SKILL.md

Type Alias Compression Protocol (Generic Signature Normalization)

Overview

When writing enterprise applications in TypeScript, Python, or Rust, complex nested generic signatures (e.g., Promise<AxiosResponse<PaginatedResponse<UserProfileDTO>>>) are frequently repeated across 10 to 20 method definitions in a single module.

Repeating nested generic signatures causes:

  1. Severe Token Multiplication: Repeating an 80-character generic signature across 15 functions burns 400+ output tokens on syntax boilerplate.
  2. Maintenance Drift: Changing the underlying response envelope requires mutating 15 separate function signatures across the file.
  3. Cognitive Clutter: The actual function argument names are pushed off-screen by long type annotations.

The Type Alias Compression Protocol extracts common nested generic patterns into concise top-level type aliases (type Res<T> = ...), normalizing signatures to 1 to 2 clean tokens.


Repetitive Nested Generics vs. Compressed Type Aliases

Installs
1
GitHub Stars
2
First Seen
Oct 24, 2026