database-design
Skill2 starsChanged 6 months agoMITView on GitHub
Schema design, migrations, indexing, and query patterns for maintainable and performant databases
42 other projects use a version of this.
Adopted by
Most recently taken up by
- vekzz-dev/opencode-skillstheir own version, first seen Oct 3, 2026
- hemapriyan-rk/claude-rigor-skillstheir own version, first seen Sep 26, 2026
- ZeroTokenClaw/agents-skillstheir own version, first seen Sep 21, 2026
- KbWen/agentic-ostheir own version, first seen Sep 10, 2026
- RealDougEubanks/ClaudeMarketplacetheir own version, first seen Sep 10, 2026
- VoDaiLocz/kilo-kit-mcptheir own version, first seen Aug 21, 2026
Used with
Projects with it also use intelligent-routing, i18n-localization and 9 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.
tiendatworkSkillintelligent-routing
Automatic agent selection and intelligent task routing. Analyzes user requests and automatically selects the best specialist agent(s) without requiring explicit user mentions.
Also in 3 projects that use this
xfstudioSkilli18n-localization
Internationalization and localization patterns. Detecting hardcoded strings, managing translations, locale files, RTL support.
Also in 5 projects that use this
xfstudioSkillbehavioral-modes
AI operational modes (brainstorm, implement, debug, review, teach, ship, orchestrate). Use to adapt behavior based on task type.
Also in 3 projects that use this
- +8 more from xfstudio
Other versions42 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 42
- CloudAI-X/claude-workflow-v2★ 1.4ksame name
- MoizIbnYousaf/ai-agent-skills★ 1.1ksame name
- KbWen/agentic-os★ 206same name
- thiientv/godmode★ 96same name
- KbWen/agent-virtual-office★ 35same name
- VoDaiLocz/kilo-kit-mcp★ 27same name
- krzysztofsurdy/code-virtuoso★ 22same name
- DauQuangThanh/hanoi-rainbow★ 17same name
- ishandutta2007/Awesome-Claude-Skills★ 15same name
- svngoku/coding-agents-skills★ 11same name
32 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 repository38 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- accessibility-engineeringSkill
- agent-orchestrationSkill
- ai-ml-engineeringSkill
- api-and-interface-designSkill
- architecture-designSkill
- backend-engineeringSkill
- ci-cd-and-automationSkill
- code-review-and-qualitySkill
- code-simplificationSkill
- context-engineeringSkill
- data-pipeline-engineeringSkill
- debugging-and-error-recoverySkill
- deployment-strategySkill
- documentation-and-adrsSkill
- doubt-driven-developmentSkill
- frontend-engineeringSkill
- git-workflow-and-versioningSkill
- idea-refineSkill
- incident-responseSkill
- incremental-implementationSkill
- infrastructure-as-codeSkill
- llm-evaluationSkill
- microservices-designSkill
- mobile-developmentSkill
- observability-and-monitoringSkill
- performance-optimizationSkill
- planning-and-task-breakdownSkill
- prompt-engineeringSkill
- rag-system-designSkill
- requirements-analysisSkill
- risk-assessmentSkill
- security-and-hardeningSkill
- source-driven-developmentSkill
- spec-driven-developmentSkill
- test-driven-developmentSkill
- using-agent-skillsSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
13 rules. 0 are common, 11 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 41 edited versions we read keep these.
11
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 14
Before designing a new table or collection
- Distinctive: line 15
Before writing a database migration
- Distinctive: line 16
When queries are slow and the cause is suspected to be the schema or indexes
- Distinctive: line 17
When designing a new service's data layer
- Distinctive: line 25
Start with a normalized design.
- Distinctive: line 28
Use UUIDs or ULIDs for globally unique IDs (not auto-increment integers for externally visible IDs)
- Distinctive: line 29
Never expose integer sequence IDs to users (enumeration attack)
- Distinctive: line 30
Ensure IDs are indexed
- Distinctive: line 33
Every migration must be backward compatible with the current code:
- Distinctive: line 38
Never drop a column in the same deploy that stops using it.
- Very specific: line 43
Run EXPLAIN on every hot query before deploying.
- Very specific: line 49
Every table should have: created_at, updated_at.
- Distinctive: line 52
Test every migration against a production-size dataset:
“Common” is measured: kept by at least 6 in 10 of the 41 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
Overview
Database schemas are among the hardest things to change in a production system. Migrations run during live traffic. Indexes affect every query. Schema choices made today constrain options for years. This skill gets them right from the start.
When to Use
- Before designing a new table or collection
- Before writing a database migration
- When queries are slow and the cause is suspected to be the schema or indexes
- When designing a new service's data layer
Process
Step 1: Design for the queries, not just the data
Understand the access patterns before normalizing. Which queries are in the critical path? What are the read/write ratios? This drives index and schema decisions.
Step 2: Normalize first, denormalize deliberately
Start with a normalized design. Denormalize only when profiling shows it's necessary, and document why.
Step 3: Choose IDs carefully
- Use UUIDs or ULIDs for globally unique IDs (not auto-increment integers for externally visible IDs)
- Never expose integer sequence IDs to users (enumeration attack)
- Ensure IDs are indexed
Step 4: Migrations - backward compatible first
Every migration must be backward compatible with the current code:
- Deploy migration (add new column, add new table)
- Deploy code that uses the new column
- Deploy cleanup migration (drop old column) - only after old code is gone
Never drop a column in the same deploy that stops using it.
Step 5: Index strategy
Index columns that appear in WHERE clauses, JOIN conditions, and ORDER BY of hot queries. Don't over-index - each index slows writes.
Run EXPLAIN on every hot query before deploying.
Step 6: Soft deletes vs hard deletes
For audit trails, compliance, or reference integrity: use soft deletes (deleted_at timestamp). For data that must be truly erased (GDPR): implement hard delete + audit log.
Step 7: Timestamps and audit columns
Every table should have: created_at, updated_at. Tables with audit requirements: created_by, updated_by.
Step 8: Test migrations
Test every migration against a production-size dataset:
- Does it run in an acceptable time window?
- Does it lock tables in ways that will cause timeouts?
- Can it be rolled back?
Verification Requirements
- Access patterns identified before schema designed
- Migrations are backward compatible
- Hot queries have
EXPLAINrun - Indexes added for WHERE/JOIN/ORDER BY columns
- Migration tested against production-size data
- Rollback for migration documented
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.

