nodejs-backend-patterns – skill Lập trình cho agent AI
Xây dựng dịch vụ backend Node.js sẵn sàng cho production với Express/Fastify, triển khai mẫu middleware, xử lý lỗi, xác thực, tích hợp cơ sở dữ liệu và thực hành tốt nhất khi thiết kế API. Dùng khi tạo server Node.js, REST API, backend GraphQL hoặc kiến trúc microservices.
Cài skill nodejs-backend-patterns bằng một lệnh
Chọn công cụ bạn đang dùng, copy lệnh và dán vào terminal. Skill sẽ nằm trong thư mục skills của công cụ đó và sẵn sàng dùng ở phiên làm việc tiếp theo.
Claude Code
mkdir -p ~/.claude/skills && curl -fsSL https://skill.dn1nguoi.com/z/nodejs-backend-patterns-ef45e.tgz | tar xz -C ~/.claude/skills
Gọi trong Claude Code: /nodejs-backend-patterns – rồi mô tả công việc bạn muốn làm.
Codex
mkdir -p ~/.codex/skills && curl -fsSL https://skill.dn1nguoi.com/z/nodejs-backend-patterns-ef45e.tgz | tar xz -C ~/.codex/skills
Gọi trong Codex: $nodejs-backend-patterns – rồi mô tả công việc bạn muốn làm.
Hermes Agent
mkdir -p ~/.hermes/skills && curl -fsSL https://skill.dn1nguoi.com/z/nodejs-backend-patterns-ef45e.tgz | tar xz -C ~/.hermes/skills
Gọi trong Hermes Agent: /nodejs-backend-patterns – rồi mô tả công việc bạn muốn làm.
DeepSeek
mkdir -p ~/.deepcode/skills && curl -fsSL https://skill.dn1nguoi.com/z/nodejs-backend-patterns-ef45e.tgz | tar xz -C ~/.deepcode/skills
Gọi trong DeepSeek: /nodejs-backend-patterns – rồi mô tả công việc bạn muốn làm.
Nội dung SKILL.md
Nội dung SKILL.md gốc bằng tiếng Anh.
Node.js Backend Patterns
Comprehensive guidance for building scalable, maintainable, and production-ready Node.js backend applications with modern frameworks, architectural patterns, and best practices.
When to Use This Skill
- Building REST APIs or GraphQL servers
- Creating microservices with Node.js
- Implementing authentication and authorization
- Designing scalable backend architectures
- Setting up middleware and error handling
- Integrating databases (SQL and NoSQL)
- Building real-time applications with WebSockets
- Implementing background job processing
Detailed patterns and worked examples
Detailed pattern documentation lives in references/details.md. Read that file when the navigation tier above is insufficient.
Best Practices
1. Use TypeScript: Type safety prevents runtime errors
2. Implement proper error handling: Use custom error classes
3. Validate input: Use libraries like Zod or Joi
4. Use environment variables: Never hardcode secrets
5. Implement logging: Use structured logging (Pino, Winston)
6. Add rate limiting: Prevent abuse
7. Use HTTPS: Always in production
8. Implement CORS properly: Don't use * in production
9. Use dependency injection: Easier testing and maintenance
10. Write tests: Unit, integration, and E2E tests
11. Handle graceful shutdown: Clean up resources
12. Use connection pooling: For databases
13. Implement health checks: For monitoring
14. Use compression: Reduce response size
15. Monitor performance: Use APM tools
Testing Patterns
See javascript-testing-patterns skill for comprehensive testing guidance.
Skill liên quan
- decision-logger – Kiến trúc bộ nhớ hai lớp cho các quyết định của cuộc họp ban giám đốc. Quản lý bản ghi…
- azure-security-keyvault-keys-java – SDK Azure Key Vault Keys cho Java để quản lý khóa mật mã. Dùng khi tạo, quản lý hoặc sử…
- nx-workspace-patterns – Cấu hình và tối ưu workspace monorepo Nx. Dùng khi thiết lập Nx, cấu hình ranh giới dự…
- opentrons-integration – Soạn thảo, rà soát, di chuyển, mô phỏng và gỡ lỗi các giao thức Python Protocol API v2…
- azure-security-keyvault-secrets-java – SDK Azure Key Vault Secrets cho Java để quản lý bí mật. Dùng khi lưu trữ, lấy hoặc quản…
- azure-servicebus-rust – Thư viện Azure Service Bus cho Rust. Gửi và nhận tin nhắn qua queue, topic và…
- azure-storage-blob-java – Xây dựng ứng dụng lưu trữ blob bằng SDK Azure Storage Blob cho Java.
- openapi-spec-generation – Tạo và duy trì đặc tả OpenAPI 3.1 từ mã nguồn, đặc tả thiết kế trước (design-first) và…