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 agentmods add skills/casemark/casedotdev-starter-app/databasenpx skills add CaseMark/casedotdev-starter-app --skill databasegit clone --depth 1 https://github.com/CaseMark/casedotdev-starter-appWrote 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/casemark/casedotdev-starter-app/database)<a href="https://agentmods.dev/skills/casemark/casedotdev-starter-app/database"><img src="https://agentmods.dev/badge/skills/casemark/casedotdev-starter-app/database.svg" alt="Measured on agentmods" 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 | $0.00000 | $0.02587 |
| Opus 5 | $0.00000 | $0.01293 |
| Sonnet 5 | $0.00000 | $0.00517 |
| Haiku 4.5 | $0.00000 | $0.00259 |
Grade A, and why
database 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 4d 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 — 481 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Database Skill
Purpose
This skill covers database integration using Neon PostgreSQL and Drizzle ORM in the create-legal-app starter kit.
Key Concepts
- Neon: Serverless PostgreSQL database
- Drizzle ORM: TypeScript-first ORM
- Migrations: Version-controlled schema changes
- Type Safety: Fully typed database queries
Setup
Installation
bun add drizzle-orm @neondatabase/serverless
bun add -D drizzle-kit
Environment Variables
# .env.local
DATABASE_URL=postgresql://user:password@host/database?sslmode=require
Project Structure
/
├── lib/
│ ├── db/
│ │ ├── index.ts # Database client
│ │ ├── schema.ts # Database schema
│ │ └── migrations/ # Migration files
│ └── ...
├── drizzle.config.ts # Drizzle configuration
└── package.json
Configuration
Drizzle Config
// drizzle.config.ts
import type { Config } from 'drizzle-kit';
export default {
schema: './lib/db/schema.ts',
out: './lib/db/migrations',
dialect: 'postgresql',
dbCredentials: {
url: process.env.DATABASE_URL!,
},
} satisfies Config;
Database Client
// lib/db/index.ts
import { drizzle } from 'drizzle-orm/neon-http';
import { neon } from '@neondatabase/serverless';
import * as schema from './schema';
const sql = neon(process.env.DATABASE_URL!);
export const db = drizzle(sql, { schema });
Schema Definition
Naming convention: use camelCase property names mapped to snake_case DB columns. Example: createdAt: timestamp("created_at").
For Better Auth tables specifically, always copy the templates from lib/auth/templates/ and keep the property names camelCase.
Basic Table
// lib/db/schema.ts
import { pgTable, text, timestamp, uuid } from 'drizzle-orm/pg-core';
export const cases = pgTable('cases', {
id: uuid('id').defaultRandom().primaryKey(),
title: text('title').notNull(),
description: text('description'),
status: text('status').notNull().default('pending'),
createdAt: timestamp('created_at').defaultNow().notNull(),
updatedAt: timestamp('updated_at').defaultNow().notNull(),
});
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.
- 4d ago First seen · 481 lines · 0 tokens per session scan A d3f8af9a67c2
database is a skill published in the GitHub repository CaseMark/casedotdev-starter-app (2 stars, last pushed 2mo ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 2,587 tokens. 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-31.
Other skills, from other repositories
safe-sql-execution
Use whenever code will build, return, fetch, or execute SQL that runs against a user's real Postgres database — even when the request reads like an ordinary feature or bug fix and never says "security," "injection," or "SafeSqlFragment." This covers: writing or editing any pg-meta function, query builder, or endpoint…
studio-e2e-tests
Write and run Playwright E2E tests for Supabase Studio (e2e/studio). Use when asked to run e2e tests, write new E2E tests, or debug flaky or failing Playwright tests. Covers running commands, avoiding race conditions, waiting strategies, selectors, helper functions, and CI vs local differences.
studio-queries
React Query conventions for data fetching in Supabase Studio. Use when writing or reviewing query hooks, mutation hooks, or query keys in apps/studio/data/ — including adding the first fetch or mutation for a new API endpoint or resource. Covers queryOptions pattern, keys.ts structure, mutation hook template, and…
upgrading-chart
Upgrades Helm chart dependencies (PostgreSQL, Vault) in the Chainloop project, including vendorized charts, container images, and CI/CD workflows. Use when the user mentions upgrading Helm charts, Bitnami dependencies, PostgreSQL chart, or Vault chart. CRITICAL - Major version upgrades are FORBIDDEN and must be…
payload-cms
Install and wire Payload CMS into this Next.js 16 app, backed by Supabase Postgres and Supabase Storage — packages, payload.config.ts, the (payload) route group, collections derived from the actual page views, type generation, migrations, and proving the read loop end-to-end. Use when the user asks to "add a CMS"…
dump-schema
Dump clean Postgres schema to a file and copy path to clipboard.