nodejs-best-practices
Apply Node.js Best Practices
Get guidance on Node.js architecture decisions, framework selection, async patterns, and security principles. This skill teaches decision-making frameworks rather than copy-paste code.
Baixar o ZIP da skill
Upload no Claude
Vá em Configurações → Capacidades → Skills → Upload skill
Ative e comece a usar
Testar
A utilizar "nodejs-best-practices". I need to build a high-performance API that will handle 10,000 requests per second. What should I use?
Resultado esperado:
For high-performance APIs handling significant load, Fastify is recommended. It offers 2-3x better performance than Express due to its schema-based serialization and lower overhead. Consider: 1) Use Fastify with async/await for routes, 2) Implement rate limiting to protect from abuse, 3) Add validation early using Zod or similar, 4) Consider worker threads for CPU-intensive operations.
A utilizar "nodejs-best-practices". What anti-patterns should I avoid in Node.js?
Resultado esperado:
Key anti-patterns to avoid: 1) Using Express for edge/serverless projects (use Hono instead), 2) Using synchronous file operations in production, 3) Putting business logic in controllers, 4) Skipping input validation, 5) Hardcoding secrets, 6) Blocking the event loop with CPU-intensive work.
Auditoria de Segurança
SeguroAll 34 static findings are FALSE POSITIVES. This is pure documentation content (SKILL.md) containing educational material about Node.js best practices. The scanner misidentified ASCII tree diagrams (using backticks) as shell commands, security advice as vulnerabilities, and HTTP status code references as system reconnaissance. No executable code, network operations, or file operations are present.
Pontuação de qualidade
O Que Você Pode Construir
New Project Architecture
Getting framework and architecture recommendations when starting a new Node.js project based on deployment target and requirements.
Code Review Guidance
Using the decision checklist and anti-patterns section to review existing Node.js code for common issues.
Security Implementation
Applying the security checklist and validation principles when building secure Node.js applications.
Tente Estes Prompts
I am building a [type of application] with these requirements: [list requirements]. What framework should I use and why?
Help me structure my Node.js application. It has [describe features]. Should I use a layered architecture?
I need to fetch data from [number] external APIs and then process the results. Which async pattern should I use?
What security measures should I implement for a Node.js API that handles user authentication and payments?
Melhores Práticas
- Ask users about their specific context before recommending solutions - do not assume one framework fits all needs
- Consider the deployment target early in the decision process (Edge, Serverless, Container, VM)
- Validate all inputs at API boundaries and treat all external data as untrusted
- Use layered architecture for projects expected to grow beyond simple scripts
Evitar
- Defaulting to Express for every project without considering alternatives
- Using synchronous file operations (fs.readFileSync) in production code
- Skipping input validation and trusting client data
- Putting business logic directly in route handlers instead of service layer
Perguntas Frequentes
Which Node.js framework should I use in 2025?
Should I use TypeScript with Node.js?
How do I handle errors in Node.js?
When should I use Promise.all vs Promise.allSettled?
How do I secure my Node.js application?
Can I use sync file operations in Node.js?
Detalhes do Desenvolvedor
Autor
sickn33Licença
MIT
Repositório
https://github.com/sickn33/antigravity-awesome-skills/tree/main/skills/nodejs-best-practicesReferência
main
Estrutura de arquivos
📄 SKILL.md