nodejs-best-practices

Codify Node.js architectural decisions for APIs, microservices, and serverless setups.

Updated Aug 22, 2025
One-click install
npx skills add https://github.com/AnthonyCongHieu/voice_tool --skill nodejs-best-practices-anthonyconghieu
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nodejs-best-practices
Source: https://github.com/AnthonyCongHieu/voice_tool/tree/main/voice_tools_v1/.agent/skills/nodejs-best-practices
Command: npx skills add https://github.com/AnthonyCongHieu/voice_tool --skill nodejs-best-practices-anthonyconghieu

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Node.js development teams often struggle with inconsistent architectural decisions and ad-hoc patterns; this guide provides principled decision-making to align architecture, patterns, and security across projects.

Core Features & Use Cases

  • Framework selection guidance: helps pick the right framework based on context (edge/serverless, API, enterprise, legacy).
  • Runtime and architecture principles: outlines layered architecture, runtime options, and async patterns.
  • Operational guidance: emphasizes validation, error handling, security, testing, and anti-pattern avoidance.
  • Use Case: When starting a new Node.js service, use these principles to decide between Hono, Fastify, NestJS, or Express based on context.

Quick Start

Describe your project context and I will select an appropriate Node.js architecture.

Frequently Asked Questions about nodejs-best-practices

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

FAQPage Schema
What are Node.js best practices for deciding on architecture and security patterns?

Node.js best practices for architecture involve codifying decisions to avoid ad-hoc patterns. This provides principled decision-making to align layered architecture, async handling, and security across API, microservices, and serverless projects.

How do I choose the right Node.js framework for my project context?

To choose a Node.js framework, you apply contextual decision trees based on your setup. Selection depends on whether your project targets edge/serverless, API, enterprise, or legacy environments.

Can I use these Node.js architecture principles for serverless and microservices setups?

Yes, you can apply these Node.js architecture principles to serverless and microservices setups. The guidance specifically targets API design, microservices, and serverless environments to navigate runtime options and async patterns.

What is the best way to handle Node.js error handling and validation?

The best way to handle Node.js error handling and validation is through operational guidance principles. These emphasize validation, structured error handling, anti-pattern avoidance, and testing within a layered architecture.

When should I not use ad-hoc patterns in Node.js development?

You should avoid ad-hoc patterns in Node.js development when teams struggle with inconsistent architectural decisions. Instead, codify decisions using a decision checklist to align patterns, runtime options, and security trade-offs.