typescript-strict

Enforce strict TypeScript typing by forbidding any and requiring explicit return types.

2|Updated Feb 5, 2026
One-click install
npx skills add https://github.com/twarogowski/trauma2 --skill typescript-strict-twarogowski
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: typescript-strict
Source: https://github.com/twarogowski/trauma2/tree/main/.claude/skills/typescript-strict
Command: npx skills add https://github.com/twarogowski/trauma2 --skill typescript-strict-twarogowski

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Developing TypeScript applications often suffers from weak typing due to accidental use of any, unclear return types, and insufficient interfaces. This skill helps enforce strict type safety by guiding developers away from any and towards precise types.

Core Features & Use Cases

  • Enforce no any usage and encourage unknown for unknown data.
  • Require explicit return types for public APIs and functions.
  • Promote interface-based shapes, readonly data, and robust type guards for runtime safety.
  • Use across projects to improve maintainability and reduce runtime errors.

Quick Start

Audit your TypeScript codebase to begin applying stricter typing rules: search for any usage, introduce explicit return types, and replace type aliases with interfaces where appropriate.

Frequently Asked Questions about typescript-strict

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

FAQPage Schema
How do I enforce strict TypeScript safety in my codebase?

To enforce strict TypeScript safety, you must forbid the 'any' type, use 'unknown' for untrusted data, mandate explicit return types, and apply interfaces with readonly semantics to prevent runtime errors.

What is the difference between using any and unknown in TypeScript?

Using 'any' disables type checking and allows unsafe operations, whereas 'unknown' requires type guards to validate data shapes before usage, ensuring strict type safety across your TypeScript functions and data models.

How do I audit an existing TypeScript project for weak typing?

Audit your TypeScript project by searching for 'any' usage, adding explicit return types to public APIs, replacing type aliases with interfaces, and implementing type guards to enforce strict runtime safety.

Does strict TypeScript typing work for both front-end and back-end codebases?

Yes, strict TypeScript typing applies across front-end and back-end codebases, covering functions, utilities, and data models to improve maintainability and reduce runtime errors uniformly.

When should I use interfaces instead of type aliases in TypeScript?

You should use interfaces for object shapes to enforce strict type safety, while leveraging readonly semantics to prevent mutation, aligning with TypeScript best practices for maintainable code.

Why does TypeScript still allow nullish values in strict mode?

Strict mode requires safe handling of nullish values rather than outright forbidding them, ensuring your TypeScript code explicitly manages null or undefined returns to prevent runtime errors.