language-typescript

Review TypeScript and JavaScript code for type correctness and maintainability.

4|Updated Feb 12, 2026
One-click install
npx skills add https://github.com/rbaumier/skills --skill language-typescript
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: language-typescript
Source: https://github.com/rbaumier/skills/tree/main/language-typescript
Command: npx skills add https://github.com/rbaumier/skills --skill language-typescript

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires eslint-plugin-jsdoc, eslint-plugin-sonarjs, and includes scripts (resource) and references (resource) components.

What problem does it solve?

Provides opinionated, production-focused guidance to eliminate TypeScript and JavaScript type-driven bugs, unsafe patterns, and slow build/correctness workflows so teams ship predictable, maintainable code. It codifies conventions and checks that catch mistakes reviewers often miss: unsafe casts, runtime-enum surprises, mixed module systems, and missing runtime validation.

Core Features & Use Cases

  • Type correctness & refactor guidance: Diagnose type errors, design generics, choose type vs interface, and restructure code for compiler performance.
  • Opinionated conventions: Enforces no enums, no default exports, avoid any/unsafe as casts, prefer Result-style errors-as-values, and kebab-case files.
  • Tooling & validation: Recommends strict tsconfig flags, env validation with @t3-oss/env-core + Zod, using modern features (as const, satisfies, using), and provides a ts-audit script for linting and checks.
  • Use cases: Refactoring a legacy repo to strict flags, designing robust generics, fixing async patterns and resource cleanup, or auditing CI for TypeScript regressions.

Quick Start

Ask the skill to review a TypeScript file or pull request for type-safety, tsconfig and lint rule violations, and produce a prioritized refactor plan and code patches.

Frequently Asked Questions about language-typescript

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

FAQPage Schema
How do I review TypeScript code for type-safety and unsafe patterns?

To review TypeScript code, analyze files for unsafe casts, missing runtime validation, and default exports. This process generates a prioritized refactor plan that enforces strict type-safety conventions and corrects structural issues.

What is the best way to configure strict tsconfig flags for a legacy TypeScript project?

Configuring strict tsconfig flags requires enabling strict mode and running a ts-audit script to catch compiler regressions. This establishes strict type-checking rules that eliminate unsafe runtime patterns and improve code correctness.

Why does TypeScript runtime validation fail without Zod schemas?

TypeScript runtime validation fails without Zod because types are erased at runtime, allowing invalid data structures to pass unchecked. Integrating Zod schemas validates environment variables and inputs, ensuring data integrity at execution.

Can I use this TypeScript refactoring guidance with Bun or Deno projects?

Yes, TypeScript refactoring guidance applies to Node.js, Bun, and Deno projects. It provides tool-agnostic conventions for module organization, async patterns, and type correctness across these JavaScript runtimes.

Why should I avoid enums and default exports in TypeScript?

Avoiding enums and default exports prevents runtime-enum surprises and mixed module systems. Preferring named types and named exports ensures safer type inference, predictable module resolution, and better compiler performance.

How do I design robust TypeScript generics for type-safe error handling?

Designing robust TypeScript generics for error handling involves using Result-style error values instead of throwing exceptions. This approach leverages generics to enforce compile-time type safety for both successful returns and expected failures.