typescript-safety

Enforce strict TypeScript type safety by eliminating `any` types and resolving compiler errors.

1|Updated Mar 21, 2026
One-click install
npx skills add https://github.com/cmbays/mokumo --skill typescript-safety
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: typescript-safety
Source: https://github.com/cmbays/mokumo/tree/main/.claude/skills/typescript-safety
Command: npx skills add https://github.com/cmbays/mokumo --skill typescript-safety

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill enforces rigorous TypeScript type safety within the Mokumo project, eliminating any types, designing complex generics, creating type guards, resolving compiler errors, and ensuring adherence to Zod-first type conventions.

Core Features & Use Cases

  • Eliminates any: Replaces any types with precise, inferred, or explicitly defined types.
  • Generics & Type Guards: Designs and implements complex generic types and robust type guards.
  • Zod & Drizzle Integration: Enforces Mokumo's convention of using Zod for domain entities and Drizzle for infrastructure types.
  • Compiler Error Resolution: Fixes tsc --noEmit failures by addressing unsound inference, missing constraints, or boundary issues.
  • Use Case: When encountering TypeScript errors, introducing new generic types, writing Zod schemas, working with Drizzle row types, designing port interfaces, or when tsc --noEmit fails.

Quick Start

Use the typescript-safety skill to resolve the current TypeScript errors in the project.

Frequently Asked Questions about typescript-safety

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

FAQPage Schema
How do I eliminate `any` types and fix TypeScript compiler errors in my project?

To eliminate `any` types and fix TypeScript compiler errors, replace them with precise inferred types, implement complex generics, and create robust type guards to resolve unsound inference and boundary mismatches.

How do I derive TypeScript types from Zod schemas and Drizzle row types?

Derive TypeScript types from Zod schemas and Drizzle row types by enforcing a Zod-first convention for domain entities and infrastructure types, ensuring runtime values directly dictate static type definitions.

Why does TypeScript unsound inference cause boundary type mismatches during `tsc --noEmit`?

TypeScript unsound inference causes boundary type mismatches during `tsc --noEmit` due to missing generic constraints, which requires designing complex generics and robust type guards to strictly enforce type safety.

Can I use branded IDs for nominal typing to enforce strict TypeScript type safety?

Yes, you can use branded IDs for nominal typing to enforce strict TypeScript type safety, preventing accidental assignment between structurally identical types and ensuring precise domain entity identification.

What is the best way to write type guards for complex generics in TypeScript?

The best way to write type guards for complex generics in TypeScript is to design robust type narrowing functions that address missing constraints and resolve compiler errors when dealing with boundary type mismatches.

Does this approach support designing port interfaces when working with Drizzle row types?

Yes, this approach supports designing port interfaces when working with Drizzle row types by enforcing Zod-first type conventions and utilizing branded IDs to resolve infrastructure boundary type mismatches.