typescript

Enforce TypeScript formatting, error handling, and library usage conventions.

Updated Nov 19, 2025
One-click install
npx skills add https://github.com/alexturpin/cf-app-starter --skill typescript-alexturpin
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: typescript
Source: https://github.com/alexturpin/cf-app-starter/tree/main/.opencode/skills/typescript
Command: npx skills add https://github.com/alexturpin/cf-app-starter --skill typescript-alexturpin

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill ensures consistent and high-quality TypeScript code by enforcing specific formatting, error handling, and library usage conventions.

Core Features & Use Cases

  • Code Formatting: Standardizes the appearance of object literals and conditional blocks.
  • Runtime Execution: Dictates the preferred method for running TypeScript files.
  • Error Handling: Promotes robust error management by discouraging unnecessary try-catch blocks and encouraging invariant assertions.
  • Library Usage: Specifies preferred libraries for ID generation and date operations.
  • Use Case: Maintain a clean and predictable codebase across a team by applying these TypeScript best practices.

Quick Start

Format the provided TypeScript code according to the specified conventions.

Frequently Asked Questions about typescript

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

FAQPage Schema
What are the best practices for TypeScript error handling and try-catch blocks?

TypeScript error handling best practices discourage unnecessary try-catch blocks and encourage using invariant assertions for robust runtime error management and predictable code execution.

How do I standardize TypeScript code formatting for object literals and conditional statements?

Standardize TypeScript code formatting by enforcing specific style rules for object literals and conditional blocks, ensuring consistent code appearance and quality across your development team.

Which libraries should I use for TypeScript ID generation and date operations?

For TypeScript ID generation and date operations, specific preferred libraries are designated to ensure consistency, reliability, and standard runtime execution behavior across the project codebase.

Does this TypeScript style guide apply to runtime execution methods and library choices?

Yes, this TypeScript style guide applies to runtime execution methods by dictating preferred file execution approaches, and it specifies library choices for IDs and dates to enforce standards.

When should I use invariant assertions instead of try-catch in TypeScript?

Use invariant assertions in TypeScript instead of unnecessary try-catch blocks when you need to enforce runtime expectations and handle errors robustly without cluttering the codebase.