Loading skill
Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Enforces Row Level Security by requiring Prisma database access through withUserContext, withAdminContext, or withSystemContext helpers.
12% 100%+88 ptsof test cases passed
Passed 25 of 25 test cases with the skill, and 3 of 25 without it.
3 of 3 safety checks passed
Not used yet
Enforce Row Level Security (RLS) patterns for all database operations. Ensures data isolation and prevents cross-user data access.
// ❌ FORBIDDEN - Direct Prisma calls bypass RLS
const user = await prisma.user.findUnique({ where: { user_id } });
import { withUserContext, withAdminContext, withSystemContext } from "@/lib/rls-context";
// ✅ CORRECT - User context for user operations
const user = await withUserContext(prisma, userId, async (client) => {
return client.user.findUnique({ where: { user_id: userId } });
});
// ✅ CORRECT - System context for webhooks
await withSystemContext(prisma, "webhook", async (client) => {
return client.webhook_events.create({ data: eventData });
});
Skills that do similar work, with their benchmark result.
Next to this one in the catalogue, plus more from the same author.