database
Skill0 starsChanged 3 months agoMITView on GitHub
Unified database department: read-only query execution with defense-in-depth safety, schema exploration, slow-query triage with EXPLAIN ANALYZE and pg_stat_statements, missing and covering index design, RLS policy authoring with verification tests, performance optimization with memory and query tuning, and production operations with pooling partitioning and monitoring — handles Postgres, MySQL, MSSQL, and SQLite through six modes. Use when asked to run a read-only query, explore a schema, diagnose a slow query, design an index, optimize database performance, write or verify an RLS policy, tune vacuuming, size connection pooling, or operate a database. Not for backend app code (webdev), infra and deploy pipelines (devops), or platform operations.
24 other projects use a version of this.
Adopted by
Most recently taken up by
- davidvornholt/mailboxtheir own version, first seen Oct 4, 2026
- msrv-tech/skillstheir own version, first seen Oct 2, 2026
- theopenco/llmgatewaytheir own version, first seen Oct 1, 2026
- AsiaOstrich/universal-dev-standardstheir own version, first seen Sep 30, 2026
- lecluse-net/galaristheir own version, first seen Sep 27, 2026
- yamanidev/claude-code-configurationtheir own version, first seen Sep 13, 2026
Used with
Projects with it also use payment, monitoring and 7 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
lightpointventuresSkillpayment
当用户想加支付、收款、集成 Stripe、做订阅付费时使用 — 集成支付系统,支持一次性和订阅
Also in 3 projects that use this
rogue-dev-studioSkillmonitoring
Claude monitoring and usage tracking tools (UV, claude-monitor, claude-usage-cli). Use when the project needs this capability or the user / team manifest asks for it. Use for specialized `monitoring` work when listed in TEAM.yaml or explicitly requested.
Also in 3 projects that use this
JohnJBorenSkillci-cd
CI/CD pipeline design, GitHub Actions, testing automation, and deployment strategies
Also in 3 projects that use this
ffsshhttiikkSkilli18n
Internationalization and localization
Also in 3 projects that use this
OpenAISkillemail
Email sending integration guidance — Resend (native Vercel Marketplace) with React Email templates. Covers API setup, transactional emails, domain verification, and template patterns. Use when sending emails from a Vercel-deployed application.
Also in 3 projects that use this
MicrosoftSkillapi-design
Guide for designing and documenting RESTful APIs. Use when asked to design an API, create endpoints, or document an API.
Also in 5 projects that use this
Other versions24 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 24
- theopenco/llmgateway★ 1.7ksame name
- AsiaOstrich/universal-dev-standards★ 76same name
- msrv-tech/skills★ 57same name
- xiaobei930/cc-best★ 48same name
- lightpointventures/claude-code-starter★ 36same name
- neuron-one/GODMODE★ 33same name
- yamanidev/claude-code-configuration★ 9same name
- YepAPI/skills★ 8same name
- SecuringTheRealm/str-agentic-adventures★ 4same name
- davidvornholt/mailbox★ 2same name
14 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository47 other files it gives its agents.
- AGENTS.mdAGENTS.md
- llms.txtllms.txt
- accountsSkill
- analyticsSkill
- automationSkill
- brandSkill
- client-commsSkill
- contentSkill
- crmSkill
- designSkill
- devopsSkill
- growthSkill
- gtmSkill
- incident-responseSkill
- mobileSkill
- opsSkill
- paidadsSkill
- qa-launchSkill
- researchSkill
- retainSkill
- sales-enablementSkill
- seoSkill
- smmSkill
- telegramSkill
- webdevSkill
- context-anchorSkill
- coupling-routerSkill
- evidence-ledgerSkill
- relaySkill
- secretarySkill
- gitSkill
- new-projectSkill
- updateagentsSkill
- updatedocsSkill
- animateSkill
- designscopeSkill
- refactorSkill
- auditSkill
- code-reviewSkill
- dead-letterSkill
- gauntlet-loopSkill
- humanizeSkill
- muse-securitySkill
- puaSkill
- clean-system-cacheSkill
- coachSkill
- periodic-retreatSkill
The file
We split this skill into the rules it gives an agent
4 rules. 0 are common, 4 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 16 edited versions we read keep these.
4
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 40
Every invocation resolves to exactly one mode.
- Distinctive: line 52
Only the resolved mode's reference is loaded — the rest stay on disk, saving tokens on every run.
- Distinctive: line 65
Run before reporting completion:
- Distinctive: line 116
Every recommendation cites the mechanism (plan node, stat row, policy test) that proves it.
“Common” is measured: kept by at least 6 in 10 of the 16 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
🗄️ database — Unified Database Department
One head skill for all database work. Query read-only, diagnose the slow query, index what matters, guard the rows, keep production healthy. Every mode runs handsfree — defaults are stated inline, assumptions recorded in the deliverable, zero questions asked.
Default stack: self-hosted Postgres 16+ with pg_stat_statements enabled for the diagnose/index/guard/operate modes; the query mode works with any SQL database that has a connection config. Supabase-approved references linked per mode where applicable. Supabase platform operations (dashboard, Auth service, Edge Functions) are linked out, never duplicated.
Modes — quick commands
Every invocation resolves to exactly one mode. Match the request, then load only the matched reference:
| Mode | Trigger phrases | Behavior | Reference |
| query | "run a query", "select from", "query the database", "read from table" | Read-only query execution with defense-in-depth safety: config discovery, credential protection, query whitelist, single-statement enforcement, timeout, row/col caps, tabular output | references/query.md |
| diagnose | "slow query", "why is this slow", "EXPLAIN this", "high CPU", "timeouts" | Slow-query triage: pg_stat_statements ranking, EXPLAIN ANALYZE read, bloat and vacuum checks | references/diagnose.md |
| index | "design an index", "missing index", "covering index", "N+1", "FK is slow" | Missing, composite, covering, partial, and FK indexes plus N+1 and batch-upsert patterns | references/index.md |
| guard | "write an RLS policy", "verify RLS", "security invoker", "PK strategy", "row visible to wrong tenant" | RLS authoring with verification tests, security_invoker views, PK and identifier rules | references/guard.md |
| operate | "pooling", "partition this table", "pgvector", "locks", "vacuum tuning", "connection exhaustion" | Pooling, partitioning, pgvector basics, lock triage, and monitoring | references/operate.md |
| optimize | "optimize query", "database tuning", "slow query optimization", "work_mem", "buffer pool", "database-optimizer" | Deep performance tuning: execution plan diffing, memory tuning (shared_buffers, work_mem), query rewriting, and deadlock elimination | references/optimize.md |
| audit | "audit the database", "query audit", "performance audit", "debug slow queries" | Query audit (read-only verification, config paths) + performance audit (EXPLAIN plans, index gaps) | references/audit.md |
Only the resolved mode's reference is loaded — the rest stay on disk, saving tokens on every run.
Deep-dive references (load on topic, no separate mode)
Mode behavior is fixed; these extend a resolved mode when the request dips deeper than its playbook:
- Vector/hybrid search (embeddings, HNSW vs IVF, payload filters, hybrid FTS+vector, RAG chunking; Qdrant default, pgvector fallback) → references/vector-search.md
- Analytical query modes (columnar/DuckDB vs OLTP routing, aggregation-window analysis) and Neon/Supabase autoscaling + zero-downtime migration → references/analytical.md
Load alongside operate for vector basics or query for aggregation routing.
Verification
Run before reporting completion:
- Query executed read-only (
SELECT/SHOW/EXPLAINonly — noINSERT/UPDATE/DELETE) - Query config path verified —
references/query.mdconfig discovery resolved - Output row/col limits respected (default 100 rows × 10 cols)
- Single-statement enforced (no
;-chained writes) - Connection closed after query
- For diagnosis:
pg_stat_statementsranked beforeEXPLAIN ANALYZE
For connection testing: verify-connection live-checks the configured DSN, confirms read-write intent is absent.
Full audit-mode spec: skills/references/audit-mode-guidance.md.
When to Use
- Running read-only SELECT/SHOW/EXPLAIN queries against a configured database.
- Exploring database schemas: listing tables, columns, indexes, foreign keys.
- Diagnosing a slow query, high CPU, timeouts, or connection exhaustion.
- Designing indexes: missing, composite, covering, partial, FK, or vector.
- Writing or verifying RLS policies and secure views.
- Choosing PK strategy, identifiers, and constraints for a new schema.
- Sizing connection pools, partitioning tables, triaging locks, tuning vacuum.
- Designing vector/hybrid search, routing analytical (columnar) queries, or planning Neon/Supabase autoscaling and zero-downtime migrations.
Anti-Triggers
- Backend application code around the database (queries in app code, ORM models) →
webdev. - Infrastructure and deploy pipelines (servers, CI/CD, backups, restores) →
devops. - Supabase platform operations (dashboard settings, Auth service config, Edge Functions) → link out to Supabase docs, never duplicate here.
- Pre-launch verification of the app built on the database →
qa-launch.
Quick Reference
Routing ladder (decide before any mode)
|| Question | Mode | ||:---|:---| || 'Run this query and show me the results' | query | || 'Which query is slow, and what does its plan say?' | diagnose | || 'What index makes this fast without breaking writes?' | index | || 'Who may see this row, and is it proven?' | guard | || 'Will production stay healthy under load?' | operate |
Order: query → diagnose → index → guard → operate. Get the data, find the bottleneck, fix access paths, lock down rows, then harden operations.
Verification gate (every mode)
- The target is named: exact query, table, policy, or connection symptom — never "the database is slow".
- Every recommendation cites the mechanism (plan node, stat row, policy test) that proves it.
- Index changes state write cost and use
CONCURRENTLYon production tables. - RLS changes ship with a verification test showing allowed and denied rows.
- Production commands are read-only first; mutating commands are flagged before delivery.
- Query mode: credentials never appear in output; connection config is permission-checked before use.
Suite contracts
- Application code using the tuned queries →
webdev. - Deploying migrations, pools, or partitions →
devops. - Verifying the app release built on this database →
qa-launch.
Procedure
- Intake. establish the target (query text, table, policy, or symptom) and the environment (self-hosted version or Supabase project ref, which database type) before touching anything — tuning without a target optimizes noise.
- Resolve the mode. Match the request against the mode table; exactly one mode. Ambiguous → default to diagnose, state the assumption, proceed.
- Execute the mode playbook. Load
references/<mode>.mdand follow its Intake → Deliverable → Procedure → Quality gate in order. - Gate and deliver. Pass this file's Verification checklist plus the mode's quality gate, then deliver SQL plus evidence where the operator expects it.
Pitfalls
- Tuning without
EXPLAIN (ANALYZE, BUFFERS)— guessing which index helps. - Adding indexes for every filter — write amplification and bloat; prove with the plan.
- RLS policies calling
auth.uid()per row instead of(select auth.uid())— full-scan penalty on every query. SECURITY DEFINERfunctions orsecurity_invoker = falseviews in public schemas — privilege escalation path.- Pooling in session mode by default — exhausts connections; transaction mode fits most apps.
- Long transactions and missing FK indexes — lock queues and cascade scans.
- Random UUIDv4 PKs on large tables — index fragmentation; prefer identity or UUIDv7.
- Running write queries through the query mode — the query mode is read-only by default; INSERT/UPDATE/DELETE/MERGE are rejected at the gate.
- Credentials in error output — query mode sanitizes authentication errors before display.
Verification
- Exactly one mode resolved and its reference playbook followed end to end.
- Target named: query, table, policy, or symptom with environment.
- Every recommendation traces to plan output, stat row, or test evidence.
- Index DDL states write cost and uses
CONCURRENTLYfor production. - RLS work ships passing verification tests (allowed and denied rows).
- Query mode: read-only enforced, credentials sanitized, timeout/row-cap honored.
- No Supabase platform ops duplicated; links used instead.
- App-code, infra, and release work routed to
webdev,devops,qa-launch.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
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.

