nodejs-best-practices

Guides Node.js architecture decisions covering framework selection, async patterns, security, and validation.

Updated Jun 8, 2026
One-click install
npx skills add https://github.com/raulisai/eva02 --skill nodejs-best-practices-raulisai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nodejs-best-practices
Source: https://github.com/raulisai/eva02/tree/main/.agents/skills/nodejs-best-practices
Command: npx skills add https://github.com/raulisai/eva02 --skill nodejs-best-practices-raulisai

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Choosing the right Node.js framework, async pattern, and security approach is error-prone when developers default to familiar tools instead of context-driven decisions. This Skill provides decision-making principles for Node.js development in 2025, with project-specific overrides for the EVA platform's NestJS backend. ## Core Features & Use Cases - Framework Selection Guidance: Decision trees and comparison tables for Hono, Fastify, Express, and NestJS based on deployment target, cold start needs, and team experience. - Async & Architecture Principles: Layered architecture patterns, event loop awareness, Promise pattern selection, and CPU-bound workload handling. - Security & Validation Checklists: Input validation boundaries, library selection (Zod, Valibot, ArkType), status code conventions, and a security mindset checklist. - Use Case: When designing a new API endpoint in the EVA project, use this Skill to reason about async behavior and validation strategy while respecting the existing NestJS, Supabase, and multi-tenant org_id constraints. ## Quick Start Ask the AI to help you choose the right Node.js framework and async pattern for your new API service while following EVA project conventions.

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 between Hono, Fastify, Express, and NestJS for a Node.js API?

Choose based on deployment target and context: Hono for edge and serverless with fast cold starts, Fastify for high-performance APIs, NestJS for enterprise structure with dependency injection, and Express for legacy or maximum ecosystem compatibility.

When should I use Promise.all versus Promise.allSettled in Node.js?

Use Promise.all for parallel independent operations where all must succeed, and Promise.allSettled when some operations can fail without aborting the rest. Use async/await for sequential operations and Promise.race for timeouts.

Can I use Express or Fastify instead of NestJS in the EVA project?

No. EVA's backend is NestJS in apps/eva-core and must not be replaced unless the user explicitly requests a separate service. Use this Skill only for general Node.js reasoning like async behavior, security, and package hygiene.

Which validation library should I use: Zod, Valibot, or ArkType?

Zod is best for TypeScript-first projects with type inference, Valibot for smaller bundles via tree-shaking, and ArkType for performance-critical paths. Validate at all boundaries: API entry points, database operations, external data, and environment variables.

Why does my Node.js server slow down under CPU-intensive tasks?

Async patterns only help I/O-bound work like database queries and HTTP requests. CPU-bound work such as crypto, image processing, or complex calculations blocks the event loop and should be offloaded to worker threads.

What are the limitations of this Node.js guidance skill?

It teaches decision-making principles rather than copy-paste code, and it cannot install packages, change lockfiles, deploy, or mutate production data without explicit approval. Environment-specific validation and testing remain the user's responsibility.