SkillsLib.ai

Database Schema Optimizer

Analyze database schemas for performance issues and generate migration scripts

4.3(47 reviews)
100+ downloads
Updated Sep 2026
Verified SafeSecurity VerifiedThis skill was analyzed by our AI security scanner for harmful content including data exfiltration, system manipulation, credential theft, and prompt injection. No threats were detected.

What You Can Do

Audit your entire database schema to detect structural inefficiencies that degrade performance. The skill identifies denormalization problems, missing or poorly designed indexes, N+1 query patterns, referential integrity risks, and partitioning opportunities—then generates executable migration code tailored to your database system (PostgreSQL, MySQL, or SQLite). You'll get prioritized recommendations that address both immediate bottlenecks and long-term design improvements.

Features

Denormalization detection

identifies redundant data and update anomalies caused by improper schema design

Index analysis

flags missing indexes and suggests optimal index strategies for query performance

N+1 query pattern detection

spots inefficient query patterns and recommends eager-loading solutions

Foreign key validation

checks referential integrity and relationship constraints for data consistency

Partitioning recommendations

suggests table partitioning strategies for large datasets based on access patterns

Migration script generation

produces executable SQL migration code for PostgreSQL, MySQL, or SQLite

Performance impact estimation

quantifies expected query performance improvements from recommendations

Query optimization hints

provides application-level changes (eager loading, caching) alongside schema fixes

Example Output

Input: A user pastes their PostgreSQL schema with 8 tables, user and post relationships, and slow query logs.

Output:

code
## Critical Issues (Fix First)
1. Missing composite index on posts(user_id, created_at) — estimated 340% query speedup
   Migration: CREATE INDEX idx_posts_user_time ON posts(user_id, created_at);

2. N+1 pattern detected: Comments table missing user_id denormalization
   Recommendation: Add user_id + username columns to comments for eager-loading
   Migration script provided with backfill strategy

## Schema Improvements
- Normalize 'user_roles' (currently comma-separated in users table)
- Partition posts table by year on created_at (current: 45M rows)

## Generated Migrations
[Full executable migration scripts with rollback procedures]

What's Included

  • SKILL.md: core analyzer instructions and schema assessment framework
  • Schema audit template: structured checklist for database analysis
  • Migration script templates: boilerplate SQL for PostgreSQL, MySQL, SQLite
  • N+1 detection patterns: code examples and eager-loading strategies
  • Index design worksheet: step-by-step guide for evaluating indexing strategies

Who It's For

  • Database administrators managing legacy systems or performance issues
  • Backend engineers optimizing application database performance
  • Technical architects designing schemas for new systems
  • DevOps engineers planning database infrastructure upgrades
  • Data engineers working with OLTP systems requiring query optimization

Best For

  • Legacy database health assessments and performance audits
  • Identifying root causes of slow queries before profiling individual statements
  • Pre-production schema validation and optimization
  • N+1 query detection and eager-loading strategy planning
  • Migration planning for database refactoring and scaling

You might also like

Injectable Formulation Development & Troubleshooting
$40
Injectable Formulation Development & Troubleshooting

You'll develop systematic approaches to injectable formulation design, from API selection through sterilization strategy. Claude helps you troubleshoot failed batches by analyzing root causes, recommends regulatory pathways (505(b)(2), ANDA, NDA), and provides science-backed solutions for stability, compatibility, and manufacturability challenges.

$50
Integration Architecture Assessor

This skill helps you systematically assess integration needs across your systems, design architecture patterns that scale with your organization, and identify technical and operational risks before implementation. You'll receive architecture recommendations aligned to your business constraints, clear integration roadmaps, and risk mitigation strategies that reduce deployment surprises. Get structured decision records suitable for architecture review boards and engineering teams.

Git Commit Message Writer
$45
CI/CD4.3(47)
Git Commit Message Writer

Claude analyzes your code diffs and generates standardized commit messages that follow the Conventional Commits specification. The skill automatically determines the correct commit type, scope, and description based on the changes you've made, ensuring your messages are parseable by automation tools while remaining human-readable for code reviewers.

Structured NLP Analysis and Annotation with Claude
$35
NLP3.3(6)
Structured NLP Analysis and Annotation with Claude

You can transform raw text into structured, labeled datasets for machine learning, analysis, and research. This skill performs named entity recognition, sentiment classification, part-of-speech tagging, and dependency parsing—generating consistent, validated annotations at scale. Use it to prepare corpora, extract entities, classify documents, or perform linguistic analysis without manual annotation.

Service Mesh Architecture & Troubleshooting
$25
Service Mesh Architecture & Troubleshooting

This skill helps you systematically analyze service mesh architectures, identify inter-service communication failures, and design optimal routing and security policies. You'll receive step-by-step troubleshooting guidance tailored to your mesh platform (Istio, Linkerd, Consul), configuration validation reports, and architectural recommendations that reduce latency, improve observability, and tighten security posture.

Production ML Deployment Validation & Runbook Automation
$25
Production ML Deployment Validation & Runbook Automation

This skill automates the creation of production-ready deployment validation checklists, infrastructure-as-code templates, and incident response runbooks tailored to your ML stack. You get comprehensive pre-deployment checks covering model validation, data pipeline integrity, infrastructure readiness, and monitoring setup—all customized for your specific models and cloud provider. The skill generates executable runbooks that teams can follow during incidents, including rollback procedures, failover strategies, and diagnostic commands.

Internal Developer Platform Architecture & Golden Paths
$15
Internal Developer Platform Architecture & Golden Paths

Build scalable internal developer platform architectures that reduce cognitive load and standardize workflows for your development organization. Document golden paths that guide developers through common tasks like onboarding, deployment, and troubleshooting. Map platform capabilities, integrations, and service topology to align with your engineering scale and technical strategy.

IoT Firmware Analysis & Device Debugger
$40
IoT Firmware Analysis & Device Debugger

Rapidly analyze firmware logs and diagnose hardware issues that cause device failures, connectivity problems, and performance degradation. You'll identify root causes from stack traces, crash dumps, and sensor data, then generate specific optimization recommendations. This skill transforms raw device logs into actionable debugging plans that reduce time-to-resolution from hours to minutes.

$35.00