SkillsLib.ai

Database Schema Optimizer

Analyze database schemas for performance issues and generate migration scripts

4.3(47 reviews)
100+ downloads
Updated Nov 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

Antenna Design & Optimization Skill
$30
Antenna Design & Optimization Skill

You can accelerate your entire antenna design workflow—from initial concept to optimized specifications—by leveraging Claude's knowledge of electromagnetic theory, antenna types, and design trade-offs. Claude helps you parameterize designs, identify optimal configurations for your frequency band and application, and prepare detailed briefs for simulation and manufacturing. You'll generate design reviews, impedance-matching solutions, and validation checklists without context-switching to multiple tools.

Api Reference Writer
$35
API Docs4.5(47)
Api Reference Writer

You can convert raw API code, OpenAPI specs, GraphQL schemas, and implementation details into production-ready reference documentation. The skill generates systematically organized endpoint documentation with parameter tables, real request/response examples, error code catalogs, authentication details, rate limits, and SDK usage snippets in multiple programming languages—creating the authoritative developer reference for REST APIs, GraphQL APIs, WebSocket APIs, and webhook schemas.

Incident Response & Root Cause Analysis
$35
Incident Response & Root Cause Analysis

Rapidly analyze production incidents by correlating observability signals—logs, metrics, traces, and events—to identify the true root cause instead of symptoms. You'll reconstruct incident timelines, quantify impact scope, and generate both immediate remediation steps and long-term prevention measures.

Kalman Filter Engineering Assistant
$25
Kalman Filter Engineering Assistant

This skill guides you through designing Kalman filters for your specific state estimation and sensor fusion problems. You'll learn to diagnose filter divergence, tune covariance matrices (Q and R), and validate observability—turning mathematical theory into production-ready filters. The skill provides step-by-step workflows, diagnostic tools, and practical templates for common applications like GPS/IMU fusion, SLAM, and aircraft navigation.

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.

Full-Stack Feature Development Workflow
$30
Full-Stack Feature Development Workflow

You'll transform high-level feature requirements into a complete development plan covering API design, frontend implementation, testing strategy, and documentation. The skill helps you identify dependencies, parallelize work across frontend and backend teams, and establish quality gates that ensure features ship bug-free with proper error handling and logging.

Smart Contract Security Audit & Gas Optimization Review
$45
Smart Contract Security Audit & Gas Optimization Review

You get a comprehensive security and gas optimization review of your Solidity smart contracts. The skill identifies common vulnerabilities like reentrancy attacks, overflow/underflow bugs, and unchecked external calls, while also pinpointing expensive operations and suggesting specific gas optimizations. Use this as a pre-audit screening to catch issues early and prepare your code for professional security review.

Bioanalytical Method Development Assistant
$35
Bioanalytical Method Development Assistant

You can rapidly design, optimize, and validate chromatographic and LC-MS/MS methods for analyzing drugs and metabolites in biological matrices. This skill guides you through analytical method development workflows—including parameter selection, sensitivity optimization, and regulatory strategy—while ensuring ICH Q2(R2) and FDA compliance throughout the development process.

$35.00