ditto190/crispy-nextjs-turborepo-monorepo/express-middleware-creation

Claude Code and agent skill by ditto190/crispy-nextjs-turborepo-monorepo

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Imported TRAE skill from backend/Express_Middleware_Creation.md

Install

npx vskill@latest install ditto190/crispy-nextjs-turborepo-monorepo/express-middleware-creation

SKILL.md

The same SKILL.md was published earlier as ditto190/crispy-nextjs-turborepo-monorepo/express-middleware-creation.

Skill: Express Middleware Creation

Purpose

To create reusable Express.js middleware functions for cross-cutting concerns such as logging, authentication, validation, or request preprocessing.

When to Use

  • When logic needs to be applied to multiple routes or the entire application.
  • When processing headers, cookies, or body parsing before the controller.
  • When attaching custom properties to the req object (e.g., req.user).

Procedure

  1. Define Function Signature: Create a function accepting (req, res, next).
  2. Implement Logic:
  • Perform the specific task (e.g., check header, parse token).
  • Handle errors: If an error occurs, pass it to next(err).
  1. Control Flow:
  • If the request should proceed, call next().
  • If the request should stop (e.g., validation failure), send a response (e.g., res.status(400).json(...)) and do NOT call next().
  1. Context Attachment: If needed, attach data to req (e.g., req.currentUser = decodedToken).
  2. Export: Export the function for use in routes or app.use().

Constraints

  • Always call next() or send a response; otherwise, the request will hang.
  • Do not perform heavy blocking synchronous operations in middleware.
  • Error handling middleware must have 4 arguments: (err, req, res, next).

Expected Output

A standalone JavaScript/TypeScript file exporting a middleware function that can be mounted in an Express application.

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
5

Refreshed 31 Oct 2026, 23 days ago.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/ditto190/crispy-nextjs-turborepo-monorepo/express-middleware-creation/badge)](https://verified-skill.com/skills/ditto190/crispy-nextjs-turborepo-monorepo/express-middleware-creation)

Something wrong with this skill or its page? Tell us.