Prisma Expert Skill for One-to-Many Relations
Review Prisma relation fields against the stored foreign key and verify the mapping with a local query.
中文Install in Claude Code
Use your project's pinned Prisma version, existing schema, and a throwaway database. Keep the existing generator and connection setup.
- Get the complete `cli-tool/components/skills/development/prisma-expert` directory from the pinned GitHub commit.
- Copy it into the target project's `.claude/skills/`. Check `.claude/skills/prisma-expert/SKILL.md`, start Claude Code at the project root, and call `/prisma-expert`.
Example task
Create order O1 with two OrderItem rows. Query O1 with include items and assert both use orderId O1. Run prisma validate against the same schema.What to check
The schema validates and the query returns exactly two matching line items.
Original SKILL.md on GitHub · Updated
Frequently asked question
Is every Prisma relation field stored directly in the database?
The relation field describes the relationship for Prisma. A scalar field such as orderId generally holds the foreign key.