database-pro
Skill9 starsChanged 2 months agoApache-2.0View on GitHub
Use when writing or optimizing SQL queries, designing database schemas, planning database migrations, or administering PostgreSQL/MySQL. Invoke for EXPLAIN analysis, indexing, JSONB, replication, VACUUM, schema changes, data backfills, zero-downtime deployment, monitoring, or partitioning.
In this repository60 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- check-for-updatesSkill
- api-designSkill
- bddSkill
- blueprintSkill
- brainstormingSkill
- browser-usageSkill
- clarify-codeSkill
- cleanupSkill
- codebase-designSkill
- code-contractsSkill
- code-reviewSkill
- commitSkill
- confluence-exportSkill
- datadogSkill
- diagnosing-bugsSkill
- diagram-designSkill
- e2e-testSkill
- explain-code-flowSkill
- explain-simplySkill
- frontend-slidesSkill
- glabSkill
- grill-meSkill
- handoffSkill
- herdrSkill
- i-have-adhdSkill
- impeccableSkill
- implementSkill
- improve-codebase-architectureSkill
- jiraSkill
- loomSkill
- markitdownSkill
- mermaid-skillSkill
- modularity-designSkill
- modularity-reviewSkill
- plannotatorSkill
- ponytailSkill
- prototypeSkill
- qmdSkill
- refactorSkill
- releaseSkill
- researchSkill
- security-reviewSkill
- show-meSkill
- skill-doctorSkill
- stop-the-slopSkill
- tddSkill
- teachSkill
- terraform-engineerSkill
- ticket-overviewSkill
- to-specSkill
- to-ticketsSkill
- update-docstringsSkill
- wayfinderSkill
- write-documentationSkill
- write-readmeSkill
- write-simplySkill
- writing-for-agentsSkill
- wtfSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 31
Evidence, not guesses: Every optimization is bracketed by the plan: EXPLAIN (ANALYZE, BUFFERS) before the change and again after, one …
- Distinctive: line 33
Indexes pay rent: Every index is justified by a named query pattern and charged against the writes it slows — check for overlap with …
- Distinctive: line 39
Migrations cross releases: Keep deployed migrations immutable.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Database Pro
Senior database engineer for PostgreSQL and MySQL — SQL patterns, query optimization, schema design, migrations, and administration.
Reference Guide
Load the reference matching the task; most tasks need exactly one.
| Topic | Reference | Load When |
| Query Optimization | references/query-optimization.md | EXPLAIN plans, query rewrites, materialized views, hints |
| Index Strategies | references/index-strategies.md | B-tree, GIN, GiST, BRIN, covering, partial, maintenance |
| PG Administration | references/postgresql-administration.md | Config tuning, VACUUM, bloat, partitioning, locks, pooling |
| PG Extensions | references/postgresql-extensions.md | pg_stat_statements, PostGIS, pgvector, pg_trgm, timescaledb |
| PG JSONB | references/postgresql-jsonb.md | JSONB operators, GIN indexing, path queries, validation |
| PG Replication | references/postgresql-replication.md | Streaming/logical replication, failover, PITR |
| MySQL Admin | references/mysql-administration.md | InnoDB tuning, slow query log, replication, compression |
| Monitoring | references/monitoring-and-alerting.md | pg_stat views, performance_schema, health checks, alerts |
| Database Design | references/database-design.md | Normalization, constraints, temporal data, audit trails |
| Database Migrations | references/database-migrations.md | Schema changes, backfills, expand-contract, recovery |
| SQL Patterns | references/sql-patterns.md | CTEs, window functions, JOINs, PIVOT, set operations |
| Dialect Differences | references/dialect-differences.md | PostgreSQL vs MySQL syntax mapping |
Rules
Evidence, not guesses. Every optimization is bracketed by the plan: EXPLAIN (ANALYZE, BUFFERS) before the change and again after, one variable at a time. A recommendation without before/after numbers is a guess.
Indexes pay rent. Every index is justified by a named query pattern and charged against the writes it slows — check for overlap with existing indexes before adding one. After bulk data changes, run ANALYZE so the planner sees current statistics.
Set-based SQL. Express row-by-row logic (cursors, loops, scalar subqueries in SELECT) as joins, window functions, or CTEs. Handle NULLs explicitly in comparisons; name columns instead of SELECT *.
Production posture. Prepared statements for parameterized queries; connection pooling (pgBouncer) in production; autovacuum stays on globally and gets per-table tuning on high-churn tables; large blobs live in object storage with a key in the row. Stage every change outside production first.
Migrations cross releases. Keep deployed migrations immutable. Make application versions compatible during rollout, separate schema changes from long data backfills, and use a new forward migration to repair production state.
Tuning Deliverable
When the task is optimization or tuning, report: before/after EXPLAIN ANALYZE output with the timing delta, index/DDL changes with the query pattern each serves, and config changes as before → after values, plus a monitoring query to confirm the fix holds. Done when the after-plan shows the intended change and both measurements are in the report.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

