- Home
- Skills
- Wesleysmits
- Agent Skills
- Database Schema Manager
database-schema-manager_skill
2
GitHub Stars
1
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill wesleysmits/agent-skills --skill database-schema-manager- SKILL.md7.3 KB
Overview
This skill analyzes database schemas and suggests practical improvements for Prisma, TypeORM, or Drizzle projects. It helps detect ORM tool usage, review models and relations, recommend DRY refactors, and generate TypeScript types or migration commands. Use it to improve performance, consistency, and maintainability of your database layer.
How this skill works
The skill detects which ORM is in use by scanning common config and source files, reads schema or entity definitions, and extracts models, fields, relationships, indexes, and enums. It identifies common issues (missing indexes, inconsistent naming, absent timestamps, duplicate field groups, N+1 risks) and produces targeted suggestions, DRY refactor patterns, and migration or type-generation commands.
When to use it
- You want a review of your database schema or entity definitions.
- You need migration recommendations or production-safe migration commands.
- You want TypeScript types generated or synchronized from your schema.
- You notice performance issues or suspect missing indexes or relations.
- You’re standardizing naming, timestamps, soft deletes, or audit fields.
Best practices
- Detect the ORM first (prisma, typeorm, drizzle) to run tool-specific checks.
- Enforce consistent naming (choose camelCase or snake_case across models).
- Add createdAt/updatedAt and consider deletedAt for soft deletes on most tables.
- Index foreign keys and frequently queried columns to avoid slow joins.
- Extract repeated fields into shared mixins/base entities for DRY code.
- Run schema validation and generate types after applying schema changes.
Example use cases
- Audit a Prisma schema.prisma and suggest indexes, enum changes, and migration commands.
- Convert repeated Drizzle column definitions into a shared timestamps/primaryId module.
- Create a TypeORM BaseEntity for common audit fields and update entities to extend it.
- Generate TypeScript models from Drizzle or Prisma schema for API DTOs.
- Analyze proposed schema changes and produce a Schema Change Analysis report with breaking-change notes.
FAQ
I scan typical config and source files: prisma/schema.prisma or package.json for Prisma, drizzle.config.* or package.json for Drizzle, and ormconfig/data-source or entity files for TypeORM.
Can you generate production-safe migration commands?
Yes. I recommend the appropriate migration commands for the detected ORM and highlight risks or required data migrations before applying them in production.