ts-coding-standards

Enforce strict TypeScript coding standards for type safety and error handling.

Updated Jan 31, 2026
One-click install
npx skills add https://github.com/tacogips/git-xnotes --skill ts-coding-standards
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ts-coding-standards
Source: https://github.com/tacogips/git-xnotes/tree/main/.claude/skills/ts-coding-standards
Command: npx skills add https://github.com/tacogips/git-xnotes --skill ts-coding-standards

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill codifies TypeScript coding standards to reduce runtime errors, improve maintainability, and ensure consistent API boundaries across a codebase.

Core Features & Use Cases

  • Enforces type safety by promoting discriminated unions, branded types, and strict type guards.
  • Encourages explicit error handling strategies, such as Result/neverthrow patterns, and clear API boundaries.
  • Guides project layout conventions and API design for scalable TypeScript applications across teams.

Quick Start

Review the guidelines in this Skill, then apply them to new or existing TS code by identifying opportunities to use branded types, implement discriminated unions for error states, and refactor modules to align with the recommended project structure.

Frequently Asked Questions about ts-coding-standards

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

FAQPage Schema
How do I enforce strict TypeScript coding standards to improve type safety?

To enforce strict TypeScript coding standards, apply patterns like discriminated unions, branded types, and strict type guards. This ensures consistent API boundaries and improves type safety across your codebase by catching errors at compile time.

What is the best way to handle unknown errors in TypeScript services?

The best way to handle unknown errors in TypeScript is to use explicit error handling strategies like the Result or neverthrow patterns. These approaches enforce clear API boundaries and ensure robust error management across modules and services.

How do I use discriminated unions for error states in TypeScript?

Using discriminated unions for error states in TypeScript involves defining explicit type guards to distinguish between different states. This pattern enforces type safety by ensuring all possible error conditions are handled at compile time.

What project layout conventions work best for scalable TypeScript applications?

For scalable TypeScript applications, project layout conventions should focus on ensuring consistent API boundaries across teams. Applying these conventions to new or existing modules helps reduce runtime errors and improves overall code maintainability.

Can I use branded types to refactor existing TypeScript code?

Yes, you can use branded types to refactor existing TypeScript code by identifying opportunities to enforce stricter type safety. This process involves applying branded types to variables to prevent invalid assignments and align modules with recommended standards.