Skip to main content
skill CX Codex

nosql-database-design — Claude Code skill for MongoDB and DynamoDB

Guides the agent through NoSQL schema work: MongoDB collections, DynamoDB tables, embedding vs referencing, indexes. Useful before the schema hardens in code.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add aj-geddes/useful-ai-prompts --skill nosql-database-design -a claude-code
Open on GitHub

What nosql-database-design does

The skill covers data modeling for two systems: document-based MongoDB and key-value DynamoDB. It walks through when to embed data in a document and when to reference another, how to plan indexes, and where denormalization pays off versus where it makes every update harder.

Reference files live in the references/ directory: document structure design, indexing in MongoDB, schema validation, table structure, global secondary indexes (GSI), and DynamoDB item operations. The quick start shows a minimal users collection with an embedded address and an array of orders. The agent pulls in the relevant file when you ask it to design a collection or a table.

One thing to check before installing: the skill is scoped to MongoDB and DynamoDB. Advice about embedding and GSI does not carry over to PostgreSQL, Cassandra, or anything else, so it is the wrong tool if that is your stack.

What it helps with

  • design a MongoDB collection around the queries you actually run
  • decide whether to embed an address or keep it in a separate collection
  • pick indexes for the reads that happen most
  • plan a DynamoDB table with global secondary indexes
  • work out denormalization before the schema reaches production

Example prompts for the agent

  • Design a MongoDB collection for e-commerce orders and show the document shape
  • Help me choose between embedding and referencing for user profiles and addresses
  • Plan a DynamoDB table and GSI for queries by order status

How to install nosql-database-design

1Skills CLI (Vercel)

npx skills add aj-geddes/useful-ai-prompts --skill nosql-database-design -a claude-code

2Manually: put the files in place

~/.claude/skills/nosql-database-design/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/nosql-database-design/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about nosql-database-design

How do I install nosql-database-design in Claude?

Run npx skills add aj-geddes/useful-ai-prompts --skill nosql-database-design -a claude-code. The skill file then sits at ~/.claude/skills/nosql-database-design/SKILL.md.

What does nosql-database-design do?

It helps the agent design MongoDB and DynamoDB schemas: document structure, indexes, embedding versus referencing, and denormalization. It draws on reference files in the references/ directory.

Which databases does this skill cover?

MongoDB and DynamoDB. Its guidance on embedding and GSI does not apply to relational databases or other NoSQL systems.

Source text

SKILL.md · MIT
---
name: nosql-database-design
description: >
  Design NoSQL database schemas for MongoDB and DynamoDB. Use when modeling
  document structures, designing collections, or planning NoSQL data
  architectures.
---

# NoSQL Database Design

## Table of Contents

- [Overview](#overview)
- [When to Use](#when-to-use)
- [Quick Start](#quick-start)
- [Reference Guides](#reference-guides)
- [Best Practices](#best-practices)

## Overview

Design scalable NoSQL schemas for MongoDB (document) and DynamoDB (key-value). Covers data modeling patterns, denormalization strategies, and query optimization for NoSQL systems.

## When to Use

- MongoDB collection design
- DynamoDB table and index design
- Document structure modeling
- Embedding vs. referencing decisions
- Query pattern optimization
- NoSQL indexing strategies
- Data denormalization planning

## Quick Start

Minimal working example:

```javascript
// Single document with embedded arrays
db.createCollection("users");

db.users.insertOne({
  _id: ObjectId("..."),
  email: "[email protected]",
  name: "John Doe",
  createdAt: new Date(),

  // Embedded address
  address: {
    street: "123 Main St",
    city: "New York",
    state: "NY",
    zipCode: "10001",
  },

  // Embedded array of items
  orders: [
    {
      orderId: ObjectId("..."),
      date: new Date(),
      total: 149.99,
    },
    {
// ... (see reference guides for full implementation)
```

## Reference Guides

Detailed implementations in the `references/` directory:

| Guide | Contents |
|---|---|
| [Document Structure Design](references/document-structure-design.md) | Document Structure Design |
| [Indexing in MongoDB](references/indexing-in-mongodb.md) | Indexing in MongoDB |
| [Schema Validation](references/schema-validation.md) | Schema Validation |
| [Table Structure](references/table-structure.md) | Table Structure |
| [Global Secondary Indexes (GSI)](references/global-secondary-indexes-gsi.md) | Global Secondary Indexes (GSI) |
| [DynamoDB Item Operations](references/dynamodb-item-operations.md) | DynamoDB Item Operations |

## Best Practices

### ✅ DO

- Follow established patterns and conventions
- Write clean, maintainable code
- Add appropriate documentation
- Test thoroughly before deploying

### ❌ DON'T

- Skip testing or validation
- Ignore error handling
- Hard-code configuration values

© aj-geddes · MIT · aj-geddes/useful-ai-prompts

Similar skills

All skills for Data and databases →

From the same set118

database-performance-debugging A skill that walks your agent through finding slow SQL queries and reading their execution plans. Useful when the app drags or the database burns CPU. CX Codex +1 493installs code-documentation A skill that makes the agent write documentation inside your code: JSDoc, Python docstrings, JavaDoc, inline comments and API notes. Useful when functions and classes need describing, not rewriting. CX Codex +1 492installs reactive-programming A skill for reactive streams in RxJS: observables, operators, backpressure. Useful when a project leans on async data and events. CX Codex +1 491installs api-pagination A skill that tells the agent how to page through big collections: offset/limit, cursors, keyset. Useful when a user list or search result set outgrows one response. CX Codex +1 489installs database-indexing-strategy A skill for planning indexes: picks the type, builds composite and partial ones, covers maintenance. Useful when queries slow down. CX Codex +1 486installs uptime-monitoring A skill that walks your coding agent through uptime checks, a public status page and incident tracking. Useful when you need to know which dependency actually broke. CX Codex +1 484installs api-response-optimization A coding-agent skill that trims payloads, adds caching and compression, and gives you a checklist for slow API endpoints. CX Codex +1 484installs background-job-processing A skill for wiring up background job processing: task queues, workers, scheduling and retries. Useful when emails, reports or large exports should not block the request path. CX Codex +1 483installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor