Skip to content
Skill Authoring
Skill

/discover-database

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

From plugin
cc-polymath
19026 skills4 agents1 command

Claude Code

$ npx -y skills add rand/cc-polymath --skill discover-database --agent claude-code

SKILL.md

discover-database.SKILL.md
name: discover-database
description: Automatically discover database skills when working with SQL, PostgreSQL, MongoDB, Redis, database schema design, query optimization, migrations, connection pooling, ORMs, or database selection. Activates for database design, optimization, and implementation tasks.
license: MIT
metadata:
  author: rand
  version: "4.0"
compatibility: Designed for Claude Code. Compatible with any agent supporting the Agent Skills format.

Database Skills Discovery

Provides automatic access to comprehensive database design, optimization, and implementation skills.

When This Skill Activates

This skill auto-activates when you're working with:

  • SQL databases (PostgreSQL, MySQL)
  • NoSQL databases (MongoDB, Redis)
  • Database schema design and modeling
  • Query optimization and performance tuning
  • Database migrations and schema evolution
  • Connection pooling configuration
  • ORM usage and patterns
  • Database selection and architecture decisions
  • caching
  • cache
  • Redis
  • CDN
  • HTTP caching
  • cache invalidation
  • performance
  • Service Workers

Available Skills

Quick Reference

The Database category contains 19 skills across 2 subcategories:

**Database (12 skills):** 1. **postgres-schema-design** - Schema design, relationships, data types, normalization 2. **postgres-query-optimization** - EXPLAIN plans, indexes, slow query debugging 3. **postgres-migrations** - Schema changes, zero-downtime, rollback strategies 4. **mongodb-document-design** - Document modeling, embedding vs referencing 5. **redis-data-structures** - Caching, sessions, rate limiting, leaderboards 6. **database-connection-pooling** - Pool configuration, debugging exhaustion 7. **orm-patterns** - ORM best practices, N+1 prevention, eager loading 8. **database-selection** - Choosing databases, SQL vs NoSQL decisions

Plus 4 more in `../database/INDEX.md`

**Caching (7 skills):** See `../caching/INDEX.md`

Load Full Category Details

Read ../database/INDEX.md Read ../caching/INDEX.md

Common Workflows

New Database Project

**Sequence**: Selection → Schema design → Connection pooling

Read ../database/database-selection.md # Choose database Read ../database/postgres-schema-design.md # or mongodb-document-design.md Read ../database/database-connection-pooling.md

Query Performance Debugging

**Sequence**: Optimization → Connection pooling → ORM patterns

Read ../database/postgres-query-optimization.md # Debug slow queries Read ../database/database-connection-pooling.md # Check pool settings Read ../database/orm-patterns.md # Fix N+1 queries

Schema Evolution

**Sequence**: Schema design → Migrations

Read ../database/postgres-schema-design.md # Design changes Read ../database/postgres-migrations.md # Implement safely

Caching Layer

**Sequence**: Redis structures → Cache patterns

Read ../database/redis-data-structures.md # Redis patterns Read ../caching/INDEX.md # Cache patterns

Skill Selection Guide

**PostgreSQL skills** (relational, ACID, complex queries):

  • `postgres-schema-design.md` - Design relational schemas
  • `postgres-query-optimization.md` - Optimize complex queries
  • `postgres-migrations.md` - Evolve schema over time

**MongoDB skills** (document-oriented, flexible schema):

  • `mongodb-document-design.md` - Design document structures
  • Choose when: Flexible schema, nested data, rapid iteration

**Redis skills** (in-memory, key-value, caching):

  • `redis-data-structures.md` - Caching, sessions, rate limiting
  • Choose when: Speed critical, caching layer, real-time features

**Cross-database skills**:

  • `database-selection.md` - **Start here** for new projects
  • `database-connection-pooling.md` - All databases need this
  • `orm-patterns.md` - When using ORMs (SQLAlchemy, Prisma, Mongoose)

Integration with Other Skills

Database skills commonly combine with:

**API skills** (`discover-api`):

  • API endpoints → Database queries
  • Connection pooling for API servers
  • Query optimization for API performance
  • Migrations alongside API versioning

**Backend language skills** (`discover-backend`):

  • Python: SQLAlchemy, psycopg2, PyMongo
  • Zig: PostgreSQL C bindings
  • Rust: SQLx, Diesel
  • Go: database/sql, GORM

**Testing skills** (`discover-testing`):

  • Integration tests with test databases
  • Migration testing
  • Query performance testing
  • Data fixture management

**Data pipeline skills** (`discover-data`):

  • ETL from databases
  • Database as data source
  • Bulk data operations
  • Streaming database changes (CDC)

**Observability skills** (`discover-observability`):

  • Query metrics and slow query logs
  • Connection pool metrics
  • Database performance monitoring
  • Alert configuration

Progressive Loading

This gateway skill (~200 lines, ~2K tokens) enables progressive loading:

  • **Level 1**: Gateway loads automatically (you're here now)
  • **Level 2**: Load category INDEX.md (~3K tokens) for full overview
  • **Level 3**: Load specific skills (~2-4K tokens each) as needed

Total context: 2K + 3K + skill(s) = 5-10K tokens vs 25K+ for entire index.

Quick Start Examples

**"Design a PostgreSQL schema for an e-commerce app"**: Read ../database/postgres-schema-design.md

**"Why is my query slow?"**: Read ../database/postgres-query-optimization.md

**"How do I safely change my database schema?"**: Read ../database/postgres-migrations.md

**"Should I use MongoDB or PostgreSQL?"**: Read ../database/database-selection.md

**"Implement caching with Redis"**: Read ../database/redis-data-structures.md

**"Fix N+1 queries in my ORM"**: Read ../database/orm-patterns.md

Database Type Decision Tree

Need ACID transactions? YES → PostgreSQL
Need complex queries/joins? YES → PostgreSQL
Need flexible schema? YES → MongoDB
Need real-time caching? YES → Redis
Need full-text search? YES → PostgreSQL (with extensions) or Elasticsearch
Need graph relationships? YES → Neo4j or PostgreSQL (with extensions)
Need an
Read more
@rand
Ships withcc-polymath

Context-efficient development knowledge via progressive skill discovery

19026 skills4 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
190
Star history of rand/cc-polymath on GitHub, a chart by star-history.com

Other skills on cc-polymath.

anti-slop

anti-slop

Comprehensive toolkit for detecting and eliminating "AI slop" - generic, low-quality AI-generated patterns in natural language,…

@rand@randInstall Skill
discover-agentic

discover-agentic

Automatically discover agentic workflow skills when building AI agents, implementing tool use patterns, managing context windows,…

@rand@randInstall Skill
discover-api

discover-api

Automatically discover API design skills when working with REST APIs, GraphQL schemas, API authentication, OAuth, JWT, rate…

@rand@randInstall Skill
discover-cicd

discover-cicd

Automatically discover CI/CD and automation skills when working with GitHub Actions, Jenkins, GitLab CI, pipelines, continuous…

@rand@randInstall Skill
discover-data

discover-data

Automatically discover data pipeline and ETL skills when working with ETL, data pipelines, streaming, batch processing, data…

@rand@randInstall Skill

More skills from other plugins.

gstack-openclaw-ceo-review

gstack-openclaw-ceo-re…

Use when asked to review a plan, challenge a proposal, run a CEO review, poke holes in an approach, think bigger about scope, or…

gstack3w138k
@garrytan@garrytanInstall Skill
book-to-skill

book-to-skill

Converts books and documents (PDF, EPUB, DOCX, HTML, Markdown, plain text, RTF, MOBI/AZW with Calibre) into structured agent…

@virgiliojr94@virgiliojr94Install Skill
distilly

distilly

Set up the owner profile so a personal agent knows who it works for (first-run setup, \"get to know me\"), or distill colleague,…

@titanwings@titanwingsInstall Skill

Questions about discover-database.

Which coding agents can use discover-database?
discover-database installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.