node-best-practices

Installation
Summary

Native TypeScript support in Node.js with type stripping, async patterns, error handling, and production best practices.

  • Covers type stripping (Node.js 22.6+) for running .ts files directly without build tools; includes tsconfig.json setup and import extension rules
  • Provides patterns for error handling, graceful shutdown, async/await, streams, and module resolution across the full Node.js stack
  • Includes diagnostic workflows for flaky tests, profiling slow paths, and performance optimization with concrete examples
  • Addresses environment configuration, logging, caching strategies, and testing approaches tailored to Node.js applications
SKILL.md

When to use

Use this skill whenever you are dealing with Node.js code to obtain domain-specific knowledge for building robust, performant, and maintainable Node.js applications.

TypeScript with Type Stripping

When writing TypeScript for Node.js, use type stripping (Node.js 22.6+) instead of build tools like ts-node or tsx. Type stripping runs TypeScript directly by removing type annotations at runtime without transpilation.

Key requirements for type stripping compatibility:

  • Use import type for type-only imports
  • Use const objects instead of enums
  • Avoid namespaces and parameter properties
  • Use .ts extensions in imports

Minimal example — a valid type-stripped TypeScript file:

// greet.ts
import type { IncomingMessage } from 'node:http';
Related skills

More from mcollina/skills

Installs
421
Repository
mcollina/skills
GitHub Stars
1.8K
First Seen
Jan 31, 2026