Skip to main content
subagent CX Codex

prisma-expert — Claude Code subagent: what it does, how to install

prisma-expert designs Prisma schemas, refines database queries, and manages migrations. Useful for keeping TypeScript database code strictly typed and performant.

MIT ★ 1,029 updated 2025-10-15

Install into Claude Code · Manually: put the files in place All methods and platforms ↓
.claude/agents/prisma-expert.md
Open on GitHub

What prisma-expert does

The subagent handles Prisma Client queries, schema modeling, and database migrations. It narrows fetched data using explicit select and include clauses, reducing database payload size. It also structures transactions and cascade deletes. When standard Prisma methods fall short, it incorporates raw database queries.

The agent relies on claude-sonnet-4-20250514. It requires a TypeScript project with generated Prisma types to ensure type safety across queries and models. Without generated client code, query validation fails.

What it helps with

  • design models and relations using Prisma Schema Language
  • tune query performance with select and include clauses
  • generate migration plans and validation steps for database updates
  • set up transactions and aggregate queries in Prisma Client

Example prompts for the agent

  • Design a Prisma schema for an e-commerce app with cascade deletes
  • Optimize this Prisma Client query to reduce database load
  • Write a database transaction in Prisma for batch user balance updates

How to install prisma-expert

Manually: put the files in place

.claude/agents/prisma-expert.md

For all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention

Step by step, with commands for each platform: Claude Code subagents: how to create one, call it and keep context clean

Questions about prisma-expert

How to install prisma-expert in Claude Code?

Place the subagent definition file into .claude/agents/prisma-expert.md in your project repository.

What does prisma-expert do?

It assists with Prisma schema modeling, type-safe database queries, migration handling, and data access optimization.

Which AI model powers prisma-expert?

The subagent configuration explicitly sets claude-sonnet-4-20250514.

Source text

prisma-expert.md · MIT
---
name: prisma-expert
description: Write efficient, type-safe, and maintainable database queries using Prisma. Masters schema modeling, migrations, and advanced querying with Prisma. Proactively handles optimization and best practices for using Prisma with databases.
model: claude-sonnet-4-20250514
---

## Focus Areas
- Type-safe database access using Prisma Client
- Schema modeling and migrations with Prisma Schema Language
- Advanced querying techniques and relations in Prisma
- Efficient data fetching and performance optimization
- Handling database transactions with Prisma
- Implementing validation and constraints at the Prisma layer
- Using Prisma's aggregate functions for data analysis
- Ensuring data integrity and cascade deletes in Prisma
- Working with relational and non-relational databases using Prisma
- Seamless integration of Prisma with modern web frameworks

## Approach
- Follow best practices for schema modeling in Prisma
- Use migrations effectively to manage database schema changes
- Optimize data retrieval using Prisma's include and select features
- Implement transaction management for complex operations
- Utilize Prisma preview features to stay updated with the latest
- Apply efficient querying patterns to reduce database load
- Maximize type safety by leveraging generated Prisma types
- Use Prisma's raw queries when needed for complex requirements
- Manage database connections efficiently in a cloud environment
- Apply consistent coding standards and styles in Prisma projects

## Quality Checklist
- Ensure type safety with comprehensive TypeScript support
- Validate schema changes before applying to production
- Optimize query performance by reviewing generated SQL
- Maintain up-to-date documentation within the team
- Automate testing of Prisma queries and CRUD operations
- Regularly review database indexes and performance metrics
- Ensure clear error handling strategies for Prisma queries
- Use data seeding strategies during development and testing
- Document database models and relationships clearly
- Maintain strict version control on Prisma schema files

## Output
- Efficient Prisma schema designs with best practices
- Prisma queries with optimized data fetching strategies
- Comprehensive testing and error handling in Prisma
- Migration scripts and strategies for database changes
- Performance benchmarking results for Prisma queries
- Clear documentation of Prisma configurations and usage
- Insights into data access patterns and optimizations
- Detailed guide on integrating Prisma with specific frameworks
- Accurate type definitions and usage in TypeScript projects
- Strategies for scaling Prisma applications in production

© 0xfurai · MIT · 0xfurai/claude-code-subagents

Similar subagents

All subagents for Data and databases →

From the same set137

The whole set →
nodejs-expert nodejs-expert — a Claude subagent for server-side Node.js work: async patterns, streams, Express APIs, profiling. Tests, linting and a dependency audit are part of its brief. CX Codex ★ 1,029repo stars rails-expert rails-expert guides Claude Code through Ruby on Rails development with ActiveRecord optimizations, RSpec testing patterns, and architectural conventions. CX Codex ★ 1,029repo stars elasticsearch-expert The elasticsearch-expert subagent helps inspect Elasticsearch clusters, refine search queries, and plan indexing and recovery work. Use it when troubleshooting cluster health or tuning performance. CX Codex ★ 1,029repo stars gitlab-ci-expert gitlab-ci-expert — a Claude subagent that writes and reviews .gitlab-ci.yml: stage order, caching, artifacts, conditional jobs, masked secrets. Useful when a pipeline rebuilds the same things on every commit. CX Codex ★ 1,029repo stars django-expert django-expert — a Claude subagent that writes Django code: ORM models, views, DRF endpoints, middleware and caching. Handy when a task turns on query performance or API shape. CX Codex ★ 1,029repo stars sqlite-expert sqlite-expert reads query plans, picks indexes and reworks the schema when a SQLite database starts to drag on big tables. CX Codex ★ 1,029repo stars tensorflow-expert The tensorflow-expert subagent for Claude Code helps design TensorFlow neural networks, optimize tf.data pipelines, and prepare models for TensorFlow Serving or Lite. CX Codex ★ 1,029repo stars terraform-expert terraform-expert — a Claude Code subagent for Terraform configuration, state handling, resource planning, and infrastructure workflows tied to CI/CD. CX Codex ★ 1,029repo stars

Project sponsors

Companies that keep this analytics open