database-schema

database-schema is a skill for Claude Code from Ozzeron/prompt-pack. It costs 92 tokens per session (2,097 once invoked), scanned A, original, MIT.

A guide for designing how an application stores data in tables or document collections. It covers fields, relationships, names, indexes, deletion records, and separating data between customers.

In plain words
What is it for?
Use it when adding tables or collections, reshaping existing relationships, or designing the data layer before an API.
Why use it?
It helps avoid confusing data structures and costly redesigns as the application grows. It also keeps schema design separate from query tuning and migration work.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: built for openclaw.

Part of the backend plugin — 13 skills shipped together , and of supabase, fullstack, all-skills

Good fit Use it when adding tables or collections, reshaping existing relationships, or designing the data layer before an API.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ozzeron/prompt-pack/database-schema
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 Ozzeron/prompt-pack --skill database-schema
Clone the repo
git clone --depth 1 https://github.com/Ozzeron/prompt-pack

Made for: Claude Code.

Or install backend, the plugin that ships this one along with the rest of its 13 skills.

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-schema

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/ozzeron/prompt-pack/database-schema"><img src="https://agentmods.dev/badge/skills/ozzeron/prompt-pack/database-schema.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 92 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,097 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.00092 $0.02097
Opus 5.5 $0.00037 $0.00839
Sonnet 5.5 $0.00018 $0.00419
Haiku 4.5 $0.00009 $0.00210

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

Security

Grade A, and why

database-schema 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 1mo 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.

prompts/architecture/database-schema/SKILL.md · 195 lines

How it starts

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

Database Schema Designer

You design or extend a database schema for a feature or product. The goal is a schema that's correct now and bendable later — not perfect upfront, not impossible to evolve. You favour fewer surprises over theoretical purity.

When to use

  • New tables / collections for a feature
  • Restructuring existing data (one-to-many → many-to-many, splitting a god-table)
  • Designing the data layer before writing the API

Do not invoke for query optimisation (use review/database-review) or migration mechanics (use architecture/database-migrations).

Scope

In scope:

  • Tables / collections, columns, types, constraints
  • Primary keys, foreign keys, indexes
  • Soft-delete and audit-column decisions
  • Enums vs lookup tables vs check constraints
  • Multi-tenant / scoping decisions
  • Naming conventions

Out of scope:

  • Migration mechanics — see database-migrations
  • Query patterns and indexing for known queries — see database-review
  • Cache and eventual-consistency strategies — separate concern

Inherits

  • meta/engineering-principles — naming, single responsibility, modern standards apply to schemas too.
  • meta/reuse-before-create — before adding a new table, enum, or join table, look for an existing entity that already covers the shape or that should be extended instead.
  • meta/token-discipline — read existing migrations and one or two adjacent schemas, not the whole history.

Token discipline (specific)

  • Read the project's existing migrations directory only the most recent 5–10 files to learn naming and style.
  • Read 1–2 nearby table definitions to match conventions.
  • Skip seed data, test fixtures, and ORM-generated boilerplate.

Process

  1. Clarify the domain. What entities exist? What are the relationships? What are the read patterns vs write patterns?
  2. Inspect 2–3 canonical examples in this schema before designing. Read:
    • one nearby table in the same domain (column types, naming, FK style)
    • one recent migration that touched a similar shape (how additions are normally rolled out)
    • the project's id strategy (uuid v4 / v7 / bigint serial / nanoid) and timestamp convention (created_at / inserted_at, with or without updated_at, timezone handling) Note conventions for: primary key type, soft-delete column name (or absence), audit columns, enum-vs-lookup-table style, JSON/JSONB usage, naming case (snake vs camel). Match them. If the project has multiple competing styles, pick the most recent and call out the inconsistency in the handoff.
  3. Pick the lowest-friction shape that handles current + obvious-near-future needs. Don't model imagined requirements.
  4. Decide soft-delete. Default to hard delete + audit log, switch to soft-delete when the domain genuinely needs reversibility (medical records, legal documents).
  5. Place indexes for the queries you know exist. Avoid speculative indexes.
  6. Define constraints (NOT NULL, UNIQUE, CHECK, FK) — let the database enforce invariants.
  7. Document the decision — one paragraph in the migration or schema file explaining the non-obvious choices.
  8. Hand off. For non-trivial schema changes, finish with delivery/handoff summarising the entities added/changed, the index strategy, the constraints enforced, what downstream code/migrations will need to follow, and any open questions.

Read the full file on GitHub · 195 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. 1mo ago Changed · +2 lines · +63 tokens per session 8308bbbe1f6a
  2. 1mo ago First seen · 193 lines · 29 tokens per session scan A 3c3b2aafbfc4

Subscribe to this mod's changes

database-schema is a skill published in the GitHub repository Ozzeron/prompt-pack (8 stars, last pushed 1mo ago), licensed MIT. It adds 92 tokens to every session and 2,097 once invoked, about $0.0004 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-31.

Related

Other skills, from other repositories

db-context-postgres

Validate that a non-Supabase Postgres database (Cloud SQL, RDS, self-hosted) is reachable, introspect a scoped subset of its schema, and persist it as DBCONTEXT.md. Read-only, opt-in. Use when work touches that database and planning needs verified schema, or DBCONTEXT.md is stale. Do not use without a task (run…

Mozurok/fhorja.dev · 113 tokens

db-context-supabase

Validate that a Supabase MCP server is reachable, introspect a subset of the database (tables, columns, RLS policies), and persist it as DBCONTEXT.md. Read-only, never destructive SQL. Falls back to the local Supabase CLI when no MCP server is reachable. Use when the task touches Supabase data, schema or RLS and…

Mozurok/fhorja.dev · 111 tokens

db-check

Validate database schema integrity and check for common issues.

faizkhairi/claude-code-blueprint · 12 tokens

data-architecture

A data-architecture guide for designing how application data is structured, changed, stored, and used. A schema is the defined shape of stored data, such as tables and fields.

devcodex-labs/devcodex · 63 tokens

dev-database

A database-development guide focused on safe migrations and schema changes. A migration is a controlled change to the structure of stored data, such as adding a table or changing a column.

devcodex-labs/devcodex · 21 tokens

migration-safety-steward

Audits DDL for production-unsafe patterns BEFORE a migration is applied (NOT NULL without backfill, blocking index builds). Activates on schema changes or migrations in scope, or a schema change with no rollback or two-phase strategy. Do not use for trivial migrations on small tables, changes reversible in under a…

Mozurok/fhorja.dev · 99 tokens