database-data-layer
Use when designing or implementing database schemas, data models, migrations, seeding, and query layers.
Skill by UgochukwuChidera
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/ugochukwuchidera-database-data-layer
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: design, backend, testing, data
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/database-data-layer
What's inside
- Skill name
database-data-layer- Description
- Use when designing or implementing database schemas, data models, migrations, seeding, and query layers. Covers Prisma ORM, raw SQL patterns, migration strategies, seed data design, connection pooling, query optimization, and data layer testing. Use with Meta-Architect Stage 2 (domain modeling) outputs.
- License
- GPL-3.0
- Instructions
- 257 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# Database / Data Layer
## Stack-First Principle
Choose your data layer based on the stack, then stick to the pattern:
| Stack | Primary ORM | Migration Tool | Notes |
|-------|-------------|----------------|-------|
| **Node/TypeScript** | Prisma | Prisma Migrate | Default for full-stack JS |
| **Node/TypeScript** | Drizzle | Drizzle Kit | Lighter than Prisma, SQL-like |
| **Python** | SQLAlchemy | Alembic | Mature, flexible |
| **Python** | Django ORM | Django migrations | Only if using Django |
| **Go** | GORM | golang-migrate | Most common Go ORM |
| **Go** | sqlx + sqlc | goose | More SQL control |
| **Rust** | Diesel | Diesel CLI | Type-safe, compile-time checked |
| **Rust** | SQLx | sqlx migrate | Async, compile-time checked |
## Prisma Patterns (Default for Meta-Architect)
### Schema Design Rules
```
model User {
id String @id @default(cuid())
email String @unique
name String?
role Role @default(USER)
posts Post[]
profile Profile?
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
}
enum Role {
USER
ADMIN
}
```
- **@id** — always use `cuid()` or `uuid()`, never auto-increment ints for distributed systems
- **@unique** — add for every natural key (email, slug, externalId)
- **Relations** — always explicit (both sides), never implicit
- **@default** — set sensible defaults, not null
- **@updatedAt** — on every entity that gets mutated
- **Optional vs Required** — `String?` is optional, `String` is required. Be intentional.
### Relation Patterns
```prisma
// One-to-one
model User { profile Profile? }
model Profile { user User @relation(fields: [userId], references: [id]); userId String @unique }
// One-to-many
model User { posts Post[] }
model Post { author User @relation(fields: [authorId], references: [id]); authorId String }
// Many-to-many
model Post { tags Tag[] @relation("PostTags") }
model Tag { posts Post[] @relation("PostTags") }
```
### Migration Workflow
```bash
# Initial setup
npx prisma migrate dev --name init
# Development (auto-deletes data — never in prod)
npx prisma migrate dev --name add_user_role
# Production-safe
npx prisma migrate deploy # apply pending migrations
npx prisma migrate reset --force # only for dev/test reset
# Check status
npx prisma migrate status
npx prisma migrate diff --from-empty --to-schema-datamodel schema.prisma
```
**Golden rules:**
- Never edit migration files manually. Create a new migration.
- `prisma migrate dev` is for development only — it resets data.
- `prisma migrate deploy` is for production — it never resets.
- Always review the generated SQL before deploying.
### Seed Data Patterns
```typescript
// prisma/seed.ts
import { PrismaClient } from '@prisma/client';
const prisma = new PrismaClient();
async function main() {
// Upsert to make seeds idempotent
const user = await prisma.user.upsert({
where: { email: 'admin@example.com' },
update: {},
create: {
email: 'admin@example.com',
name: 'Admin',
role: 'ADMIN',
},
});
console.log('Seeded:', user);
}
main().catch(console.error).finally(() => prisma.$disconnect());
```
```json
// package.json
{ "prisma": { "seed": "tsx prisma/seed.ts" } }
```
```
npx prisma db seed
```From UgochukwuChidera/Opencode-Agents, GPL-3.0.
More from UgochukwuChidera/Opencode-Agents
- 0.474score
tool-preference
UgochukwuChidera
Use when deciding whether to use a plugin tool or bash.
SkillCFreshness: CClaude Code +9 - 0.474score
grill-with-docs
UgochukwuChidera
Use when you need to conduct a structured design interview AND persist the results as documentation.
SkillCFreshness: CClaude Code +9 - 0.474score
segmented-prompt-execution
UgochukwuChidera
Use when executing prompts sequentially from a build plan.
SkillCFreshness: CClaude Code +9 - 0.474score
grill-me
UgochukwuChidera
Use when conducting structured design interviews to discover shared language, uncover implicit assumptions, and refine project terminology before planning or…
SkillCFreshness: CClaude Code +9 - 0.474score
api-design
UgochukwuChidera
Use when designing REST or GraphQL APIs, defining endpoints, request/response shapes, error responses, pagination, versioning, authentication, or OpenAPI specs.
SkillCFreshness: CClaude Code +9 - 0.474score
authentication-authorization
UgochukwuChidera
Use when implementing auth — login, registration, session management, JWT, OAuth, password hashing, RBAC, API keys, MFA, and security headers.
SkillCFreshness: CClaude Code +9 - 0.474score
deployment-devops
UgochukwuChidera
Use when setting up deployment, Docker, CI/CD, environment configuration, hosting, and infrastructure.
SkillCFreshness: CClaude Code +9 - 0.474score
design-system-implementation
UgochukwuChidera
Use when implementing UI components from design token specifications.
SkillCFreshness: CClaude Code +9 - 0.474score
error-handling
UgochukwuChidera
Use when handling errors, building error boundaries, designing error responses, or adding logging/observability.
SkillCFreshness: CClaude Code +9 - 0.474score
meta-architect-patterns
UgochukwuChidera
Use when executing a Meta-Architect build plan from plan.json.
SkillCFreshness: CClaude Code +9 - 0.474score
react-patterns
UgochukwuChidera
Use when discussing React component design, hooks, state management, or rendering patterns.
SkillCFreshness: CClaude Code +9 - 0.474score
security-review
UgochukwuChidera
Use when reviewing code for security vulnerabilities, auditing authentication/authorization, handling secrets, or assessing OWASP Top 10 risks.
SkillCFreshness: CClaude Code +9
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Jun 22, 2026 (4 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- GPL-3.0
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from UgochukwuChidera
- 0.474score
grill-with-docs
UgochukwuChidera
Use when you need to conduct a structured design interview AND persist the results as documentation.
SkillCFreshness: CClaude Code +9 - 0.474score
grill-me
UgochukwuChidera
Use when conducting structured design interviews to discover shared language, uncover implicit assumptions, and refine project terminology before planning or…
SkillCFreshness: CClaude Code +9 - 0.474score
api-design
UgochukwuChidera
Use when designing REST or GraphQL APIs, defining endpoints, request/response shapes, error responses, pagination, versioning, authentication, or OpenAPI specs.
SkillCFreshness: CClaude Code +9 - 0.474score
authentication-authorization
UgochukwuChidera
Use when implementing auth — login, registration, session management, JWT, OAuth, password hashing, RBAC, API keys, MFA, and security headers.
SkillCFreshness: CClaude Code +9 - 0.474score
deployment-devops
UgochukwuChidera
Use when setting up deployment, Docker, CI/CD, environment configuration, hosting, and infrastructure.
SkillCFreshness: CClaude Code +9 - 0.474score
design-system-implementation
UgochukwuChidera
Use when implementing UI components from design token specifications.
SkillCFreshness: CClaude Code +9
Cite this page
database-data-layer skill. Agent Mart. https://agentmart.dev/skills/ugochukwuchidera-database-data-layer (last updated 2026-10-24)