Guides use of advanced TypeScript type system features including conditional types, branded types, discriminated unions, and template literal types for type-safe APIs and domain models.
Ships in nickcrew-claude-ctx-plugin. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Expert guidance for leveraging TypeScript's advanced type system features to build robust, type-safe applications with sophisticated type inference, compile-time guarantees, and maintainable domain models.
TypeScript's type system enables compile-time safety through:
value is Type)Load detailed references on-demand:
| Topic | Reference File |
|---|---|
| Conditional Types | skills/typescript-advanced-patterns/references/conditional-types.md |
| Mapped Types | skills/typescript-advanced-patterns/references/mapped-types.md |
| Template Literal Types | skills/typescript-advanced-patterns/references/template-literal-types.md |
| Type Guards | skills/typescript-advanced-patterns/references/type-guards.md |
| Discriminated Unions | skills/typescript-advanced-patterns/references/discriminated-unions.md |
| Branded Types | skills/typescript-advanced-patterns/references/branded-types.md |
| Builder Pattern | skills/typescript-advanced-patterns/references/builder-pattern.md |
| Advanced Generics | skills/typescript-advanced-patterns/references/advanced-generics.md |
| Utility Types | skills/typescript-advanced-patterns/references/utility-types.md |
| Type Inference | skills/typescript-advanced-patterns/references/type-inference.md |
| Decorators | skills/typescript-advanced-patterns/references/decorators.md |
| Performance Best Practices | skills/typescript-advanced-patterns/references/performance-best-practices.md |
| Common Pitfalls | skills/typescript-advanced-patterns/references/common-pitfalls.md |
| Testing Types | skills/typescript-advanced-patterns/references/testing-types.md |
tsconfig.json with "strict": true)Using any instead of unknown: Loses all type safety
unknown and type guards insteadType assertions without validation: Unsafe runtime behavior
value is Type) over as TypeOverusing generics: Unnecessary complexity
Deep type nesting: Slow compilation, hard to debug
Forgetting readonly: Accidental mutations
readonlyNot enabling strict mode: Missing null checks and type errors
"strict": true in tsconfig.jsonMixing type and interface incorrectly: Confusing semantics
type for unions/utilities, interface for object shapestype UserId = string & { readonly __brand: 'UserId' };
function createUserId(id: string): UserId { return id as UserId; }
type State =
| { status: 'loading' }
| { status: 'success'; data: string }
| { status: 'error'; error: Error };
type Readonly<T> = { readonly [P in keyof T]: T[P] };
type Partial<T> = { [P in keyof T]?: T[P] };
function isString(value: unknown): value is string {
return typeof value === 'string';
}
references/advanced-generics.md (opens in a new tab)references/branded-types.md (opens in a new tab)references/builder-pattern.md (opens in a new tab)references/common-pitfalls.md (opens in a new tab)references/conditional-types.md (opens in a new tab)references/decorators.md (opens in a new tab)references/discriminated-unions.md (opens in a new tab)references/mapped-types.md (opens in a new tab)references/performance-best-practices.md (opens in a new tab)references/template-literal-types.md (opens in a new tab)references/testing-types.md (opens in a new tab)references/type-guards.md (opens in a new tab)references/type-inference.md (opens in a new tab)references/utility-types.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
/nickcrew-claude-ctx-plugin:typescript-advanced-patternsfrom nickcrew-claude-ctx-plugin
nickcrew-claude-ctx-plugin@cascade-code-languages-misc-1 is listed by joshuarweaver/cascade-code-languages-misc-1 — review the source before installing
npx claudepluginhub joshuarweaver/cascade-code-languages-misc-1 --plugin nickcrew-claude-ctx-plugin156 skills in this plugin
/accessibility-auditFast, high-signal accessibility triage for pages, components, or PRs targeting WCAG 2.2 AA compliance./agent-loopsComplete operational workflow for implementer agents (Codex, Gemini, etc.) making code changes and writing tests. Drives all work through atomic commits — each loop operates on the smallest complete, reviewable change. Defines the Code Change Loop, Test Writing Loop, Lint Gate, and Issue Filing process with circuit breakers, severity levels, and escalation rules. Requires `cortex git commit` for all commits. Includes bundled provider-aware review scripts that keep same-model shell-outs as the last resort, plus a fresh-context Codex fallback for code review and test audit. Use this skill when starting any implementation task./Other plugins' skills for the same job