atelier-typescript-dynamodb-toolbox_skill

This skill helps you design and query DynamoDB single-table schemas with dynamodb-toolbox v2 in TypeScript, boosting type safety and performance.
  • JavaScript

4

GitHub Stars

1

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill martinffx/claude-code-atelier --skill atelier-typescript-dynamodb-toolbox

  • SKILL.md10.6 KB

Overview

This skill provides a TypeScript-focused atelier for designing single-table DynamoDB schemas using dynamodb-toolbox v2. It packages patterns for entity definitions, key design, GSIs, queries, pagination, transactions, and type-safe repository layers. The goal is predictable, high-performance data access with clear modeling and robust error handling.

How this skill works

You define a single Table and multiple typed Entity objects using dynamodb-toolbox v2 schemas that separate business attributes from computed keys. Keys (PK/SK/GSI) are computed via linked schema functions and validated with the schema API, enabling compile-time types for inputs and formatted reads. The skill includes repository patterns that build Put/Get/Delete/Query/Transaction commands, plus utilities for cursor pagination and error translation to domain errors.

When to use it

  • Building a microservice with known, stable access patterns that require sub-10ms reads and writes
  • Implementing single-table design where multiple entity types share one DynamoDB table and GSIs
  • Needing TypeScript type safety for entity input (writes) and formatted items (reads)
  • Designing predictable, index-driven queries, pagination, and transactional operations
  • Enforcing domain validation and converting DynamoDB condition failures into domain errors

Best practices

  • Document all access patterns first: create an ERD, entity chart, and required queries before coding
  • Compute PK/SK and GSI keys from business attributes using linked schema functions to keep reads/writes consistent
  • Plan GSI roles (collection, relationship, temporal sorting) and avoid ad-hoc indexes
  • Use conditional Put/Update for create/update semantics and map ConditionalCheckFailedException to domain errors
  • Encode pagination cursors as base64-encoded LastEvaluatedKey and decode them on subsequent queries
  • Write tests against DynamoDB Local, use unique IDs per test, and clean up fixtures after each run

Example use cases

  • Define User, Repository, Issue, Comment, and Star entities that share a single table and common GSIs
  • List repository issues with GSI queries and filter by status using beginsWith on the sort key
  • Implement paginated repo listings by owner with reverse chronological ordering using a GSI3 SK timestamp
  • Build a repository layer that enforces no-duplicate creates and converts DynamoDB errors to domain errors
  • Run multi-entity transactions for operations that must be atomic (e.g., create issue + increment counter)

FAQ

Avoid it for early-stage prototypes with changing access patterns, ad-hoc analytics, or when the team lacks DynamoDB experience.

How do I implement pagination safely?

Encode LastEvaluatedKey as a base64 token for clients, pass it back as exclusiveStartKey, and respect limit and reverse options for consistent ordering.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational