node-best-practices

Codifies Node.js+TypeScript project best practices including error handling, graceful shutdown, and native TS usage without a build step.

1|Updated Mar 14, 2025
One-click install
npx skills add https://github.com/JYbill/bullboard-nestjs --skill node-best-practices-jybill
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: node-best-practices
Source: https://github.com/JYbill/bullboard-nestjs/tree/main/.claude/skills/node
Command: npx skills add https://github.com/JYbill/bullboard-nestjs --skill node-best-practices-jybill

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Node.js projects using TypeScript often struggle with maintaining consistent patterns across teams, leading to brittle error handling, inconsistent shutdown behaviors, and configuration drift.

Core Features & Use Cases

  • Domain-specific best practices for Node.js development with TypeScript, covering type-stripping cautions, error-handling patterns, graceful shutdown, streams, modules, testing, and performance considerations.
  • Guidance for configuring tsconfig.json for type stripping, setting up package.json scripts, handling module resolution and import extensions, and applying these patterns to Node.js 22+ with native TS usage.
  • Real-world scenarios include building robust servers, CLIs, and services without a separate build step while preserving type safety.

Quick Start

Follow these guidelines to initialize a Node.js + TypeScript project with native TS support and type-stripping.

Frequently Asked Questions about node-best-practices

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

FAQPage Schema
How do I run native TypeScript in Node.js without a build step?

Configure tsconfig.json for type stripping and set up package.json scripts to run TypeScript files directly in Node.js 22+. This guide provides the necessary module resolution and import extension configurations to execute TypeScript without a build step while preserving type safety.

What is the best way to handle errors and graceful shutdown in a Node.js TypeScript project?

The best way to handle errors and graceful shutdown in Node.js TypeScript projects is to codify consistent patterns across teams. This guide covers robust error-handling mechanisms and graceful shutdown behaviors to prevent brittle services and configuration drift.

How do I configure tsconfig.json for Node.js type stripping?

Configure tsconfig.json for Node.js type stripping by following specific guidelines for module resolution and import extensions. This ensures native TypeScript usage in Node.js 22+ maintains type-safe imports without requiring a separate compilation step.

Does this Node.js TypeScript guide cover streams and performance patterns?

Yes, this Node.js TypeScript guide covers streams and performance patterns. It codifies best practices for stream handling and performance considerations alongside module and testing patterns to ensure robust server and CLI implementations.

Why should I avoid enums and namespaces in TypeScript projects?

Avoid enums and namespaces in TypeScript projects to enforce type-safe imports and maintain consistent module patterns. This guide codifies best practices to improve Node.js project quality by standardizing on these modern TypeScript conventions.

What are the limitations of type stripping in Node.js 22+?

Limitations of type stripping in Node.js 22+ include specific cautions regarding native TypeScript usage without a build step. This guide outlines the constraints of type stripping and provides best practices for configuring module resolution to avoid configuration drift.