typescript

Enforce strict TypeScript patterns for Next.js 15, Supabase, and React 19 stacks.

Updated Aug 17, 2025
One-click install
npx skills add https://github.com/global-ministries/global-connect --skill typescript-global-ministries
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: typescript
Source: https://github.com/global-ministries/global-connect/tree/main/.agent/skills/typescript
Command: npx skills add https://github.com/global-ministries/global-connect --skill typescript-global-ministries

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill enforces strict TypeScript patterns and best practices within the GlobalConnect stack, ensuring robust and maintainable code.

Core Features & Use Cases

  • Type Safety: Leverage advanced TypeScript features like generics, discriminated unions, and satisfies for compile-time safety.
  • Developer Productivity: Reduce runtime errors and improve code clarity by inferring types from Zod schemas and correctly typing Supabase results.
  • Use Case: When writing a new API endpoint in Next.js, use this Skill to define precise request and response types using Zod and Supabase types, ensuring data integrity.

Quick Start

Use the typescript skill to define a type for Supabase query results.

Frequently Asked Questions about typescript

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

FAQPage Schema
How do I enforce strict TypeScript patterns for Next.js 15 and Supabase?

To enforce strict TypeScript patterns for Next.js 15 and Supabase, apply utility types, generics, and type narrowing to guarantee compile-time safety. This approach standardizes type safety across the stack and reduces runtime errors.

What is the best way to type Supabase query results in a React 19 application?

Typing Supabase query results in React 19 requires leveraging database type patterns and the `satisfies` keyword. This method ensures data integrity by validating that inferred query types match your database schema.

How do I infer TypeScript types from Zod schemas for API endpoints?

Infer TypeScript types from Zod schemas to define precise request and response structures for API endpoints. This technique improves developer productivity by automatically generating types that validate data integrity.

Can I use the `satisfies` keyword and discriminated unions for type narrowing?

Yes, using the `satisfies` keyword alongside discriminated unions enables advanced type narrowing without changing the inferred type. This combination provides compile-time safety while maintaining predictable runtime values.

When do I need utility types and generics for maintaining code quality?

You need utility types and generics when writing flexible, reusable components that require strict type safety. They facilitate compile-time validation across dynamic data structures, significantly enhancing code maintainability.