typescript

Enforce type-safety, boundary validation, and explicit error handling in TypeScript code.

Updated Apr 18, 2026
One-click install
npx skills add https://github.com/chughtapan/safer-by-default --skill typescript-chughtapan
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: typescript
Source: https://github.com/chughtapan/safer-by-default/tree/main/skills/typescript
Command: npx skills add https://github.com/chughtapan/safer-by-default --skill typescript-chughtapan

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

TypeScript projects often drift from strict type-safety, boundary validation, and explicit error handling; this skill defines the disciplined baseline and helps editors enforce it across code edits and reviews.

Core Features & Use Cases

  • Defines the ideal TypeScript repo state (strict tsconfig, dedicated lint rules, branded identifiers, discriminated unions) and the mapping from human shortcuts to agent-ready implementations.
  • Provides a rejection vocabulary for shortcuts and a principled decision table to guide code decisions during writing and review.
  • Maps eslint-plugin-agent-code-guard rules to TypeScript principles and documents contexts where the skill does not apply.

Quick Start

Apply the TypeScript craft guidelines whenever editing or reviewing .ts files to steer code toward the /safer:setup ideals.

Frequently Asked Questions about typescript

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

FAQPage Schema
How do I enforce strict type-safety and boundary validation when writing TypeScript code?

To enforce strict type-safety in TypeScript, you need a disciplined baseline using strict tsconfig settings, dedicated lint rules, and discriminated unions. This approach codifies boundary validation and maps human shortcuts to agent-ready implementations during code edits.

What is the best way to handle explicit error handling and schema validation in TypeScript?

Explicit error handling and schema validation in TypeScript require codifying rejection vocabularies for shortcuts and applying principled decision tables. This steers code reviews toward an ideal repo state by rejecting implicit any types and unchecked boundaries.

How do I configure eslint-plugin-agent-code-guard rules for TypeScript code reviews?

Configuring eslint-plugin-agent-code-guard rules involves mapping them directly to TypeScript principles like branded identifiers and discriminated unions. This integration provides a rejection vocabulary for human shortcuts during automated code reviews.

When should I not use automated TypeScript refactoring rules?

Automated TypeScript refactoring rules should not be used in contexts where the skill explicitly documents non-applicability, or when a project lacks the prerequisite strict tsconfig setup needed to support principled type-safety enforcement.

How do I map human coding shortcuts to agent-ready TypeScript implementations?

Mapping human shortcuts to agent-ready TypeScript implementations requires a principled decision table that replaces implicit typing with explicit error handling, boundary validation, and branded identifiers to achieve the ideal repo state.