cassini-workshop: Skill for Claude Code

.claude/skills/postgres-dba/SKILL.md

postgres-dba is a skill for Claude Code from opagani/cassini-workshop. It costs 162 tokens per session (1,799 once invoked), scanned A, a copy of postgres-dba, MIT.

A set of conventions for designing PostgreSQL databases, including tables, relationships, names, constraints, and SQL functions. PostgreSQL is a database system that stores structured application data.

In plain words
What is it for?
Use it when planning PostgreSQL schemas, choosing keys and relationships, writing migrations, deciding between relational columns and JSONB, or moving set-based logic into database functions.
Why use it?
It helps keep important data rules in the database instead of relying only on application code. Consistent choices make future database changes easier to understand and carry out safely.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

This is opagani/cassini-workshop's own configuration. It tells Claude Code how to work on cassini-workshop itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything cassini-workshop configures →

Reuse

Borrowing it

Nothing to install: this file belongs to opagani/cassini-workshop. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/opagani/cassini-workshop/main/.claude/skills/postgres-dba/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/opagani/cassini-workshop

Made for: Claude Code.

Wrote 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.

agentmods badge for postgres-dba

README.md
[![agentmods](https://agentmods.dev/badge/skills/opagani/cassini-workshop/postgres-dba/github.svg)](https://agentmods.dev/skills/opagani/cassini-workshop/postgres-dba)
Your own site
<a href="https://agentmods.dev/skills/opagani/cassini-workshop/postgres-dba"><img src="https://agentmods.dev/badge/skills/opagani/cassini-workshop/postgres-dba/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.

agentmods 80×15 button for postgres-dba

Your own site · 80×15
<a href="https://agentmods.dev/skills/opagani/cassini-workshop/postgres-dba"><img src="https://agentmods.dev/badge/skills/opagani/cassini-workshop/postgres-dba.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 162 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,799 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 100% copy Near-identical to another mod in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00162 $0.01799
Opus 5.5 $0.00065 $0.00720
Sonnet 5.5 $0.00032 $0.00360
Haiku 4.5 $0.00016 $0.00180

Measured 2mo ago against content hash 9e9995936871, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

postgres-dba 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 2mo 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.

Origin

This is a copy

100% identical to postgres-dba — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.claude/skills/postgres-dba/SKILL.md · 137 lines

How it starts

The opening of the file, as written. The whole thing — 137 lines — stays where its author put it; the contents beside it link to each section on GitHub.

PostgreSQL DBA — Opinionated Schema Design

The database is the system of record, not a dumb bucket behind an ORM. Model integrity in the schema, push set-based logic into functions, and let the application consume a clean, self-defending API. These conventions are defaults with teeth: deviating is allowed, but only deliberately and with a comment saying why.

🎯 Why: Design for Change

The goal of writing software is to be able to change it safely — and a schema is the hardest thing in any system to change. Consistent naming, surrogate keys, NOT NULL FKs, enums, and logic-in-functions exist so migrations stay mechanical: you add a column, you don't reshape the world. JSONB next to a relational spine lets the document side evolve without a migration. Every rule here optimizes for the next migration being boring.

This skill is about database design and SQL. For TypeScript/app-layer concerns use the language skills; this skill never defers integrity to the application.

How to use this skill

  1. Match the task to a rule below or in the decision guide.
  2. Open the matching references/*.md for the full rationale, the wrong way, the right way, and the explicit-override escape hatch.
  3. Copy the closest file from templates/ and adapt it — the templates already encode every convention here, so you start compliant.
  4. Apply the rule unless you can state, in a comment in the DDL, the specific reason it does not apply here. "It was easier" is not a reason.

The hard rules (non-negotiable defaults)

  1. Naming is snake_case, lowercase, unquoted, forever. Tables plural (orders), columns singular (shipped_at), no reserved words, no CamelCase, no quoted identifiers in the schema. If you ever need to double-quote an identifier in normal queries, the name is wrong. See references/naming.md.

  2. Every base table has id serial primary key. A synthetic key, always named id, is the row's identity. Natural keys get a UNIQUE constraint, never the primary key. Use bigserial/identity only when you have a concrete reason to expect >2.1B rows — and write that reason in a comment. See references/keys.md.

Read the full file on GitHub · 137 lines

Changes

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.

  1. 2mo ago First seen · 137 lines · 162 tokens per session scan A 9e9995936871

Subscribe to this mod's changes

postgres-dba is a skill published in the GitHub repository opagani/cassini-workshop (0 stars, last pushed 4mo ago), licensed MIT. It adds 162 tokens to every session and 1,799 once invoked, about $0.0006 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 100% identical to postgres-dba, differing in 0 lines, and is treated as a copy.

Related

Other skills, from other repositories

openclaw-database-toolkit

Database operations MCP server with 5 tools for D1, PostgreSQL, and MongoDB. Use when: (1) 'query my D1 database' or 'run this SQL', (2) 'insert these records' or 'add rows to table', (3) 'update records where X' or 'bulk update', (4) 'show me the table schema' or 'what columns exist', (5) 'migrate this schema' or…

yedanyagamiai-cmd/openclaw-mcp-servers · 128 tokens

migration-patterns

Schema migrations: ALTER patterns, engine changes, zero-downtime swaps, clickhouse-local offline migrations, lightweight UPDATE/DELETE strategies, and Postgres→ClickHouse migration planning (type mapping, schema pitfalls, PeerDB CDC, validation, schema introspection).

chmonitor/chmonitor · 56 tokens

setup

Set up memex with provisioned Postgres (RDS + pgvector), AGENTS.md injection, first import.

timurgaleev/memex · 25 tokens

sqlike

Check SQL with sqlike — deterministic static analysis (validity, anti-patterns, rewrites, index advice) and query-equivalence verification. Use whenever you write, edit, review, or rewrite a SQL query, or need to prove two queries return the same results. Requires the sqlike MCP server (@sqlike/mcp) or the sqlike CLI…

orifisher2/sqlike · 81 tokens

supabase

Manage Supabase local and hosted infrastructure. Migrations, schema diff, status, reset, push, and inspection. Wraps the Supabase CLI with project-specific context and gotcha avoidance.

Kastalien-Research/thoughtbox · 41 tokens

d1-and-supabase-migrations

Use when applying Cloudflare D1 migrations, fighting Supabase migration history vs SQL execution, choosing direct psql over CLI, designing idempotent migrations, debugging schema drift between local and remote, or recovering after a half-applied migration. Triggers: supabase migration repair instructions appearing…

curiositech/windags-skills · 143 tokens