ai-persistence/build-custom-adapter

Installation
SKILL.md

Custom Chat Persistence

The deliverable is one file in the app — src/lib/chat-persistence.ts — exporting a ChatPersistence built from the database client the app already has. Plus whatever DDL that database needs, added through the app's existing migration flow.

Do not create a package, a second client, or a migration runner.

Route first. If the app already runs one of these, stop and use that skill — it has the driver-specific code:

App runs Use
Drizzle ORM (any dialect) ai-persistence/build-drizzle-adapter
Prisma ai-persistence/build-prisma-adapter
Cloudflare Workers + D1 ai-persistence/build-cloudflare-adapter
Installs
–
Repository
tanstack/ai
GitHub Stars
3.2K
First Seen
–