prisma-development — Claude Code skill: Prisma ORM rules
Gives your agent a fixed set of Prisma ORM and TypeScript rules: schema design, migrations, transactions, error handling. Useful when the project runs on Prisma.
npx skills add Mindrally/skills --skill prisma-development -a claude-codeWhat prisma-development does
This skill turns the agent into a disciplined Prisma developer. It asks for explicit types, bans any, keeps functions under 20 lines and pushes complex logic into separate functions. Naming is fixed: PascalCase for classes and interfaces, camelCase for variables, kebab-case for files, UPPERCASE for constants, verb-based booleans (isLoading, hasError).
Prisma rules are concrete. Models and fields get domain-driven names, relations are declared with @relation, soft deletes use a deletedAt field. Client code stays type-safe, complex flows go through transactions, middleware handles logging and auditing, and select with include replaces fetching whole rows. Migrations carry descriptive names, existing ones are never edited, idempotency is required, and staging runs before production.
Errors are split by type: PrismaClientKnownRequestError for constraint violations, PrismaClientUnknownRequestError for unexpected database failures, PrismaClientValidationError for schema mismatches. The skill also forbids exposing a raw Prisma client through an API and requires validating user input before any database call. It ships as a single SKILL.md with no scripts or hooks, so the agent's behaviour changes through instructions alone.
What it helps with
- design a Prisma schema with explicit relations and soft deletes
- route client errors by type instead of swallowing constraint violations
- kill N+1 queries with
selectandinclude - ship a migration with a clear name and no edits to old files
- keep the raw Prisma client out of public APIs
Example prompts for the agent
- Write a Prisma model for orders with a relation to user and a deletedAt field
- Check this query for N+1 and rewrite it with select
- Walk through this PrismaClientKnownRequestError in my handler
How to install prisma-development
1Skills CLI (Vercel)
npx skills add Mindrally/skills --skill prisma-development -a claude-code2Manually: put the files in place
~/.claude/skills/prisma-development/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/prisma-development/
1Skills CLI (Vercel)
npx skills add Mindrally/skills --skill prisma-development -a codex2Manually: put the files in place
.agents/skills/prisma-development/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add Mindrally/skills --skill prisma-development -a cursor2Manually: put the files in place
.cursor/skills/prisma-development/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install Mindrally/skills prisma-development2Manually: put the files in place
.github/skills/prisma-development/SKILL.md1Skills CLI (Vercel)
npx skills add Mindrally/skills --skill prisma-development -a gemini-cli2Platform CLI
gemini skills install https://github.com/Mindrally/skills --path prisma-developmentManually: put the files in place
.devin/skills/prisma-development/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add Mindrally/skills --skill prisma-development -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about prisma-development
How do I install prisma-development in Claude?
Run npx skills add Mindrally/skills --skill prisma-development -a claude-code. The skill then lives at ~/.claude/skills/prisma-development/SKILL.md.
What does prisma-development do?
It hands the agent a rulebook for Prisma ORM with TypeScript: schema design, client usage, migrations and error handling. The agent follows it while writing or editing code.
Which Prisma errors does the skill cover?
PrismaClientKnownRequestError for constraint violations, PrismaClientUnknownRequestError for unexpected database errors and PrismaClientValidationError for schema mismatches.
Source text
SKILL.md · Apache-2.0
--- name: prisma-development description: Comprehensive Prisma ORM development guidelines with TypeScript, schema design, migrations, and best practices. metadata: maintainer: Mindrally source: https://github.com/Mindrally/skills --- # Prisma ORM Development You are an expert in Prisma ORM development with TypeScript. ## TypeScript Fundamentals ### Basic Principles - Always declare explicit types for variables and functions - Avoid using 'any' - Leverage JSDoc for public APIs - Maintain single exports per file - Prioritize self-documenting code ### Naming Conventions - PascalCase for classes/interfaces - camelCase for variables and methods - kebab-case for files/directories - UPPERCASE for constants - Verb-based boolean names (isLoading, hasError, canDelete) ## Function Design - Aim for less than 20 lines of code per function - Single responsibility per function - Implement early returns - Extract complex logic into separate functions - Leverage functional patterns (map, filter, reduce) - Use object parameters for multiple arguments ## Data & Error Handling - Encapsulate data in composite types with immutability preference - Use `readonly` and `as const` appropriately - Validate at boundaries - Employ specific, descriptive error types with contextual messaging ## Prisma-Specific Practices ### Schema Design - Domain-driven naming for models and fields - Explicit relations using `@relation` - Normalized structures where appropriate - Soft deletes via `deletedAt` field - Native type decorators for database-specific types ### Client Usage - Always use type-safe Prisma client operations - Use transactions for complex flows - Implement middleware for logging, soft deletes, and auditing - Use `select` and `include` judiciously to avoid over-fetching ### Migrations - Create descriptive migrations with clear naming - Never modify existing migrations - Ensure idempotency for all migrations - Test migrations on staging before production ### Error Handling - Catch `PrismaClientKnownRequestError` for constraint violations - Handle `PrismaClientUnknownRequestError` for unexpected database errors - Validate with `PrismaClientValidationError` for schema mismatches ## Quality Standards - Avoid N+1 queries through proper eager loading - Test with in-memory databases for speed - Mock Prisma client for unit test isolation - Never expose raw Prisma clients in APIs - Validate all user inputs before database operations - Follow SOLID principles with composition over inheritance
© Mindrally · Apache-2.0 · Mindrally/skills