One-click install
npx skills add https://github.com/kingstinct/.github --skill typescript-kingstinct
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: typescript
Source: https://github.com/kingstinct/.github/tree/main/typescript/skills/typescript
Command: npx skills add https://github.com/kingstinct/.github --skill typescript-kingstinct

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill enforces rigorous TypeScript best practices to ensure type safety, improve code quality, and enhance developer experience across your projects.

Core Features & Use Cases

  • Strict Type Safety: Prevents common type-related bugs by enforcing strict compiler options.
  • Ergonomic Code: Promotes the use of idiomatic TypeScript features like interfaces, generics, and type guards.
  • Use Case: Automatically check all modified TypeScript files for type errors before committing code, ensuring a robust and maintainable codebase.

Quick Start

Run bun run typecheck to verify all TypeScript files adhere to strict type safety rules.

Frequently Asked Questions about typescript

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

FAQPage Schema
How do I enforce strict TypeScript best practices in my project?

To enforce strict TypeScript best practices, apply strict compiler options, avoid using `any`, prefer interfaces, leverage type inference, and utilize type narrowing techniques to ensure type safety and high code correctness.

What's the best way to prevent type-related bugs in a TypeScript codebase?

The best way to prevent type-related bugs is to enforce strict TypeScript type safety rules across your codebase. This approach prevents common errors and ensures robust, maintainable code by satisfying strict compiler requirements.

How do I check modified TypeScript files for type errors before committing?

To check modified TypeScript files for type errors before committing code, execute a typecheck command. This verifies that all files adhere to strict type safety rules, ensuring a robust and maintainable codebase.

Does this skill require avoiding `any` and preferring interfaces for type safety?

Yes, satisfying strict TypeScript type safety requirements involves explicitly avoiding `any`, preferring interfaces, leveraging type inference, and utilizing type narrowing techniques to achieve high levels of correctness.

Why should I use idiomatic TypeScript features like type guards in my code?

Using idiomatic TypeScript features like type guards, generics, and interfaces promotes ergonomic code development. This practice enforces rigorous best practices, improves code quality, and enhances developer experience across projects.