Agent skill

Databases

by Microck in Microck/ordinary-claude-skills

Work with MongoDB (document database, BSON documents, aggregation pipelines, Atlas cloud) and PostgreSQL (relational database, SQL queries, psql CLI, pgAdmin).

MITAuto-check: notesDatabases

Install Databases

skills CLI
$ npx skills add Microck/ordinary-claude-skills --skill databases -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install Microck/ordinary-claude-skills databases --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/Microck/ordinary-claude-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills_all/databases .claude/skills/databases && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
databases
GitHub stars
401
Token cost
~1.9k tokens
SKILL.md length
453 words
Files
2
Skills in repo
97
Repo updated
First seen
Licence
MIT

At a glance

Work with MongoDB (document database, BSON documents, aggregation pipelines, Atlas cloud) and PostgreSQL (relational database, SQL queries, psql CLI, pgAdmin).

  • Designing database schemas
  • SKILL.md covers When to Use This Skill, Database Selection Guide, Quick Start and Common Operations, plus 5 more sections
  • Calls python, mongosh and apt-get
  • Writing queries and aggregations

What it does

Databases is an agent skill from Microck/ordinary-claude-skills. Work with MongoDB (document database, BSON documents, aggregation pipelines, Atlas cloud) and PostgreSQL (relational database, SQL queries, psql CLI, pgAdmin). Use when designing database schemas, writing queries and aggregations, optimizing indexes for performance, performing database migrations, configuring replication and sharding, implementing backup and restore strategies, managing database users and permissions, analyzing query performance, or administering production databases.

Its SKILL.md is about 1.9k tokens, which your agent loads only when the skill is triggered. The skill folder holds 1 other file (for example `metadata.json`).

It sits in Databases, covering NoSQL databases, Database administration and SQL. It works with PostgreSQL, MongoDB and SQL. The repository describes itself as: An unappealing collection of Claude Skills and resources. The licence is MIT.

When your agent uses it

  • Designing database schemas
  • Writing queries and aggregations
  • Optimizing indexes for performance
  • Performing database migrations

Example prompts

  • “/databases”

Requirements

  • Python 3

What it can do on your machine

Read from SKILL.md and the folder at commit 1056d29. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • python
    • mongosh
    • apt-get
    • psql

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • mongodb.com
    • postgresql.org
    • learn.mongodb.com
    • postgresqltutorial.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Databases loads about 1.9k tokens when it runs. Until then it costs about 125 tokens; SKILL.md has 453 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~125
When it runs · the whole SKILL.md, loaded when a task matches
~1.9k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteRuns commands with sudoSKILL.md:82
    sudo apt-get install postgresql postgresql-contrib
  • NoteRuns commands with sudoSKILL.md:85
    sudo systemctl start postgresql

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from Microck/ordinary-claude-skills at commit 1056d29, republished under its MIT licence (© Microck). 453 words, ~1,918 tokens.

Download SKILL.mdSave it as .claude/skills/databases/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
databases
description
Work with MongoDB (document database, BSON documents, aggregation pipelines, Atlas cloud) and PostgreSQL (relational database, SQL queries, psql CLI, pgAdmin). Use when designing database schemas, writing queries and aggregations, optimizing indexes for performance, performing database migrations, configuring replication and sharding, implementing backup and restore strategies, managing database users and permissions, analyzing query performance, or administering production databases.
license
MIT

Databases Skill

Unified guide for working with MongoDB (document-oriented) and PostgreSQL (relational) databases. Choose the right database for your use case and master both systems.

When to Use This Skill

Use when:

  • Designing database schemas and data models
  • Writing queries (SQL or MongoDB query language)
  • Building aggregation pipelines or complex joins
  • Optimizing indexes and query performance
  • Implementing database migrations
  • Setting up replication, sharding, or clustering
  • Configuring backups and disaster recovery
  • Managing database users and permissions
  • Analyzing slow queries and performance issues
  • Administering production database deployments

Database Selection Guide

Choose MongoDB When:
  • Schema flexibility: frequent structure changes, heterogeneous data
  • Document-centric: natural JSON/BSON data model
  • Horizontal scaling: need to shard across multiple servers
  • High write throughput: IoT, logging, real-time analytics
  • Nested/hierarchical data: embedded documents preferred
  • Rapid prototyping: schema evolution without migrations

Best for: Content management, catalogs, IoT time series, real-time analytics, mobile apps, user profiles

Choose PostgreSQL When:
  • Strong consistency: ACID transactions critical
  • Complex relationships: many-to-many joins, referential integrity
  • SQL requirement: team expertise, reporting tools, BI systems
  • Data integrity: strict schema validation, constraints
  • Mature ecosystem: extensive tooling, extensions
  • Complex queries: window functions, CTEs, analytical workloads

Best for: Financial systems, e-commerce transactions, ERP, CRM, data warehousing, analytics

Both Support:
  • JSON/JSONB storage and querying
  • Full-text search capabilities
  • Geospatial queries and indexing
  • Replication and high availability
  • ACID transactions (MongoDB 4.0+)
  • Strong security features

Quick Start

MongoDB Setup
bash
# Atlas (Cloud) - Recommended
# 1. Sign up at mongodb.com/atlas
# 2. Create M0 free cluster
# 3. Get connection string

# Connection
mongodb+srv://user:pass@cluster.mongodb.net/db

# Shell
mongosh "mongodb+srv://cluster.mongodb.net/mydb"

# Basic operations
db.users.insertOne({ name: "Alice", age: 30 })
db.users.find({ age: { $gte: 18 } })
db.users.updateOne({ name: "Alice" }, { $set: { age: 31 } })
db.users.deleteOne({ name: "Alice" })
PostgreSQL Setup
bash
# Ubuntu/Debian
sudo apt-get install postgresql postgresql-contrib

# Start service
sudo systemctl start postgresql

# Connect
psql -U postgres -d mydb

# Basic operations
CREATE TABLE users (id SERIAL PRIMARY KEY, name TEXT, age INT);
INSERT INTO users (name, age) VALUES ('Alice', 30);
SELECT * FROM users WHERE age >= 18;
UPDATE users SET age = 31 WHERE name = 'Alice';
DELETE FROM users WHERE name = 'Alice';

Common Operations

Create/Insert
javascript
// MongoDB
db.users.insertOne({ name: "Bob", email: "bob@example.com" })
db.users.insertMany([{ name: "Alice" }, { name: "Charlie" }])
sql
-- PostgreSQL
INSERT INTO users (name, email) VALUES ('Bob', 'bob@example.com');
INSERT INTO users (name, email) VALUES ('Alice', NULL), ('Charlie', NULL);
Read/Query
javascript
// MongoDB
db.users.find({ age: { $gte: 18 } })
db.users.findOne({ email: "bob@example.com" })
sql
-- PostgreSQL
SELECT * FROM users WHERE age >= 18;
SELECT * FROM users WHERE email = 'bob@example.com' LIMIT 1;
Update
javascript
// MongoDB
db.users.updateOne({ name: "Bob" }, { $set: { age: 25 } })
db.users.updateMany({ status: "pending" }, { $set: { status: "active" } })
sql
-- PostgreSQL
UPDATE users SET age = 25 WHERE name = 'Bob';
UPDATE users SET status = 'active' WHERE status = 'pending';
Delete
javascript
// MongoDB
db.users.deleteOne({ name: "Bob" })
db.users.deleteMany({ status: "deleted" })
sql
-- PostgreSQL
DELETE FROM users WHERE name = 'Bob';
DELETE FROM users WHERE status = 'deleted';
Indexing
javascript
// MongoDB
db.users.createIndex({ email: 1 })
db.users.createIndex({ status: 1, createdAt: -1 })
sql
-- PostgreSQL
CREATE INDEX idx_users_email ON users(email);
CREATE INDEX idx_users_status_created ON users(status, created_at DESC);

Reference Navigation

MongoDB References
Show full SKILL.md (191 more words)Show less
PostgreSQL References

Python Utilities

Database utility scripts in scripts/:

  • db_migrate.py - Generate and apply migrations for both databases
  • db_backup.py - Backup and restore MongoDB and PostgreSQL
  • db_performance_check.py - Analyze slow queries and recommend indexes
bash
# Generate migration
python scripts/db_migrate.py --db mongodb --generate "add_user_index"

# Run backup
python scripts/db_backup.py --db postgres --output /backups/

# Check performance
python scripts/db_performance_check.py --db mongodb --threshold 100ms

Key Differences Summary

FeatureMongoDBPostgreSQL
Data ModelDocument (JSON/BSON)Relational (Tables/Rows)
SchemaFlexible, dynamicStrict, predefined
Query LanguageMongoDB Query LanguageSQL
Joins$lookup (limited)Native, optimized
TransactionsMulti-document (4.0+)Native ACID
ScalingHorizontal (sharding)Vertical (primary), Horizontal (extensions)
IndexesSingle, compound, text, geo, etcB-tree, hash, GiST, GIN, etc

Best Practices

MongoDB:

  • Use embedded documents for 1-to-few relationships
  • Reference documents for 1-to-many or many-to-many
  • Index frequently queried fields
  • Use aggregation pipeline for complex transformations
  • Enable authentication and TLS in production
  • Use Atlas for managed hosting

PostgreSQL:

  • Normalize schema to 3NF, denormalize for performance
  • Use foreign keys for referential integrity
  • Index foreign keys and frequently filtered columns
  • Use EXPLAIN ANALYZE to optimize queries
  • Regular VACUUM and ANALYZE maintenance
  • Connection pooling (pgBouncer) for web apps

Resources

© Microck, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in skills_all/databases of Microck/ordinary-claude-skills.

  • SKILL.md
  • metadata.json

Open the folder on GitHubat commit 1056d29

Compare with similar skills

Databases next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Databases compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Databases this skillMicrock/ordinary-claude-skills401—~1.9kAutomated safety check: NotesMIT
Discover Databaserand/cc-polymath181—~2kAutomated safety check: PassMIT
DB SculptorEliasOulkadi/shokunin114—~3.1kAutomated safety check: NotesMIT
Database FundamentalsDanielPodolsky/ownyourcode2901 repos~1.6kAutomated safety check: PassMIT
Query Expertjamesrochabrun/skills215—~4.3kAutomated safety check: PassMIT
Postgresql Experttheneoai/awesome-skills183—~3.5kAutomated safety check: PassMIT

Similar skills

  • Discover Database

    rand/cc-polymath

    Automatically discover database skills when working with SQL, PostgreSQL, MongoDB, Redis, database schema design, query optimization, migrations, connection pooling, ORMs, or database selection.

    181 GitHub stars~2k tokensUpdated 7 mo ago
    DatabasesAuto-check passed
  • DB Sculptor

    EliasOulkadi/shokunin

    Design database schemas with Prisma/Drizzle, PostgreSQL index strategy (B-tree, GIN, GiST, BRIN, Hash), query optimization (EXPLAIN ANALYZE), migration safety (expand/contract, zero-downtime), and…

    114 GitHub stars~3.1k tokensUpdated 2 days ago
    DatabasesAuto-check: notes
  • Database Fundamentals

    DanielPodolsky/ownyourcode

    Reviews schema design, SQL queries, ORM patterns. An agent skill from DanielPodolsky/ownyourcode.

    290 GitHub starsUsed in 1 repo~1.6k tokens
    DatabasesAuto-check passed
  • Query Expert

    jamesrochabrun/skills

    Master SQL and database queries across multiple systems. An agent skill from jamesrochabrun/skills.

    215 GitHub stars~4.3k tokensUpdated 8 mo ago
    DatabasesAuto-check passed
  • Postgresql Expert

    theneoai/awesome-skills

    PostgreSQL expert with advanced SQL, JSONB, indexing, performance tuning, replication, and extensions.

    183 GitHub stars~3.5k tokensUpdated 4 mo ago
    DatabasesAuto-check passed
  • Official

    Gives the agent Postgres rules to consult before writing or changing tables, queries, indexes, RLS policies or migrations, and when diagnosing slow queries.

    2.7k GitHub starsUsed in 24 repos~808 tokens
    DatabasesAuto-check passed

More from Microck/ordinary-claude-skills

All 97 skills in this repo
  • Every Style Editor

    Microck/ordinary-claude-skills

    This skill should be used when reviewing or editing copy to ensure adherence to Every's style guide.

    401 GitHub starsUsed in 3 repos~1.2k tokens
    Auto-check passed
  • Gemini Imagegen

    Microck/ordinary-claude-skills

    Generate and edit images using the Gemini API (Nano Banana Pro).

    401 GitHub starsUsed in 3 repos~1.6k tokens
    Auto-check passed
  • Andrew Kane Gem Writer

    Microck/ordinary-claude-skills

    Write Ruby gems following Andrew Kane's proven patterns and philosophy.

    401 GitHub starsUsed in 2 repos~1.2k tokens
    Auto-check passed
  • Codex

    Microck/ordinary-claude-skills

    Execute Codex CLI for code analysis, refactoring, and automated code changes.

    401 GitHub starsUsed in 2 repos~2.8k tokens
    Auto-check passed
  • Docs Review

    Microck/ordinary-claude-skills

    Review documentation changes for compliance with the Metabase writing style guide.

    401 GitHub starsUsed in 2 repos~1.8k tokens
    Auto-check: notes
  • File Todos

    Microck/ordinary-claude-skills

    This skill should be used when managing the file-based todo tracking system in the todos/ directory.

    401 GitHub starsUsed in 2 repos~1.9k tokens
    Auto-check passed

Categories

Questions about Databases

What does Databases do?

Work with MongoDB (document database, BSON documents, aggregation pipelines, Atlas cloud) and PostgreSQL (relational database, SQL queries, psql CLI, pgAdmin). Databases is an agent skill from Microck/ordinary-claude-skills. Work with MongoDB (document database, BSON documents, aggregation pipelines, Atlas cloud) and PostgreSQL (relational database, SQL queries, psql CLI, pgAdmin).

When should I use Databases?

Databases fits situations like: designing database schemas; writing queries and aggregations; optimizing indexes for performance; performing database migrations.

How do I install Databases in Claude Code?

Run `npx skills add Microck/ordinary-claude-skills --skill databases -a claude-code`. Or copy the skill folder (skills_all/databases in Microck/ordinary-claude-skills) into .claude/skills/databases in your project. Claude Code loads it when a task matches its description.

How do I install Databases in Codex?

Run `npx skills add Microck/ordinary-claude-skills --skill databases -a codex`. Or copy the skill folder (skills_all/databases in Microck/ordinary-claude-skills) into .agents/skills/databases in your project. Codex loads it when a task matches its description.

Can I use Databases in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Microck/ordinary-claude-skills --skill databases -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/databases, .gemini/skills/databases, .github/skills/databases and .opencode/skills/databases in your project.

What does Databases need to run?

Going by SKILL.md and its folder, Databases needs the command-line tools its instructions call (python, mongosh, apt-get and psql). Our summary lists: Python 3.

Does Databases access the network?

SKILL.md names 4 domains. As links in the text: mongodb.com, postgresql.org, learn.mongodb.com and postgresqltutorial.com. This is read from the text; nothing was executed.

Is Databases safe to install?

Our automated static check of SKILL.md found notes only (runs commands with sudo), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Databases use?

Databases is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Databases use?

About 1.9k tokens (SKILL.md is roughly 7.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Databases?

Skills that share tags, products or a category with Databases: Discover Database (rand/cc-polymath, 181 stars), DB Sculptor (EliasOulkadi/shokunin, 114 stars), Database Fundamentals (DanielPodolsky/ownyourcode, 290 stars) and Query Expert (jamesrochabrun/skills, 215 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Databases?

Microck (a GitHub user) maintains it in Microck/ordinary-claude-skills, which has 401 GitHub stars. The repository holds 97 skills in this directory. The repository was last updated on September 6, 2026.

Source: Microck/ordinary-claude-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.