typescript

Enforce TypeScript 6 naming, guard clause, and DDD file guidelines in NX monorepos.

Updated Mar 26, 2026
One-click install
npx skills add https://github.com/johnnystefan/test-saas-business --skill typescript-johnnystefan
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: typescript
Source: https://github.com/johnnystefan/test-saas-business/tree/main/skills/typescript
Command: npx skills add https://github.com/johnnystefan/test-saas-business --skill typescript-johnnystefan

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Prevents inconsistent TypeScript usage, unclear naming, and tangled logic inside NX services and shared libraries by enforcing readability-first patterns.

Core Features & Use Cases

  • Readability Philosophy: Encourages prose-like public APIs, split responsibilities, declarative naming, constants over magic, and single-purpose files.
  • Safety Guidelines: Mandates guard clauses, RO-RO input/output shapes, no any, flat interfaces, coupled optionals via discriminated unions, and TypeScript 6 migration rules.
  • Use Case: Refactor a NestJS use case or React hook by applying these rules to keep domain entities, shared types, and UI helpers aligned to strict TypeScript 6 expectations.

Quick Start

Ask for a refactor of the target NX module using the defined TypeScript 6 standards and readability rules.

Frequently Asked Questions about typescript

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

FAQPage Schema
What's the best way to enforce strict TypeScript 6 rules in an NX monorepo?

Yes, you can refactor NestJS use cases and React hooks by applying strict guard clauses, discriminated unions for coupled optionals, and declarative naming conventions. This keeps domain entities and UI helpers aligned with strict TypeScript 6 expectations without relying on any types.

How do I apply domain-driven design file guidelines when refactoring TypeScript?

To apply domain-driven design file guidelines, you enforce single-responsibility implementations and split responsibilities into single-purpose files. This approach separates domain entities, use cases, and shared utilities to prevent unclear naming and tangled logic in your services.

Why does my TypeScript code lose readability in shared monorepo libraries?

TypeScript code loses readability in shared monorepo libraries due to inconsistent usage, magic constants, and tangled logic. Enforcing prose-like public APIs, strict typing, and single-purpose files resolves these issues and restores clarity across the codebase.

Do I need NX to use these strict TypeScript readability rules?

These strict TypeScript readability rules are specifically designed for the NX monorepo environment. They target admin, customer, gateway, and backend services within NX to ensure domain entities and shared types maintain consistent strict typing standards.