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 shahtuyakov/claude-setup --skill database-patternsgit clone --depth 1 https://github.com/shahtuyakov/claude-setupWrote 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/shahtuyakov/claude-setup/database-patterns)<a href="https://agentmods.dev/skills/shahtuyakov/claude-setup/database-patterns"><img src="https://agentmods.dev/badge/skills/shahtuyakov/claude-setup/database-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/shahtuyakov/claude-setup/database-patterns"><img src="https://agentmods.dev/badge/skills/shahtuyakov/claude-setup/database-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.00049 | $0.01136 |
| Opus 5.5 | $0.00020 | $0.00454 |
| Sonnet 5.5 | $0.00010 | $0.00227 |
| Haiku 4.5 | $0.00005 | $0.00114 |
Grade A, and why
database-patterns 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 3mo 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 — 150 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Database Patterns
Modern database design and implementation patterns.
Database Selection
| Database | Best For | Use When |
|---|---|---|
| PostgreSQL | Relational data, complex queries | Structured data, ACID needed, analytics |
| MongoDB | Document-oriented, flexible schema | Rapid iteration, nested data, horizontal scale |
| SQLite | Embedded, local-first | Mobile apps, desktop apps, edge |
| Redis | Caching, sessions | High-speed reads, ephemeral data |
ORM Selection
| ORM | Best For | Trade-offs |
|---|---|---|
| Drizzle | Performance, serverless | SQL knowledge required |
| Prisma | Developer experience | Larger bundle, slower edge |
| TypeORM | NestJS, decorators | Legacy patterns |
| Kysely | Type-safe SQL builder | Lower-level |
Reference Files
| Topic | Load | Use When |
|---|---|---|
| Schema design | references/schema-design.md |
Designing tables, relationships |
| PostgreSQL | references/postgresql-patterns.md |
PostgreSQL-specific patterns |
| MongoDB | references/mongodb-patterns.md |
MongoDB-specific patterns |
| ORM patterns | references/orm-patterns.md |
Prisma, Drizzle usage |
| Migrations | references/migrations.md |
Schema versioning |
| Security | references/security.md |
SQL injection, encryption |
Quick Start Patterns
PostgreSQL Table
CREATE TABLE users (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
email VARCHAR(255) NOT NULL UNIQUE,
name VARCHAR(100) NOT NULL,
password_hash VARCHAR(255) NOT NULL,
email_verified_at TIMESTAMPTZ,
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
deleted_at TIMESTAMPTZ
);
CREATE INDEX users_email_idx ON users(email) WHERE deleted_at IS NULL;
Drizzle Schema
import { pgTable, uuid, varchar, timestamp } from 'drizzle-orm/pg-core';
export const users = pgTable('users', {
id: uuid('id').primaryKey().defaultRandom(),
email: varchar('email', { length: 255 }).notNull().unique(),
name: varchar('name', { length: 100 }).notNull(),
passwordHash: varchar('password_hash', { length: 255 }).notNull(),
emailVerifiedAt: timestamp('email_verified_at', { withTimezone: true }),
createdAt: timestamp('created_at', { withTimezone: true }).notNull().defaultNow(),
updatedAt: timestamp('updated_at', { withTimezone: true }).notNull().defaultNow(),
deletedAt: timestamp('deleted_at', { withTimezone: true }),
});
What ships with it
6 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 3mo ago First seen · 150 lines · 49 tokens per session scan A 7e91dbf2210d
database-patterns is a skill published in the GitHub repository shahtuyakov/claude-setup (13 stars, last pushed 11mo ago), licensed MIT. It adds 49 tokens to every session and 1,136 once invoked, about $0.0002 per session on Opus 5.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-08-30.
database-patterns compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| database-patternsshahtuyakov/claude-setup | Skill | 13 | 11mo ago | MIT | A | 49 | Claude Code, Codex |
| database-experttravisjneuman/.claude | Skill | 116 | yesterday | MIT | A | 36 | Claude Code |
| agent-database-experttravisjneuman/.claude | Skill | 116 | yesterday | MIT | A | 49 | Claude Code |
| database-migratorOneWave-AI/claude-skills | Skill | 456 | 1mo ago | MIT | A | 76 | Claude Code |
| database-schema-designerOneWave-AI/claude-skills | Skill | 456 | 1mo ago | MIT | A | 141 | Claude Code, Codex |
| software-database-designvasilyu1983/AI-Agents-public | Skill | 101 | 1mo ago | MIT | A | 43 | Claude Code, Codex |
| engineerNexaDuo/mARC | Skill | 7 | 5d ago | MIT | A | 30 | Claude Code |