database-schema-designer
Skill2 starsChanged 6 months agoApache-2.0View on GitHub
Designs normalized relational database schemas with proper constraints, indexes, and relationships. Use when modeling data for a new application or refactoring an existing schema.
17 other projects use a version of this.
Adopted by
Most recently taken up by
- JPeetz/agent-skillstheir own version, first seen Sep 29, 2026
- OneWave-AI/claude-skillstheir own version, first seen Sep 21, 2026
- SkotAlexsander/skillstheir own version, first seen Sep 16, 2026
- MortuisVMain/ai-agent-superpowerstheir own version, first seen Sep 15, 2026
- th-efool/SKILLStheir own version, first seen Aug 8, 2026
- Hassaan146/claude-skillstheir own version, first seen Jul 25, 2026
Used with
Projects with it also use skill-judge, agent-md-refactor 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.
bamechoSkillskill-judge
Evaluate Agent Skill design quality against official specifications and best practices. Use when reviewing, auditing, or improving SKILL.md files and skill packages. Provides multi-dimensional scoring and actionable improvement suggestions.
Also in 3 projects that use this
softaworksSkillagent-md-refactor
Refactor bloated AGENTS.md, CLAUDE.md, or similar agent instruction files to follow progressive disclosure principles. Splits monolithic files into organized, linked documentation.
Also in 3 projects that use this
JeffallanSkillrag-architect
Designs and implements production-grade RAG systems by chunking documents, generating embeddings, configuring vector stores, building hybrid search pipelines, applying reranking, and evaluating retrieval quality. Use when building RAG systems, vector databases, or knowledge-grounded AI applications requiring semantic search, document retrieval, context augmentation, similarity search, or embedding-based indexing.
Also in 3 projects that use this
alirezarezvaniSkilldependency-auditor
Check dependencies for known vulnerabilities using npm audit, pip-audit, etc. Use when package.json or requirements.txt changes, or before deployments. Alerts on vulnerable dependencies. Triggers on dependency file changes, deployment prep, security mentions.
Also in 3 projects that use this
rogue-dev-studioSkillbrowser-automation
Canonical browser automation and web UI verification: Playwright, agent browser CLIs, and CDP-based tooling in one playbook.
Also in 3 projects that use this
lookfreeSkillexcalidraw
Generate architecture diagrams as .excalidraw files from codebase analysis. Use when the user asks to create architecture diagrams, system diagrams, visualize codebase structure, or generate excalidraw files.
Also in 3 projects that use this
Other versions17 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 17
- softaworks/agent-toolkit★ 2.5ksame name
- OneWave-AI/claude-skills★ 321same name
- nahisaho/MUSUBI★ 77same name
- kumaran-is/claude-code-onboarding★ 36same name
- Hassaan146/claude-skills★ 18same name
- JPeetz/agent-skills★ 10same name
- csiddhant796-blip/claude-skills-collection★ 2same name
- Hussain-Elfalah/Agentic-Skills★ 2same name
- digitalspeed/claude-code-skillset★ 1same name
- mahiunfiltered/claude-code-skills★ 1same name
7 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 repository58 other files it gives its agents.
- agent-chain-designerSkill
- api-wrapper-builderSkill
- embeddings-builderSkill
- evaluation-harnessSkill
- fine-tuning-preparerSkill
- llm-router-builderSkill
- ml-model-trainerSkill
- model-benchmarkerSkill
- prompt-engineerSkill
- rag-pipeline-builderSkill
- synthetic-data-generatorSkill
- vector-db-integratorSkill
- csv-processorSkill
- data-pipeline-builderSkill
- etl-workflow-designerSkill
- json-transformerSkill
- pandas-data-cleanerSkill
- report-generatorSkill
- sql-query-optimizerSkill
- time-series-analyzerSkill
- visualization-generatorSkill
- backup-strategySkill
- ci-cd-optimizerSkill
- docker-compose-generatorSkill
- github-actions-pipelineSkill
- kubernetes-deploymentSkill
- load-balancer-configSkill
- log-aggregator-setupSkill
- monitoring-dashboardSkill
- nginx-config-generatorSkill
- security-hardeningSkill
- ssl-certificate-managerSkill
- terraform-module-builderSkill
- api-security-auditorSkill
- compliance-checkerSkill
- dependency-checkerSkill
- incident-responderSkill
- jwt-security-auditorSkill
- owasp-checkerSkill
- penetration-test-plannerSkill
- secret-detectorSkill
- threat-model-designerSkill
- vulnerability-scannerSkill
- accessibility-auditorSkill
- api-route-builderSkill
- auth-flow-builderSkill
- css-animation-crafterSkill
- form-validatorSkill
- graphql-schema-designerSkill
- html-component-builderSkill
- nextjs-app-scaffoldSkill
- performance-auditorSkill
- pwa-setupSkill
- react-component-generatorSkill
- responsive-layout-systemSkill
- seo-optimizerSkill
- tailwind-design-systemSkill
- websocket-integrationSkill
The file
We split this skill into the rules it gives an agent
3 rules. 0 are common, 2 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 11 edited versions we read keep these.
2
Distinctive
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 51
Check constraints for business rules (e.g., price > 0).
- Distinctive: line 52
Not null where appropriate.
- Distinctive: line 77
Polymorphic associations: Use a join table or separate tables per type instead of a single foreign key + type column when possible.
“Common” is measured: kept by at least 6 in 10 of the 11 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
Designs well-normalized relational database schemas (target 3NF with pragmatic denormalization where justified). Covers naming conventions, primary key strategies (UUID vs serial/bigserial), foreign keys with cascade options, index design, soft delete pattern, audit columns, and generation of ER diagrams from SQL.
When to Use This Skill
- Designing the data model for a new application or feature.
- Refactoring a messy or performance-problematic schema.
- The user provides business requirements or an existing schema to improve.
Prerequisites
- Understanding of the domain and entities/relationships.
- Chosen database (PostgreSQL strongly recommended for new projects; MySQL/SQLite also supported).
- Tool for ERD generation (dbdiagram.io, draw.io, or
schemaspy/pgadmin).
Steps
- Identify entities and relationships:
- List all nouns that need to be stored.
- Define relationships (one-to-many, many-to-many, one-to-one).
- Normalization:
- 1NF: atomic values, no repeating groups.
- 2NF: no partial dependency on composite PK.
- 3NF: no transitive dependencies.
- Note when to denormalize (read-heavy reporting tables, materialized views).
- Naming & conventions:
- Tables: plural snake_case (
users,order_items). - Columns: snake_case, consistent (
created_at,updated_at). - Primary keys:
id(bigserial or uuid). - Foreign keys:
user_id,order_id.
- Tables: plural snake_case (
- Keys & constraints:
- Primary key.
- Foreign keys with
ON DELETE/ON UPDATE(RESTRICT, CASCADE, SET NULL — choose deliberately). - Unique constraints.
- Check constraints for business rules (e.g.,
price > 0). - Not null where appropriate.
- Indexes:
- B-tree on foreign keys (almost always).
- Composite on common filter + sort combinations.
- Partial indexes for common subsets.
- GIN for JSONB, full-text, arrays when needed.
- Patterns:
- Soft delete (
deleted_at+is_deletedgenerated column or partial unique indexes). - Audit columns (
created_at,updated_at,created_by,updated_by). - JSONB for flexible attributes (with GIN index).
- Soft delete (
- Output:
- Complete
CREATE TABLEstatements (Postgres syntax, adaptable). - Index creation statements.
- ERD (Mermaid or dbdiagram.io syntax).
- Migration notes (how to apply without downtime).
- Complete
Examples
A complete e-commerce schema (users, products, orders, order_items, reviews, inventory) with proper normalization, indexes, soft deletes, audit columns, and a Mermaid ERD is included, plus a denormalized reporting table example with justification.
Edge Cases & Error Handling
- Polymorphic associations: Use a join table or separate tables per type instead of a single foreign key + type column when possible.
- High cardinality: Careful with indexes on very high-cardinality columns.
- Sharding / partitioning: Note when a table will need to be partitioned by date or tenant.
Verification
- All
CREATE TABLEstatements run cleanly on a fresh database. - Foreign key constraints prevent invalid data.
- Common queries have efficient plans (EXPLAIN shows index usage).
- ERD matches the SQL.
- Soft delete and audit columns are present where expected.
- Success: Schema is normalized, constraints protect data integrity, and common access patterns are fast.
References
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.

