nodejs-best-practices
Node.js Best Practices anwenden
Erhalten Sie Orientierung bei Node.js-Architekturentscheidungen, Framework-Auswahl, asynchronen Mustern und Sicherheitsprinzipien. Dieser Skill vermittelt Entscheidungsrahmenwerkungen anstatt Copy-Paste-Code.
Die Skill-ZIP herunterladen
In Claude hochladen
Gehe zu Einstellungen → Fähigkeiten → Skills → Skill hochladen
Einschalten und loslegen
Teste es
Verwendung von "nodejs-best-practices". I need to build a high-performance API that will handle 10,000 requests per second. What should I use?
Erwartetes Ergebnis:
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.
Verwendung von "nodejs-best-practices". What anti-patterns should I avoid in Node.js?
Erwartetes Ergebnis:
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.
Sicherheitsaudit
SicherAll 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.
Qualitätsbewertung
Was du bauen kannst
Neue Projektarchitektur
Erhalten Sie Framework- und Architekturempfehlungen beim Start eines neuen Node.js-Projekts basierend auf Deployment-Ziel und Anforderungen.
Code-Review-Orientierung
Verwenden Sie die Entscheidungs-Checkliste und den Anti-Patterns-Abschnitt, um bestehenden Node.js-Code auf häufige Probleme zu überprüfen.
Sicherheitsimplementierung
Wenden Sie die Sicherheits-Checkliste und Validierungsprinzipien beim Erstellen sicherer Node.js-Anwendungen an.
Probiere diese 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?
Bewährte Verfahren
- Fragen Sie Benutzer nach ihrem spezifischen Kontext, bevor Sie Lösungen empfehlen - gehen Sie nicht davon aus, dass ein Framework für alle passt
- Berücksichtigen Sie das Deployment-Ziel früh im Entscheidungsprozess (Edge, Serverless, Container, VM)
- Validieren Sie alle Eingaben an API-Grenzen und behandeln Sie alle externen Daten als nicht vertrauenswürdig
- Verwenden Sie geschichtete Architektur für Projekte, die über einfache Skripte hinauswachsen sollen
Vermeiden
- Express als Standard für jedes Projekt verwenden, ohne Alternativen zu berücksichtigen
- Synchrone Dateioperationen (fs.readFileSync) im Produktionscode verwenden
- Input-Validierung überspringen und Client-Daten vertrauen
- Geschäftslogik direkt in Route-Handlern statt in der Service-Schicht platzieren
Häufig gestellte Fragen
Welches Node.js-Framework sollte ich 2025 verwenden?
Sollte ich TypeScript mit Node.js verwenden?
Wie behandle ich Fehler in Node.js?
Wann sollte ich Promise.all vs Promise.allSettled verwenden?
Wie sichere ich meine Node.js-Anwendung ab?
Kann ich synchrone Dateioperationen in Node.js verwenden?
Entwicklerdetails
Autor
sickn33Lizenz
MIT
Repository
https://github.com/sickn33/antigravity-awesome-skills/tree/main/skills/nodejs-best-practicesRef
main
Dateistruktur
📄 SKILL.md