dynamodb-guidelinelisted
Install: claude install-skill TeiNam/my_harness_for_claude_code
# DynamoDB Guideline
## When to Activate
- Designing DynamoDB table schemas
- Defining access patterns before modeling
- Selecting partition key / sort key / GSI
- Writing Query, GetItem, PutItem, UpdateItem expressions
- Troubleshooting hot partitions or slow scans
- Setting up boto3 / aioboto3 client
- Implementing TTL or DynamoDB Streams
## DynamoDB Defaults
- AWS SDK: `boto3` 4.x (sync) / `aioboto3` 12.x (async)
- Billing mode: `PAY_PER_REQUEST` (default for unpredictable traffic)
- Table class: `STANDARD`
- Encryption: AWS managed key (default)
## Naming Rules
- Tables: PascalCase (e.g. `ChatHistory`, `UserSetting`, `Content`)
- Single Table: service name singular (e.g. `MyApp`)
- Attribute (field): camelCase (e.g. `userId`, `createdAt`, `sk`)
- GSI: `GSI_{number}` or purpose-specific (e.g. `GSI_email`, `GSI_status_created`)
- LSI: `LSI_{number}` or purpose-specific
## Key Attribute Naming (Single Table Design)
| Attribute | Role | Example Value |
|-----------|------|---------------|
| `pk` | Partition Key | `USER#user123`, `CONTENT#abc` |
| `sk` | Sort Key | `PROFILE`, `MSG#2024-01-01T00:00:00Z` |
| `gsi1pk` | GSI 1 PK | `EMAIL#user@example.com` |
| `gsi1sk` | GSI 1 SK | `USER#user123` |
| `type` | Entity type identifier | `"user"`, `"message"`, `"content"` |
## Data Type Guide
| Use Case | DynamoDB Type | Notes |
|----------|--------------|-------|
| ID / String | `S` (String) | All IDs are String |
| Number | `N` (Number) | Both integers and decimals |
| Boole