nodejs-best-practices
This skill guides you through principled decisions for Node.js development—from picking the right framework (Express, Fastify, NestJS, Hono) based on your deployment target and performance needs, to structuring layered architectures and handling errors consistently. It covers async patterns, validation strategies, security fundamentals, and testing priorities, emphasizing context-aware choices over one-size-fits-all solutions.
nodejs-best-practices teaches framework selection and architectural thinking for Node.js development, not memorized patterns.
AI-generated summary based on this skill's SKILL.md
Decision gist · record as of 2026-07-26
nodejs-best-practices teaches framework selection and architectural thinking for Node.js development, not memorized patterns. This skill guides you through principled decisions for Node.js development—from picking the right framework (Express, Fastify, NestJS, Hono) based on your deployment target and performance needs, to structuring layered architectures and handling errors consistently. It covers async patterns, validation strategies, security fundamentals, and testing priorities, emphasizing context-aware choices over one-size-fits-all solutions.
Use it when
- nodejs-best-practices teaches you when to use async/await versus Promise.all and other patterns.
- nodejs-best-practices provides security principles and a practical checklist for backend development.
Verify before relying
Read SKILL.md below before installing (1 file). Open directory: indexed for reading, not audited.
Install
vudovn/ag-kit/nodejs-best-practices · repository language: TypeScript
Open directory. Skills are indexed for reading, not audited. Review a skill's body before installing it.
Frequently asked questions
AI-generated answers based on this skill's SKILL.md and metadata
How do I choose between Express, Fastify, and NestJS?
nodejs-best-practices guides you through framework selection by matching your project context to each option's strengths. Express offers simplicity and ecosystem maturity for most APIs; Fastify prioritizes raw throughput and low overhead for performance-critical services; NestJS provides opinionated structure and TypeScript-first design for larger teams. The skill emphasizes context-aware choices—consider your deployment target, team size, and performance requirements rather than adopting any framework by default.
What async patterns should I use in Node.js?
nodejs-best-practices teaches you when to use async/await versus Promise.all and other patterns. Async/await excels for sequential operations and readability; Promise.all handles concurrent work efficiently. The skill covers the event loop fundamentals so you understand trade-offs: Promise.all parallelizes independent tasks, while await serializes them. Choosing the right pattern depends on whether operations are dependent or independent, and on your error-handling strategy.
What is a nodejs security checklist I should follow?
nodejs-best-practices provides security principles and a practical checklist for backend development. Key areas include input validation at API boundaries, dependency scanning, secure headers, rate limiting, and secrets management. The skill emphasizes that security is architectural—validation belongs at entry points, error messages should not leak internals, and dependencies need regular audits. A checklist approach ensures you don't skip critical layers as your application grows.
How should I structure a growing Node.js application?
nodejs-best-practices advocates layered architecture to keep concerns separated as complexity grows. Typical layers include routes/controllers (HTTP handling), services (business logic), data access (database queries), and utilities. This structure makes testing easier, lets teams work in parallel, and simplifies refactoring. The skill helps you decide which layers your project needs and how to enforce boundaries—avoiding the common anti-pattern of mixing HTTP logic with business rules.
How do I implement centralized error handling and validation?
nodejs-best-practices teaches you to treat error handling and validation as architectural concerns, not scattered logic. Centralized validation at API boundaries (using libraries like Zod or Joi) prevents invalid data from reaching your business logic. Error handling middleware catches exceptions, logs them consistently, and returns appropriate HTTP responses. The skill shows how this strategy reduces bugs, improves observability, and makes your codebase predictable for new team members.
What Node.js anti-patterns should I avoid?
nodejs-best-practices identifies common pitfalls: mixing async patterns without understanding the event loop, skipping input validation, hardcoding secrets, treating error handling as an afterthought, and building monolithic structures that resist testing. The skill emphasizes that anti-patterns often emerge from context-unaware decisions—using the wrong framework, ignoring security at design time, or deferring architecture until the codebase is unmaintainable. Awareness of these traps helps you make principled choices upfront.
SKILL.md
Rendered from the published skill. Quoted content, verbatim.
Node.js Best Practices
> Principles and decision-making for modern Node.js development. > Learn to THINK, not memorize code patterns.
⚠️ How to Use This Skill
This skill teaches decision-making principles, not fixed code to copy.
- ASK user for preferences when unclear
- Choose framework/pattern based on CONTEXT
- Don't default to same solution every time
1. Framework Selection
Decision Tree
``` What are you building? │ ├── Edge/Serverless (Cloudflare, Vercel) │ └── Hono (zero-dependency, ultra-fast cold starts) │ ├── High Performance API │ └── Fastify (~5x req/sec of Express in Fastify's own hello-world benchmark; benchmark your own workload) │ ├── Enterprise/Team familiarity │ └── NestJS (structured, DI, decorators) │ ├── Legacy/Stable/Maximum ecosystem │
(truncated - see the full file via the links below)
File tree — 1 file
.agents/skills/nodejs-best-practices/SKILL.md
Let your AI agent find skills like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 56,283 agent skills by what they can do, searchable in plain language.
wish › “Choose the right Node.js framework for my project context”
Give your agent the search over MCP, or paste the wish link into any chat. No install? Search from any chat →
Related skills
Architecture guides decision-making through requirements analysis, trade-off evaluation, and ADR documentation. It helps teams capture design rationale and choose patterns systematically, emphasizing simplicity and constraint-aware choices.
Master browser game development by matching your project to the right framework—Phaser for full 2D features, PixiJS for rendering, Three.js or Babylon.js for 3D. Covers WebGPU browser support, asset compression strategies, performance optimization, and PWA implementation for offline play.
Templates offers ready-to-use project scaffolds for 13 different tech stacks, from full-stack web apps to mobile and desktop applications. Match your project type to the appropriate template—whether you're building a SaaS product, REST API, blog, or CLI tool—and get started with pre-configured structure and dependencies.
App Builder is an orchestrator that transforms natural language requests into complete full-stack applications. It analyzes your requirements, determines the appropriate project type and technology stack, then coordinates specialized agents to scaffold and build your project. With 13 built-in templates spanning web, mobile, desktop, and API architectures, it handles the entire setup workflow.
Master the core principles of mobile game development, from touch interface design and performance tuning to navigating platform constraints. This skill covers battery and thermal management strategies, responsive UI patterns, and the specific requirements of iOS and Android app stores. Build games that respect mobile hardware limits while delivering smooth, engaging experiences.
Master the thinking behind running production servers rather than memorizing commands. This skill covers process management tool selection, monitoring strategy across availability and performance, log rotation principles, and scaling decisions. You'll learn health check implementation, security practices, and a structured troubleshooting priority system to diagnose server issues.
More skills database-design (MIT)