AgentSkillsCN

nodejs-best-practices

为分布式NoSQL数据库(Cassandra、DynamoDB)提供专业指导。重点聚焦心智模型、查询优先建模、单表设计,以及在高规模系统中避免热点分区的问题。

SKILL.md
--- frontmatter
name: nodejs-best-practices
description: Node.js development principles and decision-making.
category: development
version: 4.1.0-fractal
layer: master-skill

Node.js Best Practices

Principles and decision-making for Node.js development in 2025. 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 (2025)

🧠 Knowledge Modules (Fractal Skills)

1. Decision Tree

2. Comparison Principles

3. Selection Questions to Ask:

4. Native TypeScript

5. Module System Decision

6. Runtime Selection

7. Layered Structure Concept

8. Why This Matters:

9. When to Simplify:

10. Centralized Error Handling

11. Error Response Philosophy

12. Status Code Selection

13. When to Use Each

14. Event Loop Awareness

15. Avoiding Event Loop Blocking

16. Validate at Boundaries

17. Validation Library Selection

18. Validation Philosophy

19. Security Checklist (Not Code)

20. Security Mindset

21. Test Strategy Selection

22. What to Test (Priorities)

23. Built-in Test Runner (Node.js 22+)

24. ❌ DON'T:

25. ✅ DO: