← スキル一覧に戻る

express
by kprsnt2
⭐ 0🍴 0📅 2026年1月15日
SKILL.md
name: express description: Express.js server best practices including middleware, error handling, and security. globs: ["/server.js", "/app.js", "/routes//.js", "/middleware//.js"] priority: 85 tags: ["framework"]
Express.js Best Practices
Project Structure
- src/routes/ for route handlers
- src/middleware/ for middleware
- src/controllers/ for business logic
- src/models/ for data models
- src/utils/ for utilities
Middleware
- Use helmet for security headers
- Use cors for CORS handling
- Use morgan for logging
- Use compression for gzip
- Use express.json() for body parsing
- Order middleware correctly
Error Handling
- Use async error wrapper or express-async-errors
- Centralized error handler middleware
- Send appropriate status codes
- Log errors with context
- Never expose stack traces in production
Security
- Validate all inputs with Joi/Zod
- Sanitize user data
- Use rate limiting
- Implement CSRF protection
- Use secure session config
Performance
- Use caching (Redis)
- Implement pagination
- Use streaming for large responses
- Enable gzip compression
- Use connection pooling for databases
スコア
総合スコア
60/100
リポジトリの品質指標に基づく評価
✓SKILL.md
SKILL.mdファイルが含まれている
+20
✓LICENSE
ライセンスが設定されている
+10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
レビュー
💬
レビュー機能は近日公開予定です