This skill should be used when the user asks to "analyze prisma", "prisma setup", "schema recon", "check prisma config", "prisma structure", "what models exist", "show prisma schema", or when first starting work in a Prisma project to understand the existing setup.
From prisma-devnpx claudepluginhub nthplusio/functional-claude --plugin prisma-devThis skill uses the workspace's default tool permissions.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Searches prompts.chat for AI prompt templates by keyword or category, retrieves by ID with variable handling, and improves prompts via AI. Use for discovering or enhancing prompts.
Executes pre-written implementation plans: critically reviews, follows bite-sized steps exactly, runs verifications, tracks progress with checkpoints, uses git worktrees, stops on blockers.
Analyze and document Prisma configuration and schema in the current repository.
Run this skill:
Search for Prisma schema files:
# Find schema files
find . -name "schema.prisma" -o -name "*.prisma" 2>/dev/null | head -20
# Check package.json for custom schema path
grep -A5 '"prisma"' package.json 2>/dev/null
Common locations:
prisma/schema.prisma (default)src/prisma/schema.prismapackage.jsonExtract from schema.prisma:
datasource db {
provider = "postgresql" // Database type
url = env("DATABASE_URL")
}
Document:
generator client {
provider = "prisma-client-js"
previewFeatures = ["fullTextSearch"]
binaryTargets = ["native", "linux-musl"]
}
Document:
prisma-client-jsFor each model, document:
model User {
id Int @id @default(autoincrement())
email String @unique
name String?
role Role @default(USER)
posts Post[]
profile Profile?
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
@@index([email])
@@map("users")
}
Parse and record:
@@map exists)Create a relation map:
User <-> Post (one-to-many)
User.posts -> Post[]
Post.author -> User (via authorId)
User <-> Profile (one-to-one)
User.profile -> Profile?
Profile.user -> User (via userId)
enum Role {
USER
ADMIN
MODERATOR
}
List all enums with their values.
# Check for migrations directory
ls -la prisma/migrations/ 2>/dev/null
# Count migrations
ls prisma/migrations/ 2>/dev/null | grep -E "^[0-9]+" | wc -l
# Check migration lock
cat prisma/migrations/migration_lock.toml 2>/dev/null
# Check for .env files
ls -la .env* 2>/dev/null
# Check for DATABASE_URL in .env.example (safe to read)
grep "DATABASE_URL" .env.example 2>/dev/null
Write findings to ${CLAUDE_PLUGIN_ROOT}/.cache/recon.json:
{
"lastUpdated": "2024-01-15T10:30:00Z",
"schemaPath": "prisma/schema.prisma",
"datasource": {
"provider": "postgresql",
"urlEnvVar": "DATABASE_URL"
},
"generator": {
"provider": "prisma-client-js",
"previewFeatures": ["fullTextSearch"]
},
"models": [
{
"name": "User",
"tableName": "users",
"fields": [
{"name": "id", "type": "Int", "attributes": ["@id", "@default(autoincrement())"]},
{"name": "email", "type": "String", "attributes": ["@unique"]},
{"name": "posts", "type": "Post[]", "relation": true}
],
"primaryKey": ["id"],
"uniqueFields": ["email"],
"indexes": [["email"]]
}
],
"enums": [
{"name": "Role", "values": ["USER", "ADMIN", "MODERATOR"]}
],
"relations": [
{"from": "User", "to": "Post", "type": "one-to-many", "field": "posts"},
{"from": "User", "to": "Profile", "type": "one-to-one", "field": "profile"}
],
"migrations": {
"count": 5,
"latest": "20240115_add_user_role",
"provider": "postgresql"
}
}
After analysis, provide a human-readable summary:
## Prisma Configuration Summary
**Schema**: prisma/schema.prisma
**Database**: PostgreSQL
**Environment**: DATABASE_URL
### Models (4)
| Model | Table | Fields | Relations |
|-------|-------|--------|-----------|
| User | users | 7 | posts, profile |
| Post | posts | 6 | author, comments |
| Profile | profiles | 4 | user |
| Comment | comments | 5 | post, author |
### Enums (2)
- Role: USER, ADMIN, MODERATOR
- Status: DRAFT, PUBLISHED, ARCHIVED
### Migrations
- 5 migrations applied
- Latest: 20240115_add_user_role
- Lock provider: postgresql
### Key Relations
- User -> Post (one-to-many)
- User -> Profile (one-to-one)
- Post -> Comment (one-to-many)
Invalidate and refresh cache when:
Check cache freshness:
# Compare schema modification time with cache
stat prisma/schema.prisma
stat ${CLAUDE_PLUGIN_ROOT}/.cache/recon.json
The recon data enables other skills to provide context-aware guidance: