Labsco
prisma logo

prisma-cli-format

✓ Official8

by prisma · part of prisma/cursor-plugin

prisma format. Reference when using this Prisma feature.

🔥🔥🔥✓ VerifiedFreeQuick setup
🧩 One of 7 skills in the prisma/cursor-plugin package — works on its own, and pairs well with its siblings.

prisma format. Reference when using this Prisma feature.

Inspect the full instructions your agent will receiveExpand

This is the exact playbook injected into your agent when the skill activates — shown here so you can audit it before installing. You don't need to read it to use the skill.


name: prisma-cli-format description: prisma format. Reference when using this Prisma feature. license: MIT metadata: author: prisma version: "7.0.0"

prisma format

Formats your Prisma schema file.

Command

Copy & paste — that's it
prisma format [options]

What It Does

  • Fixes formatting (indentation, spacing)
  • Adds missing back-relations (e.g., adds the other side of a relation)
  • Adds missing relation arguments (e.g., fields, references)
  • Sorts fields and attributes (opinionated)

Options

OptionDescription
--schemaPath to schema file
--configCustom path to your Prisma config file

Examples

Format default schema

Copy & paste — that's it
prisma format

Format specific schema

Copy & paste — that's it
prisma format --schema=./custom/schema.prisma

Behavior

prisma format modifies the file in place. It is equivalent to "Prettier for Prisma schemas" but also has semantic understanding to fix/add missing schema definitions.

Use in Editor

Most Prisma editor extensions (VS Code, WebStorm) run prisma format automatically on save. This command is useful for:

  • CI pipelines (check formatting)
  • CLI-based workflows
  • Fixing large schema refactors