nodejs-best-practices
Node.js development principles and decision-making. Framework selection, async patterns, security, and architecture. Teaches thinking, not copying.
- License 许可
- MIT
- 所属仓库
- HigorAlves/orc
- 最近更新
- 2026-11-14
- Stars
- ★ 7
- Forks
- 0
01 前言 Front Matter
- name
- nodejs-best-practices
- risk
- unknown
- source
- community
- date_added
- 2026-02-27
- description
- Node.js development principles and decision-making. Framework selection, async patterns, security, and architecture. Teaches thinking, not copying.
02 资源文件 3
- 参考文档references/ARCHITECTURE-ERRORS-ASYNC.md2.8 KB
- 参考文档references/FRAMEWORK-AND-RUNTIME.md2.0 KB
- 参考文档references/VALIDATION-SECURITY-TESTING.md2.3 KB
03 SKILL.md 正文
Node.js Best Practices
Principles and decision-making for Node.js development in 2025. Learn to THINK, not memorize code patterns.
When to Use
Use this skill when making Node.js architecture decisions, choosing frameworks, designing async patterns, or applying security and deployment best practices.
⚠️ 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
Principles by topic
Read the file for the decision at hand; each holds the original numbered sections.
- Choosing a framework, runtime, or module system → FRAMEWORK-AND-RUNTIME.md (§1–2)
- Layering, error handling, async patterns → ARCHITECTURE-ERRORS-ASYNC.md (§3–5)
- Validation, security, testing → VALIDATION-SECURITY-TESTING.md (§6–8)
10. Anti-Patterns to Avoid
❌ DON'T:
- Use Express for new edge projects (use Hono)
- Use sync methods in production code
- Put business logic in controllers
- Skip input validation
- Hardcode secrets
- Trust external data without validation
- Block event loop with CPU work
✅ DO:
- Choose framework based on context
- Ask user for preferences when unclear
- Use layered architecture for growing projects
- Validate all inputs
- Use environment variables for secrets
- Profile before optimizing
11. Decision Checklist
Before implementing:
- [ ] Asked user about stack preference?
- [ ] Chosen framework for THIS context? (not just default)
- [ ] Considered deployment target?
- [ ] Planned error handling strategy?
- [ ] Identified validation points?
- [ ] Considered security requirements?
Remember: Node.js best practices are about decision-making, not memorizing patterns. Every project deserves fresh consideration based on its requirements.
Limitations
- Use this skill only when the task clearly matches the scope described above.
- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
04 同仓库更多 Skills
vercel-react-best-practices
React and Next.js performance optimization guidelines from Vercel Engineering
writing-plans
Write a comprehensive implementation plan of bite-sized TDD tasks that an engineer with zero codebase context could execute — exact files, code, tests, and verification steps
writing-for-agents
orc's doctrine layer for writing any document an agent consumes — skills, AGENTS.md/CLAUDE.md, reference docs
workspace-mode
Use when cwd is a parent dir holding multiple sibling git repos — defines repo auto-detection, --repos/--repo/--all-repos/--this-repo precedence, per-repo dispatch, and linked-PR mechanics.
wizard
Generate an interactive bash wizard walking a human through work only they can perform — credentials, secrets, one-off migrations
wait-what
Stop and re-pitch — the last message did not land; say it again simply, in the project's own vocabulary.