Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add smicolon/ai-kit --skill db-patternsgit clone --depth 1 https://github.com/smicolon/ai-kitWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/smicolon/ai-kit/db-patterns)<a href="https://agentmods.dev/skills/smicolon/ai-kit/db-patterns"><img src="https://agentmods.dev/badge/skills/smicolon/ai-kit/db-patterns/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/smicolon/ai-kit/db-patterns"><img src="https://agentmods.dev/badge/skills/smicolon/ai-kit/db-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00044 | $0.01958 |
| Opus 5 | $0.00022 | $0.00979 |
| Sonnet 5 | $0.00009 | $0.00392 |
| Haiku 4.5 | $0.00004 | $0.00196 |
Grade A, and why
TanStack DB Patterns (Beta) scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 347 lines — stays where its author put it; the contents beside it link to each section on GitHub.
TanStack DB Patterns (Beta)
Beta Library: TanStack DB is in beta. APIs may change between versions.
TanStack DB provides a client-first reactive data store with optional sync to remote sources.
Core Concepts
- Collections: Named groups of documents (like tables)
- Documents: Individual records with unique IDs
- Queries: Reactive queries that update when data changes
- Transactions: Atomic operations across multiple documents
- Sync: Optional sync to remote backends
Basic Setup
// lib/db.ts
import { createDB, createCollection } from '@tanstack/db'
// Define document types
interface Post {
id: string
title: string
content: string
authorId: string
published: boolean
createdAt: number
updatedAt: number
}
interface User {
id: string
name: string
email: string
}
// Create database
export const db = createDB({
collections: {
posts: createCollection<Post>(),
users: createCollection<User>(),
},
})
CRUD Operations
Create
import { db } from '@/lib/db'
// Insert a single document
const newPost = await db.posts.insert({
id: crypto.randomUUID(),
title: 'My Post',
content: 'Post content...',
authorId: 'user-1',
published: false,
createdAt: Date.now(),
updatedAt: Date.now(),
})
// Insert multiple documents
await db.posts.insertMany([
{ id: '1', title: 'Post 1', ... },
{ id: '2', title: 'Post 2', ... },
])
Read
// Get by ID
const post = await db.posts.get('post-id')
// Query with filters
const publishedPosts = await db.posts.findMany({
where: { published: true },
orderBy: { createdAt: 'desc' },
limit: 10,
})
// Query with complex filters
const userPosts = await db.posts.findMany({
where: {
authorId: 'user-1',
published: true,
},
})
Update
// Update by ID
await db.posts.update('post-id', {
title: 'Updated Title',
updatedAt: Date.now(),
})
// Update with function
await db.posts.update('post-id', (post) => ({
...post,
viewCount: post.viewCount + 1,
updatedAt: Date.now(),
}))
// Update many
await db.posts.updateMany(
{ where: { authorId: 'user-1' } },
{ published: false }
)
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 5d ago First seen · 347 lines · 44 tokens per session scan A 9fc4d7f06357
TanStack DB Patterns (Beta) is a skill published in the GitHub repository smicolon/ai-kit (6 stars, last pushed 5d ago), licensed MIT. It adds 44 tokens to every session and 1,958 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
Other skills, from other repositories
ha-data-stores
Map of Hope Agent's local data stores and safe read-only query workflow. Use when the user asks where Hope Agent stores data, wants to inspect sessions/messages/memory/logs/background jobs/knowledge indexes/settings, asks the model to query local app data, or debugging requires checking persisted state. Trigger…
optimize
Analyze and suggest performance improvements for code, queries, or systems.
database-schema-changes
Guide for making database schema changes in Platypus using Drizzle ORM — editing the schema, pushing to a dev database, and generating the migration that ships.
mongo-migration
MongoDB schema migration safety reviewer and migration script generator. ALWAYS use when writing, reviewing, or planning MongoDB schema changes — field additions/removals, index builds, schema validator changes, document type migrations, shard key modifications, or any bulk update touching production collections.…
mysql-migration
MySQL schema migration safety reviewer and DDL generator. ALWAYS use when writing, reviewing, or planning MySQL schema changes — ALTER TABLE, CREATE/DROP INDEX, column type changes, charset conversions, data backfills, or any DDL touching production tables. Covers online DDL algorithm selection (INSTANT/INPLACE/COPY)…
oracle-migration
Oracle Database schema migration safety reviewer and DDL generator. ALWAYS use when writing, reviewing, or planning Oracle schema changes — ALTER TABLE, CREATE/DROP INDEX, column type changes, constraint additions, partition DDL, or any DDL touching production tables. Covers DDL auto-commit implications…