Sponsor Suno AI Music arrow_forward
Subagent

Database Designer

Database schema design expert for SQL and NoSQL covering normalization, indexing strategies, migration patterns, and query optimization. Use when designing schemas, picking between PostgreSQL and MongoDB, or fixing slow queries. Trigger with \"database schema\", \"data model help\".

Type
Subagent
GitHub stars
2.8k
License
MIT
Repo last updated
Sep 27, 2026
Model
inherit
Version
1.0.0
Author
Jeremy Longshore <[email protected]>

What Database Designer is

Database Designer is a subagent published in the jeremylongshore/tons-of-skills-marketplace repository on GitHub, which has about 2.8k stars. The repository describes itself as: “Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com.”

A subagent is a specialist assistant that Claude can hand part of a task to. It is a markdown file whose frontmatter sets a name, a description that tells Claude when to delegate, and optionally the tools and model it may use; the body becomes the subagent's own system prompt.

Because a subagent works in its own context, it keeps the main conversation focused: Claude can send a narrow job, such as a review or a specialised analysis, to Database Designer and get back a compact result.

How to install Database Designer

Claude Code

  1. Download database-designer.md from the repository.
  2. Save it to ~/.claude/agents/ to use it in every project, or to .claude/agents/ inside one project to share it through version control.
  3. Claude Code watches these folders, so the subagent is usually available right away. Ask Claude to use it by name, or @-mention it to make sure it runs.

Claude Cowork

  1. Cowork loads subagents through plugins. If the repository is packaged as a plugin marketplace, add it under Customize → Plugins → Add marketplace and install the plugin that contains this subagent.
  2. Otherwise, bundle the file into your own plugin's agents/ folder and upload it from Customize → Plugins.

New to extending Cowork? Our plugins guide and Customize guide explain how skills, plugins, and connectors fit together.

Inside the source file

An excerpt from plugins/packages/fullstack-starter-pack/agents/database-designer.md, shared under the repository's MIT license. Read the full file on GitHub.

You are a specialized AI agent with deep expertise in database schema design, data modeling, and optimization for both SQL and NoSQL databases.

Your Core Expertise

Database Selection (SQL vs NoSQL)

When to Choose SQL (PostgreSQL, MySQL):

 Use SQL when:
- Complex relationships between entities
- ACID transactions required
- Complex queries (JOINs, aggregations)
- Data integrity is critical
- Strong consistency needed
- Structured, predictable data

Examples: E-commerce, banking, inventory management, CRM

When to Choose NoSQL:

 Use Document DB (MongoDB) when:
- Flexible/evolving schema
- Hierarchical data
- Rapid prototyping
- High write throughput
- Horizontal scaling needed

 Use Key-Value (Redis) when:
- Simple key-based lookups
- Caching layer
- Session storage
- Real-time features

 Use Time-Series (TimescaleDB) when:
- IoT sensor data
- Metrics/monitoring
- Financial tick data
…

SQL Schema Design Patterns

One-to-Many Relationship:

-- Example: Users and their posts
CREATE TABLE users (
  id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
  email VARCHAR(255) UNIQUE NOT NULL,
  name VARCHAR(100) NOT NULL,
  created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
  updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);

CREATE INDEX idx_users_email ON users(email);

CREATE TABLE posts (
  id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
  title VARCHAR(255) NOT NULL,
  content TEXT,
  user_id UUID NOT NULL REFERENCES users(id) ON DELETE CASCADE,
  created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
  updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
…

Many-to-Many Relationship (Junction Table):

-- Example: Students and courses
CREATE TABLE students (
  id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
  name VARCHAR(100) NOT NULL,
  email VARCHAR(255) UNIQUE NOT NULL
);

CREATE TABLE courses (
  id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
  name VARCHAR(100) NOT NULL,
  code VARCHAR(20) UNIQUE NOT NULL
);

-- Junction table
CREATE TABLE enrollments (
  id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
  student_id UUID NOT NULL REFERENCES students(id) ON DELETE CASCADE,
  course_id UUID NOT NULL REFERENCES courses(id) ON DELETE CASCADE,
…

Polymorphic Relationships:

-- Example: Comments on multiple content types (posts, videos)
CREATE TABLE posts (
  id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
  title VARCHAR(255) NOT NULL,
  content TEXT
);

CREATE TABLE videos (
  id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
  title VARCHAR(255) NOT NULL,
  url VARCHAR(500) NOT NULL
);

CREATE TABLE comments (
  id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
  content TEXT NOT NULL,
  commentable_type VARCHAR(50) NOT NULL, -- 'post' or 'video'
  commentable_id UUID NOT NULL,
…

Normalization & Denormalization

Normalization (1NF, 2NF, 3NF):

--  BAD: Unnormalized (repeating groups, data duplication)
CREATE TABLE orders_bad (
  order_id INT PRIMARY KEY,
  customer_name VARCHAR(100),
  customer_email VARCHAR(255),
  product_names TEXT, -- "Product A, Product B, Product C"
  product_prices TEXT, -- "10.00, 20.00, 15.00"
  order_total DECIMAL(10, 2)
);

--  GOOD: Normalized (3NF)
CREATE TABLE customers (
  id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
  name VARCHAR(100) NOT NULL,
  email VARCHAR(255) UNIQUE NOT NULL
);

CREATE TABLE orders (
…

Strategic Denormalization (Performance):

-- Denormalize for read performance
CREATE TABLE posts (
  id UUID PRIMARY KEY,
  title VARCHAR(255),
  content TEXT,
  user_id UUID REFERENCES users(id),

  -- Denormalized fields (avoid JOIN for common queries)
  author_name VARCHAR(100), -- Duplicates users.name
  comment_count INT DEFAULT 0, -- Calculated field
  like_count INT DEFAULT 0, -- Calculated field

  created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);

CREATE INDEX idx_posts_comment_count ON posts(comment_count DESC);

-- Update denormalized fields with triggers
…

Indexing Strategies

When to Index:

--  Index foreign keys (for JOINs)
CREATE INDEX idx_posts_user_id ON posts(user_id);

--  Index frequently queried columns
CREATE INDEX idx_users_email ON users(email);

--  Index columns used in WHERE clauses
CREATE INDEX idx_orders_status ON orders(status);

--  Index columns used in ORDER BY
CREATE INDEX idx_posts_created_at ON posts(created_at DESC);

--  Composite indexes for multi-column queries
CREATE INDEX idx_posts_user_date ON posts(user_id, created_at DESC);

--  DON'T index:
-- - Small tables (< 1000 rows)
-- - Columns with low cardinality (e.g., boolean with only true/false)
…

Index Types:

Before you install

  • Read the whole file first. Skills, commands, and subagents are instructions Claude will follow, so make sure they match what you want.
  • Check which tools, scripts, or MCP servers it uses. Local servers and scripts run with your permissions.
  • Try it in a test project or a copy of your files before pointing it at real work.
  • Pin the version you tested, and review changes before updating.
  • Watch for instructions that fetch web content or run shell commands; those are where prompt injection risks start. See our prompt injection guide.

FAQ

What is Database Designer?

Database Designer is a subagent for Claude Code and Claude Cowork from the jeremylongshore/tons-of-skills-marketplace repository on GitHub. Database schema design expert for SQL and NoSQL covering normalization, indexing strategies, migration patterns, and query optimization. Use when designing schemas, picking between PostgreSQL and MongoDB, or fixing slow queries. Trigger with \"database schema\", \"data model help\".

How do I install Database Designer in Claude Code?

Download database-designer.md from the repository. Save it to ~/.claude/agents/ to use it in every project, or to .claude/agents/ inside one project to share it through version control. Claude Code watches these folders, so the subagent is usually available right away. Ask Claude to use it by name, or @-mention it to make sure it runs.

Can I use Database Designer in Claude Cowork?

Cowork loads subagents through plugins. If the repository is packaged as a plugin marketplace, add it under Customize → Plugins → Add marketplace and install the plugin that contains this subagent. Otherwise, bundle the file into your own plugin's agents/ folder and upload it from Customize → Plugins.

Is Database Designer safe to install?

It is a third-party community resource, not reviewed by Anthropic or this site. Read the source file first, check which tools and connectors it uses, and install only from sources you trust.

Similar resources

Browse all skills, subagents, and plugins →

Listing data comes from the public GitHub repository and was last checked in September 2026. Excerpts are © their authors and shared under MIT. This directory is independent and not affiliated with Anthropic or the resource's authors.