strict-typescript-mode

Enforce explicit types and strict compiler options in TypeScript projects.

38|5|Updated Dec 18, 2025
One-click install
npx skills add https://github.com/Svenja-dev/claude-code-skills --skill strict-typescript-mode
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: strict-typescript-mode
Source: https://github.com/Svenja-dev/claude-code-skills/tree/main/skills/strict-typescript-mode
Command: npx skills add https://github.com/Svenja-dev/claude-code-skills --skill strict-typescript-mode

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill enforces TypeScript best practices to improve safety, readability, and maintainability by preventing implicit any usage and requiring explicit types.

Core Features & Use Cases

  • Enforces explicit return types and public API types to prevent accidental type leakage.
  • Forbids usage of any in new code unless there is a documented justification, with type guards and runtime checks where appropriate.
  • Encourages the use of generic constraints and TypeScript utility types to create safer abstractions.
  • Use Case: When converting a JavaScript project to TypeScript or implementing new features, this skill guides developers to write type-safe, robust code.

Quick Start

  • Update tsconfig.json to enable strict mode and helpful flags (e.g., "strict": true, "noImplicitAny": true, "strictNullChecks": true).
  • Add lint rules to enforce explicit types on exports and disallow bare any usages.
  • Run the TypeScript compiler and linting tools (tsc, eslint) to validate code changes.

Frequently Asked Questions about strict-typescript-mode

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

FAQPage Schema
How do I enforce strict TypeScript type safety and prevent implicit any usage?

To enforce strict TypeScript type safety and prevent implicit any usage, enable strict compiler options like noImplicitAny and strictNullChecks in tsconfig.json, and add lint rules to require explicit return types on public APIs.

What's the best way to migrate a JavaScript project to TypeScript safely?

Migrating a JavaScript project to TypeScript safely requires enabling strict compiler flags, forbidding bare any usages without documented justification, and using type guards with runtime checks to prevent accidental type leakage during the conversion.

How do I configure TypeScript lint rules to disallow any in new code?

Configuring TypeScript lint rules to disallow any involves adding eslint rules that forbid bare any usages in new code unless explicitly justified, and enforcing explicit types on exports to improve overall code readability and maintainability.

When should I use generics with constraints versus utility types in TypeScript?

Use generics with constraints and TypeScript utility types during refactoring to create safer abstractions, ensuring that flexible components maintain strict type checking without relying on implicit any or losing type safety.

Does strict TypeScript mode work with TSX projects during feature work?

Strict TypeScript mode works with TSX projects during feature work by validating code changes through the TypeScript compiler and linting tools, enforcing explicit API types, and preventing accidental type leakage in component implementations.