/moxywolf-skills:database-schema-designerfrom moxywolf-skills
Design optimized database schemas for SQL and NoSQL databases including tables, relationships, indexes, and constraints. Creates ERD diagrams, migration scripts, and data modeling best practices. Use when users need database design, schema optimization, or data architecture planning.
Ships in moxywolf-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Design optimized, scalable database schemas with proper relationships and indexes.
When a user needs database schema design:
Gather Requirements:
Design Schema Following Best Practices:
For SQL Databases:
For NoSQL Databases:
Generate Complete Schema:
SQL Schema Output:
-- [Entity Name] Table
-- Purpose: [Description]
CREATE TABLE [table_name] (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
[field_name] [TYPE] [CONSTRAINTS],
created_at TIMESTAMP NOT NULL DEFAULT NOW(),
updated_at TIMESTAMP NOT NULL DEFAULT NOW(),
deleted_at TIMESTAMP
);
-- Indexes
CREATE INDEX idx_[table]_[field] ON [table]([field]);
CREATE INDEX idx_[table]_[field1]_[field2] ON [table]([field1], [field2]);
-- Foreign Keys
ALTER TABLE [child_table]
ADD CONSTRAINT fk_[constraint_name]
FOREIGN KEY ([foreign_key_field])
REFERENCES [parent_table](id)
ON DELETE CASCADE;
NoSQL Schema Output (MongoDB example):
// [Collection Name]
// Purpose: [Description]
{
_id: ObjectId,
[field_name]: [type],
// Embedded document
[embedded_object]: {
field1: type,
field2: type
},
// Reference
[related_id]: ObjectId, // Ref to [other_collection]
created_at: ISODate,
updated_at: ISODate
}
// Indexes
db.[collection].createIndex({ field: 1 })
db.[collection].createIndex({ field1: 1, field2: -1 })
db.[collection].createIndex({ field: "text" }) // Text search
Create Entity Relationship Diagram (text format):
┌─────────────────────┐
│ users │
├─────────────────────┤
│ id (PK) │
│ email (UNIQUE) │
│ name │
│ created_at │
└──────────┬──────────┘
│
│ 1:N
│
┌──────────▼──────────┐
│ posts │
├─────────────────────┤
│ id (PK) │
│ user_id (FK) │
│ title │
│ content │
│ created_at │
└──────────┬──────────┘
│
│ N:M (via post_tags)
│
┌──────────▼──────────┐
│ tags │
├─────────────────────┤
│ id (PK) │
│ name (UNIQUE) │
└─────────────────────┘
Provide Migration Scripts:
-- Migration: create_users_table
-- Date: 2024-01-15
BEGIN;
CREATE TABLE users (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
email VARCHAR(255) NOT NULL UNIQUE,
name VARCHAR(255) NOT NULL,
password_hash VARCHAR(255) NOT NULL,
created_at TIMESTAMP NOT NULL DEFAULT NOW(),
updated_at TIMESTAMP NOT NULL DEFAULT NOW()
);
CREATE INDEX idx_users_email ON users(email);
CREATE INDEX idx_users_created_at ON users(created_at);
COMMIT;
-- Rollback
BEGIN;
DROP TABLE users;
COMMIT;
Format Complete Output:
🗄️ DATABASE SCHEMA DESIGN
Database: [PostgreSQL/MySQL/MongoDB/etc.]
Domain: [Application type]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📋 ENTITY RELATIONSHIP DIAGRAM
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[ASCII ERD]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📊 TABLE DEFINITIONS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[SQL CREATE TABLE statements]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔗 RELATIONSHIPS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[Foreign key constraints]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚡ INDEXES
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[Index definitions with rationale]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔄 MIGRATION SCRIPTS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[Up and down migrations]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
💡 OPTIMIZATION NOTES
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Performance Considerations:
• [Index strategy]
• [Partitioning recommendations]
• [Denormalization opportunities]
Scaling Strategy:
• [Sharding approach]
• [Read replicas]
• [Caching layer]
Data Integrity:
• [Constraint strategy]
• [Validation rules]
• [Audit logging]
Schema Design Best Practices:
Naming Conventions:
Data Types:
Indexes:
Relationships:
Performance:
Ensure schemas:
Generate production-ready, optimized database schemas that scale.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub moxywolfllc/moxywolf-plugins --plugin moxywolf-skills26 skills in this plugin
/api-documentation-writerGenerate comprehensive API documentation including endpoint descriptions, request/response examples, authentication guides, error codes, and SDKs. Creates OpenAPI/Swagger specs, REST API docs, and developer-friendly reference materials. Use when users need to document APIs, create technical references, or write developer documentation./artifacts-builderSuite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use for complex artifacts requiring state management, routing, or shadcn/ui components - not for simple single-file HTML/JSX artifacts./Other plugins' skills for the same job