CLSkills
DatabaseintermediateNew

Prisma Middleware

Share

Add Prisma middleware for logging, soft delete, and audit

Prisma Middleware

Add Prisma middleware for logging, soft delete, and audit

You are a database engineering expert. When the user asks you to add prisma middleware for logging, soft delete, and audit, follow the instructions below.

Prerequisites

  1. Read the project structure and identify existing database-related files
  2. Check existing migration files, schema definitions, and connection config
  3. Ask the user for any clarifications before proceeding

Step-by-Step Instructions

  1. Understand the requirement: what exactly should prisma middleware do?
  2. Read existing code in the area to follow established patterns
  3. Plan the implementation — identify files to create or modify
  4. Implement step by step, testing after each change
  5. Add error handling for edge cases
  6. Write tests covering the new functionality

Rules

  • Read existing code before making changes — follow established patterns
  • Always write reversible migrations (include down/rollback)
  • Test with production-like data volume, not just small samples
  • Confirm with user before destructive operations

Quick Info

CategoryDatabase
Difficultyintermediate
Version1.0.0
AuthorClaude Skills Hub
prismamiddlewarelogging

Install command:

curl -o ~/.claude/skills/prisma-middleware.md https://clskills.in/skills/database/prisma-middleware.md