typescript

Applies TypeScript best practices for type safety, data modeling, and module structure.

1|Updated Dec 30, 2025
One-click install
npx skills add https://github.com/Fidasek009/agents --skill typescript-fidasek009
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: typescript
Source: https://github.com/Fidasek009/agents/tree/main/.kilo/skills/typescript
Command: npx skills add https://github.com/Fidasek009/agents --skill typescript-fidasek009

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? TypeScript codebases often accumulate unsafe patterns like unchecked any types, non-null assertions, and inconsistent naming, which lead to runtime bugs and maintenance friction. This Skill provides a consistent set of standards for writing type-safe, maintainable TypeScript. ## Core Features & Use Cases - Type Safety Enforcement: Guides the use of unknown for external data, schema validation at boundaries, and explicit return types for exported APIs. - Data Modeling Standards: Defines when to use type vs interface, string literal unions, and how to model null vs undefined semantics. - Naming and Module Conventions: Establishes consistent naming (PascalCase types, kebab-case files) and ES module import practices. - Use Case: When writing a new API client, apply these standards to validate responses with type guards, model request payloads explicitly, and keep third-party any contained at the boundary. ## Quick Start Review my TypeScript code and refactor it to follow these type safety and naming standards.

Frequently Asked Questions about typescript

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

FAQPage Schema
How do I handle unknown API response data in TypeScript?▼

Type external data as `unknown` and validate it at the boundary using schemas or type guards before converting it to a specific type. This applies to API responses, parsed files, user input, and storage data.

When should I use type vs interface in TypeScript?▼

Use `type` aliases for authored object shapes, unions, props, and aliases. Reserve `interface` only for ambient, global, or third-party declaration merging where it is required.

What is the difference between null and undefined in TypeScript modeling?▼

Use `undefined` for optional in-process values and `null` for explicit external contracts such as JSON APIs or database values. This distinction keeps internal and external semantics clear.

How do I avoid non-null assertions in TypeScript?▼

Replace non-null assertions with explicit narrowing, default values, or error handling. Use the `??` operator for defaults when `0`, `false`, or empty strings are valid values.

What naming conventions should TypeScript projects follow?▼

Use PascalCase for types and components, camelCase for functions and variables, SCREAMING_SNAKE_CASE for constants, and kebab-case for filenames. Avoid `I` prefixes on type and interface names.

When should I run typecheck after TypeScript changes?▼

Run the project typecheck after any non-trivial TypeScript change, and run focused tests for changed runtime behavior. The project tsconfig and linter remain the source of truth.