Database do
.do Agent Skills — reusable, composable skill modules
npx -y skills add dot-do/skills --skill database-doAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Expert guidance for ai-database and database.do — AI-native data modeling, Payload CMS collections, Nouns/Things pattern, vector search, and workflow execution.
SKILL.md
2.1 KB, 521 tokens by cl100k_base, as published. Nobody here has run it
database.do
You are an expert in ai-database and database.do.
When to Use
Activate this skill when working with ai-database, DB(), Payload CMS collections, Nouns/Things data modeling, or the database.do service.
Low-Level CRUD
import { db } from 'ai-database'
const user = await db.findOne({ collection: 'users', where: { email: { equals: '[email protected]' } } })
const users = await db.find({ collection: 'users', limit: 20, sort: '-createdAt' })
const newRec = await db.create({ collection: 'users', data: { email: '[email protected]' } })
await db.update({ collection: 'users', id: newRec.id, data: { role: 'admin' } })
await db.delete({ collection: 'users', id: newRec.id })
const rec = await db.getOrCreate({ collection: 'products', where: { slug: 'widget' }, data: {...} })
Typed Models with DB()
import { DB } from 'ai-database'
import { z } from 'zod'
const Product = DB({
id: 'product',
schema: z.object({
name: z.string(),
slug: z.string(),
price: z.number(),
tags: z.array(z.string()),
}),
generate: 'generateProductListing', // AI auto-fill function
context: 'E-commerce product for a SaaS marketplace',
})
const products = await Product.find()
const product = await Product.create({ name: 'Widget Pro', price: 49 })
Database Configuration
DATABASE_URI=file:./data.db # SQLite (dev)
DATABASE_URI=libsql://db.turso.io # Turso serverless
DATABASE_URI=mongodb://... # MongoDB
DATABASE_URI=postgresql://... # PostgreSQL
Core Collections
nouns · things · functions · workflows · events · generations · models
Best Practices
- Use
DB()for domain models,dbfor cross-collection operations - Set
generateon Noun definitions to enable AI auto-fill - Use
getOrCreateover manual check-then-create for idempotency - Treat
eventsas an append-only audit log — never delete
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.
Gives 0 of the 12 instructions most databases sql skills give in 521 tokens
Counted across 589 of the 662 authors here whose files we hold, read 2026-08-07
- Use parameterized queriesin 37 of 589, across 34 files
- Use timestamptz for timestampsin 30 of 589, across 14 files
- Index foreign keysin 29 of 589, across 18 files
- Create indexes concurrentlyin 29 of 589, across 24 files
- Use numeric type for moneyin 25 of 589, across 8 files
- Use cursor pagination instead of offsetin 24 of 589, across 17 files
- Select only required columnsin 24 of 589, across 20 files
- Add indexes manually on foreign key columnsin 22 of 589, across 12 files
- Normalize to third normal formin 19 of 589, across 10 files
- Configure connection poolingin 19 of 589, across 17 files
- Put equality columns before range columns in indexesin 18 of 589, across 10 files
- Read individual rule files for detailed explanationsin 18 of 589, across 4 files
Said here and by no other author read
- use DB() for domain models
- use db for cross-collection operations
- set generate on Noun definitions
- use getOrCreate for idempotency
- treat events as an append-only audit log
Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.