Database schema design patterns and optimization strategies for relational and NoSQL databases. Use when designing database schemas, optimizing query performance, or implementing data persistence layers at scale.
Provides expert guidance for designing scalable database schemas, optimizing query performance, and implementing robust data persistence layers across relational and NoSQL databases. Use when designing schemas, optimizing slow queries, or choosing between normalization and denormalization strategies.
/plugin marketplace add NickCrew/claude-cortex/plugin install nickcrew-claude-ctx-2@NickCrew/claude-cortexThis skill inherits all available tools. When active, it can use any tool Claude has access to.
references/core-principles.mdreferences/indexing-strategies.mdreferences/partitioning-patterns.mdreferences/query-optimization.mdreferences/replication-patterns.mdreferences/schema-design-patterns.mdExpert guidance for designing scalable database schemas, optimizing query performance, and implementing robust data persistence layers across relational and NoSQL databases.
Design schemas that reflect business domain, access patterns, and consistency requirements. Balance normalization (data integrity) with denormalization (read performance) based on workload characteristics.
Distributed systems choose two of three: Consistency, Availability, Partition Tolerance.
Use the right database for each use case: PostgreSQL for transactions, MongoDB for documents, Redis for caching, Elasticsearch for search, Cassandra for time-series, Neo4j for graphs.
| Task | Load reference |
|---|---|
| Core database principles (ACID, BASE, CAP) | skills/database-design-patterns/references/core-principles.md |
| Schema patterns (normalization, star schema, documents) | skills/database-design-patterns/references/schema-design-patterns.md |
| Index types and strategies (B-tree, hash, covering) | skills/database-design-patterns/references/indexing-strategies.md |
| Partitioning and sharding approaches | skills/database-design-patterns/references/partitioning-patterns.md |
| Replication modes (primary-replica, multi-leader) | skills/database-design-patterns/references/replication-patterns.md |
| Query optimization and caching | skills/database-design-patterns/references/query-optimization.md |
EXPLAIN ANALYZE)Over-normalization: Too many joins slow down reads. Denormalize for read-heavy workloads.
Missing indexes: Analyze query patterns and add indexes for frequent WHERE/JOIN columns.
Wrong index type: Use composite indexes with correct column order (equality first, then range).
Ignoring replication lag: Handle eventual consistency with read-your-writes pattern.
Poor partitioning key: Choose keys that distribute data evenly and align with query patterns.
N+1 queries: Use JOINs or batch loading instead of querying in loops.
Inefficient pagination: Use keyset pagination instead of OFFSET for large datasets.
Connection exhaustion: Implement connection pooling sized for your workload.
Books:
Sites:
Tools:
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.