clean-typescript

Enforce correctness-focused TypeScript best practices for app-scale projects.

Updated Feb 1, 2026
One-click install
npx skills add https://github.com/ddoman90/claude-code-intro --skill clean-typescript
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: clean-typescript
Source: https://github.com/ddoman90/claude-code-intro/tree/main/.claude/skills/clean-typescript
Command: npx skills add https://github.com/ddoman90/claude-code-intro --skill clean-typescript

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Write clean, practical TypeScript code that prioritizes correctness and readability over ceremony.

Core Features & Use Cases

  • PREFER type aliases for most situations
  • USE interface for public, extensible object shapes
  • Keep types small and composable
  • PREFER explicit return types for public functions
  • Handle null and undefined with guards
  • Avoid non-null assertions as regular practice

Quick Start

Refactor a sample TypeScript module to align with these rules and improve correctness.

Frequently Asked Questions about clean-typescript

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

FAQPage Schema
What is the best way to refactor TypeScript code for better readability and type safety?

To improve TypeScript code quality, prefer type aliases for most situations and use interfaces for public, extensible object shapes. This keeps types small and composable while enforcing correctness and maintainability.

How do I handle null and undefined values cleanly in TypeScript?

Handle null and undefined in TypeScript by using explicit guards and avoiding non-null assertions as regular practice. This enforces null safety and improves overall correctness across app-scale projects.

Should I use explicit return types for public functions in TypeScript?

Yes, prefer explicit return types for public functions in TypeScript. This enforces correct public API design, prevents unintended type changes, and improves maintainability across app-scale projects.

When do I need to use interfaces instead of type aliases in TypeScript?

Use interfaces in TypeScript when defining public, extensible object shapes. For most other situations, prefer type aliases to keep your types small, composable, and focused on correctness over ceremony.

Can this TypeScript refactoring approach work for app-scale projects?

Yes, this TypeScript refactoring approach targets developers writing code in app-scale projects. It guides type declarations, function design, nullability, and error handling to improve maintainability across large codebases.

Why should I avoid non-null assertions when writing TypeScript?

Avoid non-null assertions in TypeScript because relying on them bypasses the compiler's null safety checks. Using explicit guards instead enforces correctness and prevents runtime errors in your codebase.