prisma-client-api

Guide Prisma Client queries for CRUD, relations, transactions, and raw SQL.

3|Updated Mar 17, 2026
One-click install
npx skills add https://github.com/rauell1/safaricharge --skill prisma-client-api-rauell1
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: prisma-client-api
Source: https://github.com/rauell1/safaricharge/tree/main/.agents/skills/prisma-client-api
Command: npx skills add https://github.com/rauell1/safaricharge --skill prisma-client-api-rauell1

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps developers write correct Prisma Client code without having to memorize query syntax, relation patterns, transaction behavior, or client configuration details.

Core Features & Use Cases

  • CRUD Operations: Create, read, update, delete, and bulk-manage records with Prisma model methods.
  • Filtering and Query Shape: Apply where clauses, operators, sorting, pagination, select, include, omit, and cursor-based retrieval.
  • Relations and Transactions: Work with nested writes, relation filters, relation counts, and both sequential and interactive transactions.
  • Raw SQL and Client Setup: Use raw queries safely when needed and configure Prisma Client with adapters, logging, extensions, and TypeScript query fragments.
  • Use Case: A developer building an admin dashboard can use this Skill to fetch filtered users with related posts, update records inside a transaction, and keep queries type-safe.

Quick Start

Use the prisma-client-api skill to help write a Prisma Client query for a database model, including filters, relations, and transactions.

Frequently Asked Questions about prisma-client-api

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write type-safe Prisma queries with filtering and relations in TypeScript?

Type-safe Prisma queries use the generated client to apply where clauses, select, include, and relation filters. This Skill guides building correct query shapes for CRUD operations with nested relations while maintaining strict TypeScript safety.

What is the best way to handle nested writes and relation updates in a Prisma transaction?

Prisma transactions handle nested writes and relation updates through sequential or interactive transaction APIs. This Skill provides guidance on structuring relation filters, nested data operations, and transaction control to ensure safe multi-record database modifications.

Can I use raw SQL queries safely with Prisma Client when I need complex database operations?

Raw SQL queries work safely with Prisma Client using tagged template literals for parameterization. This Skill covers when to use raw queries instead of model methods and how to execute them without risking SQL injection in modern SQL provider workflows.

Does Prisma Client support cursor-based pagination and complex sorting for large datasets?

Prisma Client supports cursor-based pagination and multi-field sorting through query parameters like take, skip, orderBy, and cursor. This Skill helps structure these query patterns correctly for efficient filtered retrieval in TypeScript projects.

How do I configure Prisma Client with adapters, logging, and extensions for my current project?

Prisma Client configuration involves instantiating with custom adapters, logging settings, and client extensions. This Skill offers version-aware guidance on client setup and TypeScript query fragments to ensure correct provider workflow integration.

Why are my Prisma relation queries returning unexpected data shapes in TypeScript?

Unexpected Prisma relation query shapes often stem from incorrect select, include, or omit usage. This Skill clarifies how to apply these parameters properly alongside relation filters and counts to get the exact nested data structure you need.