typescript-guidelines

Enforce strict TypeScript discipline to prevent unsafe patterns and improve maintainability.

1|Updated Apr 22, 2026
One-click install
npx skills add https://github.com/itzcull/javascript-skills --skill typescript-guidelines-itzcull
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: typescript-guidelines
Source: https://github.com/itzcull/javascript-skills/tree/main/skills/typescript-guidelines
Command: npx skills add https://github.com/itzcull/javascript-skills --skill typescript-guidelines-itzcull

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

TypeScript guidelines to enforce strict mode and type-safety across projects, reducing runtime errors and improving maintainability.

Core Features & Use Cases

  • Run TypeScript in strict mode across both new and existing codebases.
  • Prohibit the use of any, avoid unchecked type assertions, and rely on schemas for runtime validation where applicable.
  • Apply at code generation, review, refactoring, and tsconfig audits to ensure consistent type discipline and boundaries.

Quick Start

Apply these rules to any new or updated TypeScript work to ensure strict compliance and safer refactors.

Frequently Asked Questions about typescript-guidelines

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

FAQPage Schema
How do I enforce strict TypeScript mode and eliminate unsafe type assertions?

To enforce strict TypeScript mode, enable strict flags in tsconfig and prohibit `any` alongside unchecked type assertions. This discipline prevents unsafe patterns during code generation, reviews, and refactoring while improving overall type safety.

What is schema-first TypeScript and when do I need it for runtime validation?

Schema-first TypeScript uses schemas to parse and validate data at trust boundaries, guaranteeing runtime type safety. You need this approach when crossing frontend and backend boundaries to verify untrusted data shapes before application consumption.

How do I audit my tsconfig for strict type-safety across an existing codebase?

You audit tsconfig for type-safety by verifying strict mode is enabled and checking for configurations that allow unsafe patterns. Apply these rules during refactoring to enforce consistent type discipline and safer boundaries across existing projects.

Can I use strict TypeScript guidelines for both frontend and backend projects?

Yes, you can apply strict TypeScript guidelines across both frontend and backend projects. The rules enforce type discipline universally, requiring strict mode and schema-first boundaries to improve maintainability and prevent runtime errors everywhere.

Why should I avoid using any in TypeScript and what are the limitations of unchecked assertions?

You should avoid `any` in TypeScript because it bypasses compiler type checking, leading to potential runtime errors. Unchecked type assertions are limited because they override the compiler without validation, creating unsafe patterns that reduce maintainability.

What's the best way to prevent runtime errors in TypeScript refactoring?

The best way to prevent runtime errors during TypeScript refactoring is to run in strict mode, prohibit `any`, and use schema-first parsing at trust boundaries. This enforces consistent type discipline and validates untrusted data shapes before use.