typescript-enforcer

Detect and fix unsafe TypeScript patterns in generated TS/TSX files.

1|Updated Apr 27, 2026
One-click install
npx skills add https://github.com/Saurav-snapwork/NewAppTemplate --skill typescript-enforcer-saurav-snapwork
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: typescript-enforcer
Source: https://github.com/Saurav-snapwork/NewAppTemplate/tree/main/.github/skills/typescript-enforcer
Command: npx skills add https://github.com/Saurav-snapwork/NewAppTemplate --skill typescript-enforcer-saurav-snapwork

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Automatically detects and fixes unsafe TypeScript patterns in generated TS/TSX files, helping teams move from generation to production with fewer runtime errors.

Core Features & Use Cases

  • Enforces type-safety after code generation by scanning for unsafe patterns (any, unknown, or missing explicit return types) and applying safe transformations where possible.
  • Validates code against strict tsconfig settings, reports violations, and prioritizes fixes that improve null safety, readability, and performance.
  • Use Case: In a codegen pipeline for a React/TypeScript project, run this skill before the Final Validator to ensure generated code is clean, strongly typed, and production-ready.

Quick Start

Run the TypeScript Enforcer after code generation to scan generated TS/TSX files and apply safe fixes and validations.

Frequently Asked Questions about typescript-enforcer

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

FAQPage Schema
How do I fix unsafe TypeScript patterns in generated TSX files after codegen?▼

You can fix unsafe TypeScript patterns in generated files by scanning for `any`, `unknown`, and non-null assertions, then applying safe transformations and enforcing strict tsconfig validation to catch violations before production.

What is TypeScript type-safety enforcement for code generation pipelines?▼

TypeScript type-safety enforcement for codegen pipelines is the process of validating generated TS/TSX files against strict tsconfig settings, detecting unsafe patterns like missing explicit return types, and auto-fixing them to reduce runtime errors.

How do I enforce strict tsconfig settings and null safety in React Native TypeScript projects?▼

Enforce strict tsconfig settings and null safety in React Native by scanning generated TypeScript files for improper nullability and missing explicit return types, then applying auto-fixes where safe and generating structured reports for manual follow-up.

Does the TypeScript enforcer work with React Native and standard TypeScript codegen workflows?▼

Yes, the TypeScript enforcer works with React Native and standard TypeScript codegen workflows by identifying unsafe patterns in generated TS/TSX files, validating code against strict configurations, and prioritizing fixes that improve null safety and readability.

What are the limitations of auto-fixing unsafe TypeScript patterns after code generation?▼

The limitation of auto-fixing unsafe TypeScript patterns after code generation is that it only applies safe transformations automatically, requiring structured reports and manual guidance to remediate complex violations that cannot be safely auto-fixed.