KS
Killer-Skills

db — Categories.community

v1.0.0
GitHub

About this Skill

Perfect for Data Management Agents requiring robust PostgreSQL database operations with Prisma ORM integration. Gère le schéma Prisma et les migrations de Motivia. Utilise ce skill quand lutilisateur demande de modifier la base de données, ajouter une table, un champ, une relation, ou effectuer une migration. PostgreSQL avec Prisma ORM.

majiayu000 majiayu000
[0]
[0]
Updated: 2/20/2026

Quality Score

Top 5%
50
Excellent
Based on code quality & docs
Installation
SYS Universal Install (Auto-Detect)
Cursor IDE Windsurf IDE VS Code IDE
> npx killer-skills add majiayu000/claude-skill-registry/db

Agent Capability Analysis

The db MCP Server by majiayu000 is an open-source Categories.community integration for Claude and other AI agents, enabling seamless task automation and capability expansion.

Ideal Agent Persona

Perfect for Data Management Agents requiring robust PostgreSQL database operations with Prisma ORM integration.

Core Value

Enables direct database interaction through Prisma ORM with PostgreSQL (Neon) support. Provides schema management, migration deployment, and database push capabilities for both development and production environments.

Capabilities Granted for db MCP Server

Executing Prisma migrations in development
Deploying database migrations to production
Pushing schema changes directly to database
Generating Prisma client for database operations

! Prerequisites & Limits

  • PostgreSQL (Neon) specific only
  • Requires Prisma schema file
  • Database push recommended for development only
Project
SKILL.md
5.3 KB
.cursorrules
1.2 KB
package.json
240 B
Ready
UTF-8

# Tags

[No tags]
SKILL.md
Readonly

Base de Données Motivia

Stack technique

  • ORM: Prisma
  • BDD: PostgreSQL (Neon)
  • Fichier schema: prisma/schema.prisma

Commandes Prisma

bash
1# Développement 2pnpm prisma generate # Générer le client Prisma 3pnpm prisma migrate dev # Créer et appliquer une migration 4pnpm prisma migrate dev --name add_feature # Migration nommée 5pnpm prisma db push # Push direct (dev seulement) 6 7# Production 8pnpm prisma migrate deploy # Appliquer les migrations 9 10# Utilitaires 11pnpm prisma studio # Interface graphique 12pnpm prisma db seed # Exécuter le seed 13pnpm prisma format # Formater le schema

Modèles existants

User (central)

prisma
1model User { 2 id String @id @default(cuid()) 3 email String @unique 4 name String @default("") 5 firstName String? 6 lastName String? 7 profileTitle String? 8 localisation String? 9 image String? 10 emailVerified Boolean @default(false) 11 freeLetters Int @default(5) 12 keyAchievements String[] 13 softSkills String[] 14 technicalSkills String[] 15 createdAt DateTime @default(now()) 16 updatedAt DateTime @updatedAt 17 18 // Relations 19 accounts Account[] 20 sessions Session[] 21 apiKeys ApiKey[] 22 experiences Experience[] 23 degrees Degree[] 24 links Link[] 25 projects Project[] 26 motivationLetters MotivationLetter[] 27 userCV UserCV? 28}

Entités métier

ModèleDescriptionRelation
ExperienceExpériences proUser 1:N
DegreeDiplômesUser 1:N
ProjectProjets portfolioUser 1:N
LinkLiens sociauxUser 1:N
MotivationLetterLettres généréesUser 1:N
UserCVCV PDF uploadéUser 1:1
ApiKeyClés API providersUser 1:N

Auth (Better Auth)

ModèleDescription
AccountComptes OAuth/credentials
SessionSessions utilisateur
VerificationTokens de vérification
AuthenticatorWebAuthn

Conventions de schéma

Champs obligatoires

prisma
1model NouveauModele { 2 id String @id @default(cuid()) 3 // ... champs métier 4 userId String 5 createdAt DateTime @default(now()) 6 updatedAt DateTime @updatedAt 7 user User @relation(fields: [userId], references: [id], onDelete: Cascade) 8 9 @@index([userId]) 10}

Types courants

UsageType Prisma
IDString @id @default(cuid())
EmailString @unique
Texte courtString
Texte longString (pas de @db.Text nécessaire)
DateDateTime
Date optionnelleDateTime?
BooléenBoolean @default(false)
EntierInt @default(0)
Liste de stringsString[]

Relations

prisma
1// 1:N (User a plusieurs Experience) 2model User { 3 experiences Experience[] 4} 5 6model Experience { 7 userId String 8 user User @relation(fields: [userId], references: [id], onDelete: Cascade) 9} 10 11// 1:1 (User a un CV) 12model User { 13 userCV UserCV? 14} 15 16model UserCV { 17 userId String @unique 18 user User @relation(fields: [userId], references: [id], onDelete: Cascade) 19}

Enum

prisma
1enum ApiProvider { 2 OPENAI 3 GOOGLE 4 ANTHROPIC 5 MISTRAL 6 XAI 7} 8 9model ApiKey { 10 provider ApiProvider 11}

Workflow modification de schéma

1. Modifier le schéma

prisma
1// prisma/schema.prisma 2model User { 3 // Ajouter un nouveau champ 4 newField String? 5}

2. Créer la migration

bash
1pnpm prisma migrate dev --name add_new_field

3. Mettre à jour le code

  • Server actions dans app/actions/
  • Schémas Zod dans utils/schemas.ts

Ajouter un nouveau modèle

1. Définir le modèle

prisma
1model NewEntity { 2 id String @id @default(cuid()) 3 name String 4 description String? 5 isActive Boolean @default(true) 6 userId String 7 createdAt DateTime @default(now()) 8 updatedAt DateTime @updatedAt 9 user User @relation(fields: [userId], references: [id], onDelete: Cascade) 10 11 @@index([userId]) 12}

2. Ajouter la relation dans User

prisma
1model User { 2 // ... existing fields 3 newEntities NewEntity[] 4}

3. Créer la migration

bash
1pnpm prisma migrate dev --name add_new_entity

4. Créer les server actions

Créer app/actions/new-entity.ts avec le pattern habituel.

Bonnes pratiques

Indexes

prisma
1@@index([userId]) // Toujours indexer les FK 2@@index([createdAt]) // Si tri fréquent 3@@unique([userId, name]) // Contrainte d'unicité

Cascade

Toujours utiliser onDelete: Cascade pour les relations avec User afin de supprimer les données orphelines.

Migrations en production

  1. Tester localement avec migrate dev
  2. Commit des fichiers de migration
  3. En production: migrate deploy (via script build)

Checklist nouvelle table

  1. ID avec @id @default(cuid())
  2. createdAt et updatedAt
  3. userId avec relation et onDelete: Cascade
  4. @@index([userId])
  5. Relation ajoutée dans User
  6. Migration créée et testée
  7. Server actions créées
  8. Schéma Zod ajouté

Related Skills

Looking for an alternative to db or building a Categories.community AI Agent? Explore these related open-source MCP Servers.

View All

widget-generator

Logo of f
f

widget-generator is an open-source AI agent skill for creating widget plugins that are injected into prompt feeds on prompts.chat. It supports two rendering modes: standard prompt widgets using default PromptCard styling and custom render widgets built as full React components.

149.6k
0
Design

chat-sdk

Logo of lobehub
lobehub

chat-sdk is a unified TypeScript SDK for building chat bots across multiple platforms, providing a single interface for deploying bot logic.

73.0k
0
Communication

zustand

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
Communication

data-fetching

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
Communication