Skip to main content

creating-client-singletons

Teaches the global singleton pattern for PrismaClient to prevent connection pool exhaustion and P1017 errors in serverless environments.

Install this skill

or
95/100

Security score

The creating-client-singletons skill was audited on Feb 9, 2026 and we found 5 security issues across 1 threat category. Review the findings below before installing.

Categories Tested

Security Issues

low line 65

Access to .env file

SourceSKILL.md
65if (process.env.NODE_ENV !== 'production') globalForPrisma.prisma = prisma;
low line 138

Access to .env file

SourceSKILL.md
138log: process.env.NODE_ENV === 'development' ? ['query', 'error', 'warn'] : ['error'],
low line 140

Access to .env file

SourceSKILL.md
140if (process.env.NODE_ENV !== 'production') globalForPrisma.prisma = prisma;
low line 151

Access to .env file

SourceSKILL.md
151log: process.env.NODE_ENV === 'development' ? ['query', 'error', 'warn'] : ['error'],
low line 153

Access to .env file

SourceSKILL.md
153if (process.env.NODE_ENV !== 'production') globalForPrisma.prisma = prisma;
Scanned on Feb 9, 2026
View Security Dashboard
Installation guide →