nodejs-best-practices

Guide Node.js architecture and framework decisions for new projects.

1|Updated Mar 30, 2026
One-click install
npx skills add https://github.com/mateo-khalil/sumate-ya --skill nodejs-best-practices-mateo-khalil
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nodejs-best-practices
Source: https://github.com/mateo-khalil/sumate-ya/tree/main/.agents/skills/nodejs-best-practices
Command: npx skills add https://github.com/mateo-khalil/sumate-ya --skill nodejs-best-practices-mateo-khalil

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Node.js development decisions can be complex; this guide helps teams think through architecture, framework choices, async patterns, security, and deployment considerations rather than copying patterns.

Core Features & Use Cases

  • Framework selection guidance across Hono, Fastify, NestJS, and Express
  • Runtime and module-system decisions (ESM vs CommonJS; Node.js, Bun, Deno)
  • Layered architecture and error handling principles
  • Async patterns, validation, security, testing, and anti-patterns
  • Decision checklist to de-risk projects

Quick Start

Begin by clarifying constraints and apply the decision tree from this guide to start the 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 right Node.js framework for my API service?

Evaluating Node.js frameworks requires comparing Hono, Fastify, NestJS, and Express against your project constraints. This guide provides a decision tree to assess runtime requirements and architecture needs for API services.

What is the best way to structure a scalable Node.js architecture?

Scalable Node.js architecture uses layered design principles combined with proper async patterns and error handling. This guide helps teams think through these structural decisions rather than copying patterns blindly.

Should I use ESM or CommonJS for my Node.js project?

Choosing ESM or CommonJS depends on your runtime environment and module-system requirements across Node.js, Bun, or Deno. This guide helps clarify these runtime decisions to de-risk your project.

How do I handle security and testing in Node.js applications?

Security and testing in Node.js require following specific anti-patterns and validation practices. This guide covers security, testing, and validation principles to ensure robust application deployment.

Does this Node.js decision guide apply to serverless endpoints?

Yes, this Node.js decision guide applies to serverless endpoints, full-stack apps, and API services. It covers framework evaluation, runtime selection, and scalable architecture practices across various Node.js environments.