database-genius
Skill6 starsChanged 6 months agoMITView on GitHub
Activates DatabaseGenius for database design, optimization, and migration. Use when you need ERD and schema design with normalization decisions, composite/partial/covering index strategy, EXPLAIN plan analysis and query rewriting, zero-downtime migration planning with rollback strategy, or pgvector setup for AI embedding workloads.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- sohaibdevv/Claude-Agentic-Skills2.0-versionword for word, first seen Jun 9, 2026
Other versions1 project uses a version of this.
Word for word · 1
- sohaibdevv/Claude-Agentic-Skills2.0-version★ 2100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
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 repository121 other files it gives its agents.
- abtest-scientistSkill
- agentic-workflow-builderSkill
- agentOS-orchestratorSkill
- agent-smithSkill
- AIProductManagerSkill
- ai-red-teamerSkill
- APIDesignArchitectSkill
- api-integratorSkill
- arxiv-researcherSkill
- b2b-sales-playbookSkill
- biotech-analystSkill
- BoardDeckBuilderSkill
- business-intelligence-proSkill
- ceo-war-roomSkill
- cfo-intelligenceSkill
- churn-analystSkill
- claude-mythosSkill
- climate-tech-analystSkill
- CloudCostOptimizerSkill
- code-migratorSkill
- code-reviewerSkill
- CommunityBuilderSkill
- compliance-aiSkill
- ContentOpsOSSkill
- content-research-writerSkill
- contract-drafterSkill
- CrisisIntelligenceSkill
- crypto-sageSkill
- CultureArchitectSkill
- CustomerInterviewAnalystSkill
- customer-successSkill
- cybersecurity-analystSkill
- data-governance-agentSkill
- data-pipeline-proSkill
- data-scientist-proSkill
- DataWarehouseArchitectSkill
- DesignSystemArchitectSkill
- developer-advocateSkill
- DeveloperExperienceOSSkill
- devops-commanderSkill
- document-processorSkill
- EngineeringManagerSkill
- EnterpriseSalesOSSkill
- esg-compassSkill
- finance-oracleSkill
- financial-model-builderSkill
- founder-to-ceoSkill
- github-intelligenceSkill
- GTMCommanderSkill
- growth-hackingSkill
- healthcare-analyticsSkill
- hr-analyticsSkill
- incident-commanderSkill
- innovation-catalystSkill
- insurance-actuarySkill
- knowledge-graph-builderSkill
- learning-coachSkill
- legal-eagleSkill
- load-testerSkill
- ma-dealmakerSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 4 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
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
- Distinctive: line 16
Denormalize when: read performance is critical.
- Distinctive: line 17
Rule: start normalized, denormalize based on measured query performance, not assumptions
- Distinctive: line 50
Remove old column: only after application code no longer references it
- Distinctive: line 52
Never: ADD COLUMN with DEFAULT on large table (rewrites entire table in older Postgres versions)
- Very specific: line 69
Use HNSW index for higher recall at query time (better than IVFFlat for most cases)
≈ “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
DatabaseGenius Agent
You are DatabaseGenius — a database architect specializing in schema design, query optimization, and migration strategy.
Schema Design Decisions
Normalization vs Denormalization
- Normalize when: data is frequently updated; storage is a concern; strong ACID guarantees needed
- Denormalize when: read performance is critical; data is mostly read; analytics workloads
- Rule: start normalized, denormalize based on measured query performance, not assumptions
Index Strategy
When to Create Each Index Type
| Index Type | Use When |
| B-tree (default) | Equality and range queries, ORDER BY, LIKE 'prefix%' |
| Composite | Multiple columns in WHERE clause — order matters (selectivity: high to low) |
| Partial | Subset of rows frequently queried (e.g., WHERE status = 'active') |
| Covering | SELECT columns are all in the index (eliminates table lookup) |
| GIN | Array columns, JSONB, full-text search |
| BRIN | Very large tables with natural sort order (time-series, sequential IDs) |
Index Anti-Patterns
- Index on low-cardinality column alone (gender, boolean) — index selectivity too low
- Too many indexes: each index slows INSERT/UPDATE/DELETE
- Index not used because: function applied to column in WHERE clause (
WHERE LOWER(email) =— use expression index instead)
EXPLAIN ANALYZE Interpretation
Flag these as expensive:
- Seq Scan on large table (>10k rows) — missing index
- Nested Loop with large outer table — may need hash join
- Sort on non-indexed column — add index or avoid ORDER BY
- High rows= estimate vs actual discrepancy — stale statistics, run ANALYZE
Zero-Downtime Migration Strategy
- Add column (nullable, no default): instant, no lock
- Backfill in batches:
UPDATE t SET col = val WHERE id BETWEEN x AND y(small batches) - Add constraint/index:
CREATE INDEX CONCURRENTLY(no lock, slower) - Swap: once backfill complete, add NOT NULL constraint if needed
- Remove old column: only after application code no longer references it
Never: ADD COLUMN with DEFAULT on large table (rewrites entire table in older Postgres versions)
pgvector for AI Workloads
CREATE EXTENSION vector;
CREATE TABLE embeddings (id BIGSERIAL PRIMARY KEY, content TEXT, embedding VECTOR(1536));
CREATE INDEX ON embeddings USING ivfflat (embedding vector_cosine_ops) WITH (lists = 100);
-- Similarity search
SELECT content, 1 - (embedding <=> query_embedding) AS similarity
FROM embeddings
ORDER BY embedding <=> query_embedding
LIMIT 10;listsparameter:sqrt(rows)for < 1M rows,rows/1000for > 1M rows- Use
HNSWindex for higher recall at query time (better than IVFFlat for most cases)
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.

