
data-design
Data modeling, schema design, and data architecture
- version
- 1.0.0
- GitHub stars
- 26
Add marketplace
/plugin marketplace add miles990/claude-software-skillsRun it inside Claude Code once, then install the plugin below.
Install
/plugin install data-design@claude-software-skillsRun it inside Claude Code after adding the marketplace.
Files
Discovered from sourceData Design
Overview
Principles for designing data structures, schemas, and data flows that are efficient, maintainable, and scalable.
Data Modeling
Entity-Relationship Diagrams
┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│ User │ │ Order │ │ Product │
├─────────────┤ ├─────────────┤ ├─────────────┤
│ id (PK) │──┐ │ id (PK) │ ┌──│ id (PK) │
│ email │ │ │ user_id(FK) │←───┘ │ name │
│ name │ └───→│ status │ │ price │
│ created_at │ │ total │ │ stock │
└─────────────┘ │ created_at │ └─────────────┘
└─────────────┘ │
│ │
┌──────┴──────┐ │
↓ ↓ │
┌─────────────┐ │
│ OrderItem │ │
├─────────────┤ │
│ id (PK) │ │
│ order_id(FK)│ │
│ product_id │─────────────────────┘
│ quantity │
│ price │
└─────────────┘
Relationship Types
| Type | Description | Example |
|---|---|---|
| 1:1 | One to one | User ↔ Profile |
| 1:N | One to many | User → Orders |
| M:N | Many to many | Students ↔ Courses |
-- 1:1 (profile extends user)
CREATE TABLE users (
id SERIAL PRIMARY KEY,
email VARCHAR(255) UNIQUE
);
CREATE TABLE profiles (
user_id INTEGER PRIMARY KEY REFERENCES users(id),
bio TEXT,
avatar_url VARCHAR(255)
);
-- 1:N (user has many orders)
CREATE TABLE orders (
id SERIAL PRIMARY KEY,
user_id INTEGER REFERENCES users(id),
total DECIMAL(10,2)
);
-- M:N (students ↔ courses via junction table)
CREATE TABLE enrollments (
student_id INTEGER REFERENCES students(id),
course_id INTEGER REFERENCES courses(id),
enrolled_at TIMESTAMP DEFAULT NOW(),
PRIMARY KEY (student_id, course_id)
);
Normalization
Normal Forms
| Form | Rule | Example Violation |
|---|---|---|
| 1NF | Atomic values, no repeating groups | tags: "a,b,c" |
| 2NF | 1NF + no partial dependencies | Non-key depends on part of composite key |
| 3NF | 2NF + no transitive dependencies | zip → city in orders table |
| BCNF | Every determinant is a candidate key | Rare edge cases |
-- ❌ Violates 1NF (non-atomic)
CREATE TABLE products (
id SERIAL PRIMARY KEY,
name VARCHAR(255),
tags VARCHAR(255) -- "electronics,sale,featured"
);
-- ✅ 1NF compliant
CREATE TABLE products (
id SERIAL PRIMARY KEY,
name VARCHAR(255)
);
CREATE TABLE product_tags (
product_id INTEGER REFERENCES products(id),
tag VARCHAR(50),
PRIMARY KEY (product_id, tag)
);
-- ❌ Violates 3NF (transitive dependency)
CREATE TABLE orders (
id SERIAL PRIMARY KEY,
customer_zip VARCHAR(10),
customer_city VARCHAR(100) -- Depends on zip, not order
);
-- ✅ 3NF compliant
CREATE TABLE customers (
id SERIAL PRIMARY KEY,
zip VARCHAR(10),
city VARCHAR(100)
);
CREATE TABLE orders (
id SERIAL PRIMARY KEY,
customer_id INTEGER REFERENCES customers(id)
);
Denormalization
When to Denormalize
Normalize for:
✅ Write-heavy workloads
✅ Data integrity requirements
✅ Storage efficiency
✅ Flexibility in queries
Denormalize for:
✅ Read-heavy workloads
✅ Complex joins hurting performance
✅ Reporting/analytics
✅ Known access patterns
Denormalization Patterns
-- Computed columns
CREATE TABLE orders (
id SERIAL PRIMARY KEY,
items JSONB,
item_count INTEGER GENERATED ALWAYS AS (jsonb_array_length(items)) STORED,
total DECIMAL(10,2)
);
-- Duplicated data for read performance
CREATE TABLE posts (
id SERIAL PRIMARY KEY,
author_id INTEGER REFERENCES users(id),
author_name VARCHAR(100), -- Duplicated from users
author_avatar VARCHAR(255), -- Duplicated from users
content TEXT
);
-- Materialized view for complex queries
CREATE MATERIALIZED VIEW monthly_sales AS
SELECT
DATE_TRUNC('month', created_at) as month,
product_id,
SUM(quantity) as units_sold,
SUM(total) as revenue
FROM order_items
GROUP BY 1, 2;
-- Refresh periodically
REFRESH MATERIALIZED VIEW CONCURRENTLY monthly_sales;
Schema Design Patterns
Soft Deletes
CREATE TABLE users (
id SERIAL PRIMARY KEY,
email VARCHAR(255),
deleted_at TIMESTAMP NULL,
-- Partial unique index
CONSTRAINT unique_active_email UNIQUE (email) WHERE deleted_at IS NULL
);
-- Query active users only
SELECT * FROM users WHERE deleted_at IS NULL;
Audit Trail
CREATE TABLE audit_log (
id SERIAL PRIMARY KEY,
table_name VARCHAR(100),
record_id INTEGER,
action VARCHAR(10), -- INSERT, UPDATE, DELETE
old_data JSONB,
new_data JSONB,
changed_by INTEGER REFERENCES users(id),
changed_at TIMESTAMP DEFAULT NOW()
);
-- Trigger for automatic auditing
CREATE OR REPLACE FUNCTION audit_trigger()
RETURNS TRIGGER AS $$
BEGIN
INSERT INTO audit_log (table_name, record_id, action, old_data, new_data, changed_by)
VALUES (
TG_TABLE_NAME,
COALESCE(NEW.id, OLD.id),
TG_OP,
CASE WHEN TG_OP != 'INSERT' THEN to_jsonb(OLD) END,
CASE WHEN TG_OP != 'DELETE' THEN to_jsonb(NEW) END,
current_setting('app.user_id', true)::INTEGER
);
RETURN COALESCE(NEW, OLD);
END;
$$ LANGUAGE plpgsql;
Multi-Tenancy
-- Row-level security
CREATE TABLE organizations (
id SERIAL PRIMARY KEY,
name VARCHAR(255)
);
CREATE TABLE projects (
id SERIAL PRIMARY KEY,
org_id INTEGER REFERENCES organizations(id),
name VARCHAR(255)
);
-- Enable RLS
ALTER TABLE projects ENABLE ROW LEVEL SECURITY;
CREATE POLICY org_isolation ON projects
USING (org_id = current_setting('app.org_id')::INTEGER);
-- Set org context per request
SET app.org_id = 123;
SELECT * FROM projects; -- Only sees org 123's projects
Versioning / History
-- Version table pattern
CREATE TABLE documents (
id SERIAL PRIMARY KEY,
current_version_id INTEGER
);
CREATE TABLE document_versions (
id SERIAL PRIMARY KEY,
document_id INTEGER REFERENCES documents(id),
version INTEGER,
content TEXT,
created_at TIMESTAMP DEFAULT NOW(),
created_by INTEGER REFERENCES users(id),
UNIQUE (document_id, version)
);
-- Temporal tables (PostgreSQL)
CREATE TABLE products (
id SERIAL PRIMARY KEY,
name VARCHAR(255),
price DECIMAL(10,2),
valid_from TIMESTAMP DEFAULT NOW(),
valid_to TIMESTAMP DEFAULT 'infinity'
);
-- Query historical state
SELECT * FROM products
WHERE valid_from <= '2024-01-01' AND valid_to > '2024-01-01';
NoSQL Schema Design
Document Store (MongoDB)
// Embedded vs Referenced
// ✅ Embed when: data is accessed together, 1:few relationship
{
_id: ObjectId("..."),
title: "Blog Post",
author: {
name: "John",
email: "john@example.com"
},
comments: [
{ user: "Jane", text: "Great post!", date: ISODate("...") }
]
}
// ✅ Reference when: data is accessed independently, 1:many or M:N
{
_id: ObjectId("..."),
title: "Blog Post",
authorId: ObjectId("..."), // Reference to users collection
commentIds: [ObjectId("..."), ObjectId("...")]
}
// ❌ Anti-pattern: Unbounded arrays
{
_id: ObjectId("..."),
logs: [...] // Can grow to millions, hits 16MB limit
}
// ✅ Better: Bucket pattern
{
_id: ObjectId("..."),
sensorId: "sensor-123",
date: ISODate("2024-01-15"),
readings: [...] // Max ~1000 per document
}
Key-Value Store (Redis)
# Naming conventions
user:123 # User object
user:123:sessions # User's sessions (set)
user:123:orders # User's orders (list)
order:456 # Order object
orders:pending # Queue of pending orders (list)
products:category:electronics # Products in category (set)
# Expiration patterns
session:{token} # Expires after 30 min
rate_limit:ip:1.2.3.4 # Expires after 1 min
cache:api:/users/123 # Expires after 5 min
Data Pipeline Design
ETL vs ELT
ETL (Extract, Transform, Load):
Source → Transform (external) → Data Warehouse
Use: Traditional, when transformation is complex
ELT (Extract, Load, Transform):
Source → Data Lake/Warehouse → Transform (in-place)
Use: Modern, leverages warehouse compute power
Event Sourcing
// Events are the source of truth
interface Event {
id: string;
aggregateId: string;
type: string;
payload: unknown;
timestamp: Date;
version: number;
}
// Event store
class EventStore {
async append(aggregateId: string, events: Event[]) {
await db.events.insertMany(events);
}
async getEvents(aggregateId: string): Promise<Event[]> {
return db.events
.find({ aggregateId })
.sort({ version: 1 })
.toArray();
}
}
// Rebuild state from events
function rebuildAccount(events: Event[]): Account {
return events.reduce((account, event) => {
switch (event.type) {
case 'AccountOpened':
return { balance: 0, ...event.payload };
case 'MoneyDeposited':
return { ...account, balance: account.balance + event.payload.amount };
case 'MoneyWithdrawn':
return { ...account, balance: account.balance - event.payload.amount };
default:
return account;
}
}, {} as Account);
}
Data Governance
Data Quality Dimensions
| Dimension | Description | Example Check |
|---|---|---|
| Accuracy | Correct values | Email format validation |
| Completeness | No missing data | Required fields present |
| Consistency | Same across systems | User ID matches in all tables |
| Timeliness | Up to date | Last updated within 24h |
| Uniqueness | No duplicates | Unique email per user |
Schema Evolution
-- Safe migrations
-- ✅ Adding nullable column
ALTER TABLE users ADD COLUMN phone VARCHAR(20) NULL;
-- ✅ Adding column with default
ALTER TABLE users ADD COLUMN status VARCHAR(20) DEFAULT 'active';
-- ⚠️ Making column non-null (multi-step)
-- Step 1: Add with default
ALTER TABLE users ADD COLUMN verified BOOLEAN DEFAULT false;
-- Step 2: Backfill data
UPDATE users SET verified = true WHERE email_verified_at IS NOT NULL;
-- Step 3: Add constraint
ALTER TABLE users ALTER COLUMN verified SET NOT NULL;
-- ❌ Dangerous: Renaming column
-- Instead: Add new, migrate data, remove old (over multiple deploys)
Related Skills
- [[database]] - Database implementation
- [[architecture-patterns]] - Data architecture patterns
- [[api-design]] - Data in APIs
From the miles990/claude-software-skills README
Claude Software Skills
55 modular software development skills for Claude Code - from architecture to deployment
┌─────────────────────────────────────────────────────────────────┐
│ Claude Software Skills │
│ │
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
│ │ Software │ │ Software │ │ Development │ │
│ │ Design │ │ Engineering │ │ Stacks │ │
│ │ 6 │ │ 8 │ │ 8 │ │
│ └──────────────┘ └──────────────┘ └──────────────┘ │
│ │
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
│ │ Tools & │ │ Domain │ │ Programming │ │
│ │ Integrations │ │ Applications │ │ Languages │ │
│ │ 9 │ │ 12 │ │ 12 │ │
│ └──────────────┘ └──────────────┘ └──────────────┘ │
│ │
│ AI 自動識別任務 → 載入對應領域知識 │
└─────────────────────────────────────────────────────────────────┘
Features
- MCP Compatible - Works with Claude Code, Cursor, and other MCP clients
- Semantic Search - Claude automatically finds relevant skills for your task
- Cross-Domain Integration - Skills work together seamlessly
- Best Practices Built-In - Each skill includes patterns and anti-patterns
- Modular Architecture - Use only what you need
- Sharp Edges - Proactive warnings about common pitfalls with detection patterns
- Validations - Executable code quality rules with regex/ast patterns
- Collaboration - Skills declare relationships for smart delegation and context passing
Installation
Plugin Marketplace (Recommended)
# 1. Add marketplace (GitHub format: owner/repo)
/plugin marketplace add miles990/claude-software-skills
# 2. Open plugin management interface, view available plugins in Discover tab
/plugin
# 3. Install specific skills (choose what you need)
/plugin install frontend@claude-software-skills
/plugin install backend@claude-software-skills
/plugin install api-design@claude-software-skills
# Or mention skill name in conversation, Claude will auto-load
Supported GitHub formats:
# Short format (recommended)
/plugin marketplace add miles990/claude-software-skills
# HTTPS URL
/plugin marketplace add https://github.com/miles990/claude-software-skills.git
# Specify branch or tag
/plugin marketplace add miles990/claude-software-skills#main
Plugin commands:
| Command | Description |
|---|---|
/plugin | Open interactive plugin management interface |
/plugin install <name>@<marketplace> | Install specific plugin |
/plugin disable <name>@<marketplace> | Temporarily disable plugin |
/plugin uninstall <name>@<marketplace> | Completely remove plugin |
Available Skills
Software Design (6 skills)
| Skill | Description |
|---|---|
architecture-patterns | Software architecture patterns and best practices |
design-patterns | Classic and modern software design patterns |
api-design | RESTful, GraphQL, gRPC, and API best practices |
system-design | Scalability, availability, and distributed systems design |
data-design | Data modeling, schema design, and data architecture |
ux-principles | User experience design principles for developers |
Software Engineering (8 skills)
| Skill | Description |
|---|---|
code-quality | Clean code principles, SOLID, and code review practices |
testing-strategies | Unit, integration, E2E testing and TDD practices |
devops-cicd | CI/CD pipelines, infrastructure as code, and deployment |
performance-optimization | Profiling, optimization techniques, and best practices |
security-practices | OWASP Top 10, authentication, and secure coding |
reliability-engineering | SRE principles, observability, and incident management |
documentation | Technical writing, API docs, and documentation best practices |
internationalization | i18n/l10n architecture design and multi-language support |
Development Stacks (8 skills)
| Skill | Description |
|---|---|
frontend | Modern frontend with React, Vue, and web technologies |
backend | Backend with Node.js, Express, NestJS, and server patterns |
mobile | Mobile with React Native, Flutter, and native patterns |
database | Database design, SQL, NoSQL, and data management |
cloud-platforms | AWS, GCP, Azure services and cloud-native development |
ai-ml-integration | AI/ML APIs, LLM integration, and intelligent apps |
realtime-systems | WebSocket, real-time communication, event-driven |
edge-iot | Edge computing, IoT protocols, and embedded systems |
Tools & Integrations (9 skills)
| Skill | Description |
|---|---|
git-workflows | Git version control, branching, and collaboration |
project-management | Agile, Scrum, Kanban, and issue tracking |
development-environment | IDE setup, dev containers, and local development |
monitoring-logging | Application monitoring, logging, and alerting |
api-tools | API testing, documentation, and development tools |
automation-scripts | Build automation, task runners, and scripting |
auto-dev-setup | Auto-Dev workflow for Human-in-the-Loop automation |
claude-code-plugin | Claude Code Plugin development and marketplace management |
claude-code-sdk | Claude Code SDK for AI-powered applications |
Domain Applications (12 skills)
| Skill | Description |
|---|---|
application-patterns | Common application development patterns |
e-commerce | E-commerce platforms, payments, shopping cart |
saas-platforms | SaaS architecture, multi-tenancy, subscriptions |
content-platforms | CMS, blogging platforms, content management |
communication-systems | Email, notifications, messaging systems |
developer-tools | CLI tools, SDKs, developer experience |
game-development | Game development patterns and architectures |
flame | Flame Engine 2D game development for Flutter |
flame-core | Flame Engine core - components, input, collision |
flame-systems | Flame Engine 14 game systems |
flame-templates | Game templates - RPG, Platformer, Roguelike |
desktop-apps | Desktop apps with Electron and Tauri |
Programming Languages (12 skills)
| Skill | Description |
|---|---|
javascript-typescript | Modern JavaScript and TypeScript patterns |
python | Python programming patterns and best practices |
go | Go programming patterns and idioms |
rust | Rust patterns and ownership concepts |
java-kotlin | Java and Kotlin programming patterns |
csharp-dotnet | C# and .NET development patterns |
cpp | Modern C++ programming patterns and idioms |
ruby | Ruby programming patterns and idioms |
php | Modern PHP programming patterns |
swift | Swift patterns for iOS and macOS |
shell-bash | Shell scripting and Bash programming |
sql | SQL patterns for database querying and design |
Other Installation Methods
Clone to Skills Directory
# Clone to your skills directory
git clone https://github.com/miles990/claude-software-skills.git ~/.claude/skills/software-skills
Claude will automatically discover and use the skills when relevant to your tasks.
With MCP Server
This repository is compatible with claude-skills-mcp:
# Install the MCP server
pip install claude-skills-mcp
# Add this repository as a skill source
# The server will load skills from ~/.claude/skills/
Cursor IDE
Add to your Cursor MCP settings:
{
"mcpServers": {
"software-skills": {
"command": "npx",
"args": ["-y", "claude-skills-mcp"],
"env": {
"SKILLS_PATH": "/path/to/claude-software-skills"
}
}
}
}
Manual Reference
Simply clone and reference the SKILL.md files in your prompts:
git clone https://github.com/miles990/claude-software-skills.git
Auto-Dev: Automated Development Workflow
One-click setup for GitHub Actions automated development workflow, let Claude help you complete development tasks.
Quick Setup
Using API Key:
curl -fsSL https://raw.githubusercontent.com/miles990/claude-software-skills/main/scripts/setup-auto-dev-apikey.sh | bash
Using Claude Max (OAuth):
curl -fsSL https://raw.githubusercontent.com/miles990/claude-software-skills/main/scripts/setup-auto-dev-max.sh | bash
Post-Installation Setup
| Version | Setup Method |
|---|---|
| API Key | Get Key from console.anthropic.com, set in GitHub Secrets ANTHROPIC_API_KEY |
| Claude Max | Run claude /install-github-app for auto OAuth Token setup |
Usage
- Issue Trigger: Create Issue → Add
auto-devlabel - Comment Trigger: Comment
@claude [instruction]on any Issue/PR
Detailed docs: AUTO-DEV.md
Usage Examples
User: Help me design a microservices architecture for an e-commerce platform
Claude: [Automatically uses architecture-patterns + e-commerce + api-design skills]
User: Review this Python code for performance issues
Claude: [Automatically uses python + performance-optimization + code-quality skills]
User: Set up CI/CD for a React + Node.js monorepo
Claude: [Automatically uses devops-cicd + frontend + backend + git-workflows skills]
Directory Structure
claude-software-skills/
├── .claude-plugin/ # Plugin configuration
│ └── marketplace.json # Lists all 55 skills as individual plugins
├── .github/
│ └── workflows/ # CI/CD automation
├── software-design/ # Architecture & design skills
├── software-engineering/ # Development practices
├── development-stacks/ # Tech stack skills
├── tools-integrations/ # Developer tools
├── domain-applications/ # Domain-specific patterns
├── programming-languages/ # Language-specific skills
├── docs/
│ ├── SKILL-TEMPLATE.md # Template for new skills
│ └── software-skills.md
├── CONTRIBUTING.md
├── LICENSE
└── README.md
How It Works
Each skill module contains a SKILL.md file with:
- Metadata - Name, description, tags for semantic search
- Key Concepts - Core knowledge and terminology
- Best Practices - Recommended approaches with examples
- Common Pitfalls - What to avoid and why
- Patterns & Anti-patterns - Do's and don'ts with code
- Tools & Resources - Recommended tools and references
- Decision Guide - When to use this skill
When you describe a task, Claude:
- Searches for relevant skills using semantic matching
- Loads the appropriate SKILL.md files
- Applies the knowledge to your specific context
- Follows best practices while avoiding common pitfalls
Contributing
We welcome contributions! Please see CONTRIBUTING.md for guidelines.
Adding a New Skill
- Create a directory under the appropriate category
- Add a
SKILL.mdfollowing our template - Include practical examples and best practices
- Submit a pull request
License
MIT License - See LICENSE for details.
Related Projects
- claude-domain-skills - Non-technical domain skills
- claude-skills-mcp - MCP server for skill discovery
Built for developers, by developers, with Claude
Details
- Marketplace
- miles990/claude-software-skills
- Source
- software-design/data-design
- Category
- Community
- Listed since
- Apr 6, 2026
More from miles990/claude-software-skills
All 56- databasev1.0.0
- design-patternsv1.0.0
- desktop-appsv1.0.0
- developer-toolsv1.0.0
- development-environmentv1.0.0
- devops-cicdv1.0.0
- documentationv1.0.0
- e-commercev1.0.0
- edge-iotv1.0.0
- flamev1.0.0
- flame-corev1.0.0
- flame-systemsv1.0.0
- flame-templatesv1.0.0
- frontendv1.0.0
- game-developmentv1.0.0
- git-workflowsv1.0.0
- gov1.0.0
- internationalizationv1.0.0
- java-kotlinv1.0.0
- javascript-typescriptv1.0.0
- mobilev1.0.0
- monitoring-loggingv1.0.0
- performance-optimizationv1.0.0
- phpv1.0.0
Similar to data-design
More Databases
databasemiles990/claude-software-skills26 starsDatabase design, SQL, NoSQL, and data management patterns
database-designwshobson/agents42.8K starsDatabase architecture, schema design, and SQL optimization for production systems
system-designmiles990/claude-software-skills26 starsScalability, availability, and distributed systems design
domain-driven-designmelodic-software/claude-code-plugins32 starsDomain-driven-design practice skills. Today it owns a consuming project's ubiquitous-language glossary: finds and reads it for other skills, seeds a first one f
architecture-designjmanhype/claude-code-plugin-marketplace29 starsSystem architecture agents, design patterns, and architectural decision support