moai-lang-typescript

Apply TypeScript 5.9+ patterns to React and Next.js apps with tRPC and Zod.

Updated Jan 16, 2026
One-click install
npx skills add https://github.com/yarang/fastapi-error-code --skill moai-lang-typescript-yarang
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: moai-lang-typescript
Source: https://github.com/yarang/fastapi-error-code/tree/main/.claude/skills/moai-lang-typescript
Command: npx skills add https://github.com/yarang/fastapi-error-code --skill moai-lang-typescript-yarang

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill bundles advanced TypeScript 5.9+ practices with modern React and Next.js workflows, helping developers write safer, more scalable code and ship type-safe APIs faster.

Core Features & Use Cases

  • TypeScript 5.9+ mastery: leverage features like the satisfies operator, deferred module evaluation, and decorators to strengthen type safety and compile-time guarantees.
  • React 19 Server Components + Next.js 16 App Router: design mixed server/client components with robust data flows and routing strategies.
  • Type-safe APIs with tRPC & Zod: build end-to-end typed APIs and strongly validated inputs/outputs.
  • Real-world Scenarios: structure modules for server actions, routing, and API layers with clear type contracts in a production app.

Quick Start

Initialize a new TypeScript/Next.js project, install TS 5.9+, set up a sample tRPC route with Zod validation, and observe end-to-end type safety across client, server, and API layers.

Frequently Asked Questions about moai-lang-typescript

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

FAQPage Schema
How do I build type-safe APIs with tRPC and Zod in Next.js?

Build type-safe APIs with tRPC and Zod by defining schema validation for inputs and outputs, ensuring end-to-end type safety across client and server boundaries. This approach guarantees strongly validated data flows throughout your Next.js application.

What TypeScript 5.9 features help with React server components?

TypeScript 5.9 features like the satisfies operator and deferred module evaluation help type React server components by strengthening compile-time guarantees. These typing patterns ensure robust data flows when designing mixed server and client component architectures.

Does this TypeScript typing workflow support the Next.js App Router?

Yes, this TypeScript typing workflow fully supports the Next.js App Router. It provides targeted patterns for designing mixed server and client components with robust data flows and routing strategies tailored for Next.js 16 applications.

How do I structure server actions with clear type contracts in TypeScript?

Structure server actions with clear type contracts by applying TypeScript 5.9+ patterns to define module boundaries and API layers. This approach ensures strongly validated inputs and outputs across server and client components in a production environment.

What's the best way to validate inputs across client and server boundaries in React?

The best way to validate inputs across client and server boundaries is using Zod schema validation combined with tRPC. This integration provides end-to-end typed APIs and strongly validated data flows for modern React and Next.js applications.

Why use the satisfies operator for schema validation in TypeScript?

Use the satisfies operator for schema validation to strengthen type safety and compile-time guarantees without widening the inferred type. It ensures your Zod schemas and React component props match expected contracts precisely.