data-access-guidelines

Community

Speed up Prisma data access with safe patterns.

AuthorZeroGravitySkin-Ron
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill provides a quick-reference guide for Quantum Skincare's Prisma-based data-access layer, helping teams design robust schemas, implement DAO patterns, enforce UUID primary keys, apply RBAC with PostgreSQL, manage migrations, and write type-safe queries. It reduces complexity and mental load when building or evolving database access layers.

Core Features & Use Cases

  • Type-safe DB Operations: Enforces UUID primary keys, timestamp fields, and safe query patterns across models.
  • DAO Patterns & Exports: Encourages encapsulated data access with clear public APIs.
  • Migration Workflows: Standardizes how migrations are created, applied, and tested.
  • RBAC & Security: Guides role-based access controls and secure data access practices.
  • Testing Strategies: Provides approaches for unit tests and integration tests for DAOs.

Quick Start

  • Add a new model to prisma/schema.prisma and ensure UUID primary keys with @id @default(uuid()) @db.Uuid.
  • Implement a DAO in src/lib/dao/ and export it via src/index.ts.
  • Run npx prisma migrate dev --name <descriptive_name> and npx prisma generate.
  • Write unit tests for DAO functions and ensure soft-delete handling where applicable.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: data-access-guidelines
Download link: https://github.com/ZeroGravitySkin-Ron/Claude/archive/main.zip#data-access-guidelines

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository