One-click install
npx skills add https://github.com/bitcoin-is-money/bim-app --skill ts-rules
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ts-rules
Source: https://github.com/bitcoin-is-money/bim-app/tree/main/.claude/skills/ts-rules
Command: npx skills add https://github.com/bitcoin-is-money/bim-app --skill ts-rules

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

TypeScript projects often struggle with inconsistent typing, unclear interfaces, and boilerplate style that leaks type-safety guarantees. This Skill provides a comprehensive set of conventions to improve code quality and maintainability by enforcing strict rules and practices.

Core Features & Use Cases

  • Enforce explicit return types on exported functions to improve API clarity.
  • Avoid using any and null by preferring unknown with type guards and undefined for absence.
  • Use branded types for strong domain modeling and safer casts.
  • Standardize naming, comments, and code organization to reduce cognitive load and onboarding time.
  • Provide a common reference for reviews, linting, and code-quality checks across TypeScript codebases.

Quick Start

Run this skill to apply the TypeScript rules across your codebase and generate a standards-compliant review checklist.

Frequently Asked Questions about ts-rules

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

FAQPage Schema
How do I enforce explicit return types and ban any in TypeScript projects?

To enforce explicit return types and ban any in TypeScript projects, apply coding conventions that require explicit return types on exported functions and replace any with unknown paired with type guards for safer type narrowing.

What is the best way to handle null and undefined for safer TypeScript type checking?

The best way to handle null and undefined for safer TypeScript type checking is to prefer undefined for absence and use unknown with type guards instead of null, ensuring stricter type safety across your codebase.

How do I use branded types for strong domain modeling in TypeScript?

Use branded types in TypeScript for strong domain modeling and safer casts, establishing strict boundaries around distinct domain values to prevent invalid assignments and improve overall code quality.

Can I use these TypeScript coding standards for code reviews and linting?

Yes, you can use these TypeScript coding standards for code reviews and linting, providing a common reference to check code quality, standardize naming, and reduce cognitive load across modules, libraries, and components.

Does this TypeScript static analysis require any specific dependencies?

No, this TypeScript static analysis requires no specific dependencies, allowing you to apply the coding conventions and generate a standards-compliant review checklist directly within your existing TypeScript environment.

Why should I use unknown instead of any for TypeScript error handling?

You should use unknown instead of any for TypeScript error handling because unknown forces the use of type guards, preventing untyped leaks and preserving type-safety guarantees throughout your application logic.