creating-client-singletons
CommunitySingleton PrismaClient to avoid pool exhaustion.
Authordjankies
Version1.0.0
Installs0
System Documentation
What problem does it solve?
This Skill teaches a global or module-level singleton pattern for PrismaClient to prevent multiple connection pools and P1017 errors, especially in serverless environments.
Core Features & Use Cases
- Singleton Pattern: One PrismaClient instance shared across modules.
- Global vs Module Singleton: Techniques for serverless and hot-reload scenarios.
- Migration Guidance: Replacing per-file clients with centralized access.
Quick Start
Create a central Prisma client export and replace local instantiations with the singleton import.
Dependency Matrix
Required Modules
None requiredComponents
references
💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: creating-client-singletons Download link: https://github.com/djankies/claude-configs/archive/main.zip#creating-client-singletons Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.