dev-style-typescript

Enforce TypeScript conventions for naming, typing, and function signatures.

Updated Jun 17, 2025
One-click install
npx skills add https://github.com/nikbrunner/dots --skill dev-style-typescript
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dev-style-typescript
Source: https://github.com/nikbrunner/dots/tree/main/common/.agents/skills/dev-style-typescript
Command: npx skills add https://github.com/nikbrunner/dots --skill dev-style-typescript

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Standardize TypeScript practices across projects to reduce runtime errors, improve readability, and accelerate onboarding.

Core Features & Use Cases

  • Enforces no usage of any type; unknown is used as a fallback where applicable
  • Encourages deriving types from runtime values for safer, more maintainable code
  • Promotes best practices in function design, typing, and naming, with a bias toward inference and minimal null handling
  • Supports guidelines for anti-patterns and using standard APIs over excessive abstractions

Quick Start

Apply these conventions to a TypeScript project to establish a shared set of guidelines for typing, naming, and function design.

Frequently Asked Questions about dev-style-typescript

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

FAQPage Schema
How do I enforce TypeScript conventions to prevent runtime errors across my codebase?

You can enforce TypeScript best practices by applying conventions that prohibit the any type, encourage type inference, and prefer deriving types from runtime values. This standardized approach improves readability, type safety, and maintainability across multiple modules and teams.

What is the best way to standardize TypeScript coding standards for a development team?

Standardize TypeScript coding by establishing shared guidelines for typing, naming, and function design. These conventions emphasize minimal runtime null handling, prefer standard APIs over excessive abstractions, and guide developers toward safer code patterns to accelerate team onboarding.

How do I stop using any in TypeScript and improve type safety?

Improve type safety by replacing any with the unknown type as a fallback. Conventions guide you to derive types from runtime values and rely on type inference, ensuring safer data handling and reducing untyped runtime errors.

Can these TypeScript best practices apply to existing projects with different module structures?

Yes, these TypeScript conventions apply across projects regardless of module structure. They provide shared guidelines for typing, function design, and naming that can be integrated to improve readability and standardize practices across diverse codebases and teams.

When should I avoid deriving types from runtime values in TypeScript?

Avoid deriving types from runtime values when it introduces excessive abstractions over standard APIs. The conventions emphasize minimal runtime null handling and direct typing strategies to maintain readability and prevent overly complex type structures.