Database Expert
Analyzes, queries, and optimizes databases (SQL, NoSQL) to extract insights and resolve data-related issues efficiently.
Install on your platform
We auto-selected Claude Code based on this skill’s supported platforms.
Run in terminal (recommended)
claude mcp add cin12211-database-expert npx -- -y @trustedskills/cin12211-database-expert
Or manually add to ~/.claude/settings.json
{
"mcpServers": {
"cin12211-database-expert": {
"command": "npx",
"args": [
"-y",
"@trustedskills/cin12211-database-expert"
]
}
}
}Requires Claude Code (claude CLI). Run claude --version to verify your install.
About This Skill
What it does
The Database Expert skill helps AI agents analyze, query, and optimize databases (both SQL and NoSQL) to extract insights and resolve data-related issues efficiently. It specializes in performance optimization, schema design, query analysis, and connection management across various database systems and ORMs. Before proceeding, the skill assesses whether a more specialized expert like postgres-expert, mongodb-expert, redis-expert, prisma-expert or typeorm-expert would be more appropriate for the specific task.
When to use it
- Troubleshooting slow query performance in PostgreSQL, MySQL, MongoDB, or SQLite databases.
- Analyzing database schema design and identifying potential issues like foreign key constraint violations or migration timeouts.
- Optimizing ORM usage (Prisma, TypeORM, Sequelize, Mongoose) for improved data access patterns.
- Diagnosing application timeouts related to database operations.
- Understanding EXPLAIN output to identify sequential scans or other performance bottlenecks.
- Investigating high CPU usage during database queries.
Key capabilities
- Sub-Expert Routing: Automatically assesses if a specialized expert (e.g.,
postgres-expert) is more appropriate for the task. - Environment Detection: Identifies the database environment based on connection strings, configuration files, package dependencies and default ports.
- ORM/Query Builder Detection: Recognizes usage of Prisma, TypeORM, Sequelize, or Mongoose.
- Problem Category Analysis: Categorizes issues into Query Performance & Optimization, Schema Design & Migrations, and other areas.
- Diagnostic Commands: Provides specific diagnostic commands for PostgreSQL (e.g.,
EXPLAIN (ANALYZE , BUFFERS)) and MySQL (e.g.,EXPLAIN FORMAT = JSON). - Progressive Fixes: Suggests minimal, better, and complete solutions to address identified problems.
Example prompts
- "My PostgreSQL query is taking a long time. Can you help me optimize it?"
- "I'm seeing 'Using filesort' in my MySQL EXPLAIN output. What does that mean and how can I fix it?"
- "How do I check for foreign key constraints in my PostgreSQL database?"
- “Analyze this Prisma schema and suggest improvements.”
Tips & gotchas
- The skill will initially assess if a more specialized expert is needed before providing general database expertise.
- Ensure the AI agent has access to relevant database connection strings, configuration files, or code snippets for accurate environment detection.
- Be aware that this skill focuses on analysis and optimization; it may not directly execute changes within your database without further instructions.
Tags
TrustedSkills Verification
Unlike other registries that point to live repositories, TrustedSkills pins every skill to a verified commit hash. This protects you from malicious updates — what you install today is exactly what was reviewed and verified.
Security Audits
| Gen Agent Trust Hub | Pass |
| Socket | Pass |
| Snyk | Pass |
🌐 Community
Passed automated security scans.