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.
npx skills add aj-geddes/useful-ai-prompts --skill nosql-database-design -a claude-codeWhat 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-code2Manually: put the files in place
~/.claude/skills/nosql-database-design/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/nosql-database-design/
1Skills CLI (Vercel)
npx skills add aj-geddes/useful-ai-prompts --skill nosql-database-design -a codex2Manually: put the files in place
.agents/skills/nosql-database-design/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add aj-geddes/useful-ai-prompts --skill nosql-database-design -a cursor2Manually: put the files in place
.cursor/skills/nosql-database-design/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install aj-geddes/useful-ai-prompts nosql-database-design2Manually: put the files in place
.github/skills/nosql-database-design/SKILL.md1Skills CLI (Vercel)
npx skills add aj-geddes/useful-ai-prompts --skill nosql-database-design -a gemini-cli2Platform CLI
gemini skills install https://github.com/aj-geddes/useful-ai-prompts --path skills/nosql-database-designManually: put the files in place
.devin/skills/nosql-database-design/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add aj-geddes/useful-ai-prompts --skill nosql-database-design -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
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