typescript-convention

Enforce TypeScript coding conventions with strict mode and type design rules.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill standardizes TypeScript coding practices, helping teams achieve consistent, safe, and maintainable codebases across projects by codifying rules and examples.

Core Features & Use Cases

  • Strict mode configuration guidance with recommended tsconfig.json settings.
  • Type design principles and patterns (interfaces vs types, discriminated unions, generics constraints).
  • Null handling, error design, and runtime validation patterns using libraries like zod.

Quick Start

Install TypeScript, enable strict mode, and apply the recommended conventions to your project.

Frequently Asked Questions about typescript-convention

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

FAQPage Schema
What TypeScript strict mode compiler options should I enable in tsconfig.json?

TypeScript strict mode configuration requires enabling specific compiler options in your tsconfig.json to enforce type safety, catch implicit errors, and standardize coding conventions for reliable, maintainable code.

How do I design robust TypeScript generics constraints and discriminated unions?

Designing robust TypeScript generics and discriminated unions involves applying explicit type constraints to limit acceptable inputs, ensuring type safety, and standardizing patterns for safer codebases.

What is the best way to handle null values and error shapes in TypeScript?

Handling null values and error shapes in TypeScript requires applying explicit coding conventions for null safety and structured error design to maintain consistency and prevent runtime failures.

How do I use TypeScript with runtime validation libraries like zod?

Using TypeScript with runtime validation libraries like zod involves applying explicit conventions to validate external data shapes at runtime, bridging the gap between compile-time type safety and actual runtime inputs.

Can I apply these TypeScript coding conventions to both front-end and back-end apps?

Yes, you can apply these TypeScript coding conventions across modern front-end and back-end apps to ensure consistent type design, strict mode configuration, and reliable codebase maintenance.

Why standardize TypeScript coding conventions across a team?

Standardizing TypeScript coding conventions across a team solves the problem of inconsistent codebases by codifying explicit rules for strict mode, type design, and runtime validation to achieve maintainable code.