database-design

Design normalized schemas, write reversible migrations, and audit SQL for injection risks.

3|Updated Feb 24, 2026
One-click install
npx skills add https://github.com/Doumajnik/template --skill database-design-doumajnik
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: database-design
Source: https://github.com/Doumajnik/template/tree/main/.github/skills/database-design
Command: npx skills add https://github.com/Doumajnik/template --skill database-design-doumajnik

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill eliminates the risk of inconsistent, insecure, or poorly performing database implementations when designing new schemas, writing migrations, optimizing queries, or auditing SQL code for vulnerabilities.

Core Features & Use Cases

  • Full lifecycle database workflow: Covers schema design, migration planning, query optimization, and SQL security auditing in a single structured, repeatable process.
  • Performance and safety guardrails: Includes EXPLAIN plan analysis for query tuning, parameterization checks to prevent SQL injection, and mandatory rollback testing for all migrations.
  • Use case example: When building a new customer loyalty feature, use this Skill to design the rewards table schema, write non-blocking migration scripts, optimize point-accrual queries, and audit all database access for security compliance.

Quick Start

Use the database-design skill to design a new product inventory schema, write reversible migration scripts, and audit all associated queries for SQL injection risks.

Frequently Asked Questions about database-design

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I design a normalized database schema for a new feature?

Database migration scripts must be reversible and non-blocking to ensure zero-downtime production deployments. Writing migrations with mandatory rollback testing prevents data loss and allows safe recovery from failed schema changes.

How do I troubleshoot slow SQL queries using EXPLAIN plan analysis?

Troubleshoot slow SQL queries by analyzing the EXPLAIN plan to identify full table scans and missing indexes. Query tuning optimizes execution paths, reducing latency and improving database performance for heavy workloads.

What is the best way to audit SQL code for security vulnerabilities?

Audit SQL code by checking for parameterized queries and enforcing least-privilege access controls to prevent SQL injection. This security compliance review identifies vulnerable database access patterns and mitigates unauthorized data exposure.

Can I extend an existing database schema without blocking production traffic?

You can extend an existing schema using non-blocking migration scripts that apply reversible changes without locking tables. This approach maintains application availability while safely integrating new columns or tables into the database.