database-patterns

database-patterns is a skill for Claude Code from yonatangross/orchestkit. It costs 32 tokens per session (2,355 once invoked), scanned A, original, MIT.

A collection of patterns for designing databases and managing schema changes with Alembic, a Python database-migration tool. It covers SQL and NoSQL databases, versioning, schema drift, and migrations designed to avoid downtime.

In plain words
What is it for?
Use it when designing schemas, creating or reviewing migrations, choosing between database types, or planning changes that must keep a service available.
Why use it?
It helps prevent inconsistent database versions, unsafe schema changes, and migration problems across development and production.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions Claude Code.

Part of the ork plugin — 83 skills, 39 commands, 36 agents, 32 hooks shipped together

Good fit Use it when designing schemas, creating or reviewing migrations, choosing between database types, or planning changes that must keep a service available.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/yonatangross/orchestkit/database-patterns
Install

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.

Any agent
npx skills add yonatangross/orchestkit --skill database-patterns
Clone the repo
git clone --depth 1 https://github.com/yonatangross/orchestkit

Made for: Claude Code.

Or install ork, the plugin that ships this one along with the rest of its 83 skills, 39 commands, 36 agents, 32 hooks.

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 database-patterns

README.md
[![agentmods](https://agentmods.dev/badge/skills/yonatangross/orchestkit/database-patterns/github.svg)](https://agentmods.dev/skills/yonatangross/orchestkit/database-patterns)
Your own site
<a href="https://agentmods.dev/skills/yonatangross/orchestkit/database-patterns"><img src="https://agentmods.dev/badge/skills/yonatangross/orchestkit/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.

agentmods 80×15 button for database-patterns

Your own site · 80×15
<a href="https://agentmods.dev/skills/yonatangross/orchestkit/database-patterns"><img src="https://agentmods.dev/badge/skills/yonatangross/orchestkit/database-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 32 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,355 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found 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.00032 $0.02355
Opus 5.5 $0.00013 $0.00942
Sonnet 5.5 $0.00006 $0.00471
Haiku 4.5 $0.00003 $0.00235

Measured today against content hash d557561b8383, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/detect-model-changes.py, scripts/migration-template.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

plugins/ork/skills/database-patterns/SKILL.md · 205 lines

How it starts

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

Database Patterns

Comprehensive patterns for database migrations, schema design, and version management. Each category has individual rule files in rules/ loaded on-demand.

Quick Reference

Category Rules Impact When to Use
Alembic Migrations 2 CRITICAL Data migrations, branch management
Schema Design 3 HIGH Normalization, indexing strategies, NoSQL patterns
Versioning 2 HIGH Changelogs, schema drift detection
Zero-Downtime Migration 2 CRITICAL Expand-contract, pgroll, rollback monitoring

| Database Selection | 1 | HIGH | Choosing the right database, PostgreSQL vs MongoDB, cost analysis |

Total: 10 rules across 5 categories

This skill is a wrap around Alembic and PostgreSQL, not a replacement for their docs. Read references/ork-delta.md first: it holds the version floors, corrections and house conventions that upstream does not carry. Everything in the table below was removed on purpose.

Upstream coverage (do not restate)

These topics are vendor documentation. Fetch them from the source instead of re-teaching them here.

Topic First-party source
Alembic autogenerate, async env.py template, revision/upgrade/downgrade/history CLI https://alembic.sqlalchemy.org/en/latest/autogenerate.html (our one correction to the async template is in references/ork-delta.md)
Migration branches, merge revisions, tuple down_revision, branch labels https://alembic.sqlalchemy.org/en/latest/branches.html
Multi-database env.py, batched backfill recipes, migration hooks, environment-conditional migrations https://alembic.sqlalchemy.org/en/latest/cookbook.html
Rollback and data-integrity test harnesses references/migration-testing.md
JSONB operators, indexing and storage tradeoffs https://www.postgresql.org/docs/current/datatype-json.html (normal forms and the house denormalization call stay in rules/schema-normalization.md)
Full index-type reference and syntax (B-tree, GIN, partial, covering, CREATE INDEX CONCURRENTLY, REINDEX) https://www.postgresql.org/docs/current/sql-createindex.html (the house subset we actually apply stays in rules/schema-indexing.md)
lock_timeout, statement_timeout, advisory locks during migration https://www.postgresql.org/docs/current/runtime-config-client.html and rules/versioning-drift.md
Enum type changes https://www.postgresql.org/docs/current/datatype-enum.html
Table partitioning https://www.postgresql.org/docs/current/ddl-partitioning.html
Trigger functions https://www.postgresql.org/docs/current/plpgsql-trigger.html
Foreign-key cascade semantics https://www.postgresql.org/docs/current/ddl-constraints.html
Temporal and audit-trail tables, CDC change logs, stored-procedure and view versioning https://www.postgresql.org/docs/18/sql-createtable.html (read references/ork-delta.md before assuming these give row history)
HNSW and vector index tuning (m, ef_construction, hnsw.ef_search) https://github.com/pgvector/pgvector
Generic pre-deployment, backup and schema-review checklists https://alembic.sqlalchemy.org/en/latest/tutorial.html
Async SQLAlchemy sessions, FastAPI wiring, connection pool tuning ork:python-backend skill

Read the full file on GitHub · 205 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. today Changed d557561b8383
  2. 10d ago Changed fdbcadc54d6a
  3. 12d ago Changed 712cc07e7ae2
  4. 1mo ago Changed · -17 tokens per session 4c44f3a21996
  5. 1mo ago Changed · -1 lines 6cfe60c12198
  6. 2mo ago Changed e8cc0ad42802
  7. 2mo ago Changed · -5 lines 740c5671ab4e
  8. 2mo ago Changed · -1 lines e0cfa4fc60f3
  9. 2mo ago Changed 805e2fb9f768
  10. 2mo ago First seen · 212 lines · 49 tokens per session scan A c07cc92080c2

Subscribe to this mod's changes

database-patterns is a skill published in the GitHub repository yonatangross/orchestkit (315 stars, last pushed today), licensed MIT. It adds 32 tokens to every session and 2,355 once invoked, about $0.0001 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-09-03.

Related

database-patterns compared with skills from other repositories

database-patterns next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
database-patternsyonatangross/orchestkitSkill315todayMITA32Claude Code
azure-postgres-tsmicrosoft/skillsSkill3.3ktodayMITA94Claude Code
supabasemagnus919/agent-skillsSkill204todayMITA94Claude Code, Codex
multitenantTheBeardedBearSAS/claude-craftSkill10818d agoMITA46Claude Code
jdbc-persistenceAdamBien/airailsSkill76todayMITA127Claude Code
supabaseashish7802/awesome-api-skillsSkill1316d agoMITA0Claude Code, Codex
specsfy-specialist-supabasepromovaweb/specsfySkill94yesterdayAGPL-3.0A92Codex