databases

Design, query, and administer MongoDB and PostgreSQL databases.

3|2|Updated Dec 2, 2025
One-click install
npx skills add https://github.com/hotriluan/ai-command-center --skill databases-hotriluan
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: databases
Source: https://github.com/hotriluan/ai-command-center/tree/main/databases
Command: npx skills add https://github.com/hotriluan/ai-command-center --skill databases-hotriluan

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

Managing and optimizing databases (both SQL and NoSQL) requires specialized knowledge in querying, administration, performance tuning, and migration. This skill provides comprehensive guidance and scripts for working with PostgreSQL and MongoDB, simplifying tasks from basic CRUD operations to advanced performance checks and backups.

Core Features & Use Cases

  • PostgreSQL Management: Guides on administration, advanced queries, performance optimization, and using the psql CLI.
  • MongoDB Operations: References for CRUD operations, aggregation pipelines, indexing, and using MongoDB Atlas.
  • Database Utilities: Scripts for automated database backups, migrations, and performance checks.
  • Use Case: A developer needs to optimize a slow PostgreSQL query and then migrate a MongoDB database to a new server. This skill can provide Python scripts for performance checks and migration, along with detailed references on PostgreSQL query optimization and MongoDB Atlas best practices, ensuring efficient and reliable database operations.

Quick Start

Optimize the following PostgreSQL query for better performance: SELECT * FROM users WHERE created_at < '2023-01-01' ORDER BY last_login DESC;

Frequently Asked Questions about databases

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

FAQPage Schema
How do I optimize slow PostgreSQL queries for better performance?

Query optimization in PostgreSQL involves analyzing execution plans with EXPLAIN, adding appropriate indexes on frequently filtered columns, and restructuring joins. This skill provides concrete examples for diagnosing slow queries and applying indexing strategies to reduce execution time.

What's the best way to migrate a MongoDB database to a new server?

MongoDB migrations require planning schema compatibility, using tools like mongodump/mongorestore or MongoDB Atlas for data transfer, and validating data integrity post-migration. This skill covers migration patterns, Python automation scripts, and production considerations for both self-hosted and cloud deployments.

How do I set up automated backups for PostgreSQL and MongoDB?

Automated backups involve configuring backup scripts, scheduling with cron or equivalent tools, and storing snapshots securely. This skill provides runnable backup scripts and CLI commands for both PostgreSQL and MongoDB to ensure data recovery capability.

When should I use MongoDB aggregation pipelines instead of basic queries?

Aggregation pipelines handle complex multi-stage data transformations, filtering, grouping, and calculations that simple queries cannot express. This skill covers pipeline construction, stage ordering, and performance patterns for MongoDB analytical workloads.

Can I use PostgreSQL and MongoDB together in the same application?

PostgreSQL and MongoDB serve different use cases—relational structure versus flexible schemas—and can coexist in polyglot architectures. This skill addresses schema design, query construction, and administration patterns for each, enabling informed technology selection per workflow.

What indexing strategies improve database performance for large datasets?

Indexing accelerates query execution by reducing full-table scans; strategy depends on query patterns, data distribution, and update frequency. This skill provides indexing guidance, performance analysis commands, and configuration examples for PostgreSQL and MongoDB at scale.