nodejs-best-practices

Guide Node.js framework selection and runtime choices for application architecture.

Updated Jan 31, 2026
One-click install
npx skills add https://github.com/tuyenht/Antigravity-Core --skill nodejs-best-practices-tuyenht
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nodejs-best-practices
Source: https://github.com/tuyenht/Antigravity-Core/tree/main/.agent/skills/nodejs-best-practices
Command: npx skills add https://github.com/tuyenht/Antigravity-Core --skill nodejs-best-practices-tuyenht

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides guidance on making informed architectural decisions for Node.js projects, ensuring efficient, scalable, and maintainable applications.

Core Features & Use Cases

  • Framework Selection: Guides choosing the right Node.js framework (Hono, Fastify, Express, NestJS) based on project needs.
  • Runtime Optimization: Advises on using native TypeScript, ESM vs CommonJS, and modern runtimes like Bun.
  • Architecture & Error Handling: Outlines layered structures, centralized error management, and secure coding principles.
  • Use Case: A developer starting a new high-performance API project can use this Skill to decide between Fastify and Hono, understand runtime considerations, and implement robust error handling.

Quick Start

Guide me in selecting the best Node.js framework for a new, high-performance API project.

Frequently Asked Questions about nodejs-best-practices

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

FAQPage Schema
How do I choose the best Node.js framework for a high-performance API project?

Choosing a Node.js framework depends on project scale and complexity. Use Fastify or Hono for high-performance APIs, Express for simplicity, and NestJS for structured, large-scale applications requiring robust architecture.

What are the architectural best practices for modern Node.js applications?

Architectural best practices for Node.js applications involve adopting layered structures, implementing centralized error management, handling async patterns correctly, and enforcing input validation alongside secure coding principles.

Should I use Bun or Deno instead of the standard Node.js runtime?

Evaluating modern runtimes like Bun and Deno against standard Node.js involves checking native TypeScript support, ESM compatibility, and specific performance targets for your deployment scenarios.

How do I implement centralized error handling in a Node.js application?

Centralized error handling in Node.js requires capturing asynchronous errors globally and routing them through a unified middleware structure to ensure consistent error responses and secure application behavior.

What is the best way to structure a Node.js project for maintainability?

Structuring a Node.js project for maintainability involves applying layered architectures, separating business logic from routing, and standardizing validation and testing protocols across the application.

When should I use ESM instead of CommonJS in Node.js development?

Transitioning to ESM from CommonJS in Node.js development is recommended when utilizing modern runtimes, leveraging native TypeScript execution, and requiring compatibility with contemporary framework ecosystems.