TypeScript

Enforce TypeScript narrowing, inference, and strict mode patterns across codebases.

1|Updated Mar 14, 2026
One-click install
npx skills add https://github.com/marcoamu/openclaw-workspace --skill typescript-marcoamu
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: TypeScript
Source: https://github.com/marcoamu/openclaw-workspace/tree/main/skills/typescript
Command: npx skills add https://github.com/marcoamu/openclaw-workspace --skill typescript-marcoamu

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps developers write type-safe TypeScript by enforcing narrowing, robust inference, and strict mode patterns, reducing runtime errors and improving maintainability.

Core Features & Use Cases

  • Narrowing, inference, and strict mode patterns for safer TypeScript code.
  • Guides on generics, utility types, declarations, and migrating from JavaScript.
  • Use cases span frontend UIs, API clients, and utility libraries.

Quick Start

Provide a strictly typed TypeScript example using proper narrowing and strict mode practices.

Frequently Asked Questions about TypeScript

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

FAQPage Schema
How do I enforce strict null handling and avoid any in my TypeScript codebase?

You can migrate from JavaScript to TypeScript by applying strict mode patterns, utilizing type narrowing, and leveraging robust type inference to progressively add API typings, generics, and utility types across your project.

What is the best way to use discriminated unions and type guards for type narrowing?

The best way to apply discriminated unions and type guards for type narrowing is to enforce strict patterns that safely reduce runtime errors, guiding code quality across frontend UIs, API clients, and utility libraries.

Can I use these TypeScript strict mode patterns for both frontend and backend projects?

Yes, you can apply these TypeScript strict mode patterns to both frontend and backend projects, ensuring type safety, proper API typings, and robust generics across diverse codebases.

How do I write generics and utility types that maintain type safety in TypeScript?

To write generics and utility types that maintain type safety in TypeScript, use strict mode practices and robust inference patterns that prevent runtime errors and improve overall maintainability.

Why does my TypeScript code fail to narrow types properly in strict mode?

TypeScript code fails to narrow types properly in strict mode when robust inference and strict patterns are not applied, leading to runtime errors and decreased maintainability across your codebase.