Skip to content
Back to skills

Nodejs

ASecurity

Node.js server development patterns including async patterns, error handling, and security best practices.

  • 57 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 17, 2026
developmenttypescriptnodenodejsexpressapisecurityperformance

Works with

  • cli
  • api

Security analysis

A100/100

Scanned October 17, 2026

npx -y skills add diegosouzapw/awesome-omni-skill --skill nodejs --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Nodejs?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Nodejs
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/diegosouzapw-nodejs/badge)](https://www.skillsdirectory.com/skills/diegosouzapw-nodejs)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: nodejs
description: Node.js server development patterns including async patterns, error handling, and security best practices.
globs: ["**/package.json", "**/tsconfig.json", "**/server.js", "**/index.js", "**/app.js"]
priority: 90
tags: ["tool"]
---

# Node.js Best Practices

## Project Structure
- src/ for source code
- src/lib/ for utilities
- src/types/ for TypeScript types
- tests/ for test files
- Keep entry point minimal

## Async Patterns
- Use async/await everywhere
- Handle all promise rejections
- Use Promise.all for parallel tasks
- Use Promise.allSettled when all must complete
- Set timeouts for external calls
- Use AbortController for cancellation

## Error Handling
- Use centralized error handler
- Create custom error classes
- Log errors with context (request ID, user)
- Return appropriate status codes
- Never expose stack traces in production

## Environment
- Use dotenv for local config
- Validate env variables at startup (envalid)
- Use different configs per environment
- Never commit secrets
- Use secret managers in production

## Security
- Validate all input (Zod, Joi)
- Use helmet for HTTP headers
- Rate limit APIs (express-rate-limit)
- Keep dependencies updated (npm audit)
- Use npm/yarn lockfiles

## Performance
- Use clustering for multi-core
- Enable gzip compression
- Implement caching (Redis)
- Use connection pooling
- Profile with clinic.js

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.