typescript-write

Generate maintainable TypeScript/JavaScript code with strict type safety and modern ES6+ patterns.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/nodays-off/rack-reserve --skill typescript-write-nodays-off
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: typescript-write
Source: https://github.com/nodays-off/rack-reserve/tree/main/.claude/skills/typescript-write
Command: npx skills add https://github.com/nodays-off/rack-reserve --skill typescript-write-nodays-off

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill guides the development of TypeScript and JavaScript code with attention to type safety, modern patterns, and maintainability, helping teams write robust, scalable code faster.

Core Features & Use Cases

  • Type Safety: Enforce strict configurations, prefer unknown over any, and use discriminated unions.
  • Code Organization: Barrel exports, dedicated types files, and clean import paths.
  • Modern Patterns: Async/await, destructuring, optional chaining, and template literals.
  • Error Handling: Custom error classes, runtime validation with tools like Zod.
  • UI/React Patterns: Functional components, server components, and data-fetching strategies.

Quick Start

Start a new TypeScript project with strict settings and scaffold best-practice structure. Set up tsconfig.json with strict mode, configure ESLint with TypeScript plugin, and implement a simple typed API.

Frequently Asked Questions about typescript-write

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

FAQPage Schema
How do I write TypeScript code that maintains strict type safety?

Strict type safety in TypeScript starts with enabling strict mode in tsconfig.json, preferring unknown over any, using discriminated unions for type narrowing, and adding explicit return types to functions. This prevents runtime errors and catches type mismatches at compile time.

What's the best way to organize imports and exports in a TypeScript project?

Use barrel exports (index.ts files) to re-export types and functions, maintain dedicated types files, and configure path aliasing in tsconfig.json for clean import paths. This reduces import clutter and makes refactoring easier across large projects.

How do I handle errors properly in TypeScript applications?

Implement custom error classes, use runtime validation with tools like Zod to validate external data, and combine async/await with try-catch blocks. This ensures predictable error handling and type-safe data at runtime.

Can I use these TypeScript patterns with React and Next.js?

Yes. Apply strict TypeScript configuration, functional components, server components in Next.js, and type-safe data-fetching strategies. These patterns scale across React/Next.js environments while maintaining code quality and type safety.

What ESLint and TypeScript configuration do I need to enforce code standards?

Configure ESLint with the TypeScript plugin, enable strict compiler options including noImplicitAny and noUnusedLocals, and use modern ES6+ features like destructuring and optional chaining. This automates code-quality enforcement across your team.