Schema Design

Schema Design is a skill for Claude Code, Codex from GktuOktay/ai-skills. It costs 55 tokens per session (1,112 once invoked), scanned A, original, MIT.

A guide to structuring the data definitions used by relational databases, NoSQL databases, and APIs. A schema describes what data exists and how its parts fit together.

In plain words
What is it for?
Use it when designing tables, document stores, database indexes, relationships, or API data formats.
Why use it?
It helps keep data consistent, make common queries faster, and plan structures that can grow without unnecessary duplication or security problems.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

Good fit Use it when designing tables, document stores, database indexes, relationships, or API data formats.

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

Made for: Claude Code, Codex.

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 Schema Design

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/gktuoktay/ai-skills/schema"><img src="https://agentmods.dev/badge/skills/gktuoktay/ai-skills/schema.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 55 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,112 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 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.00055 $0.01112
Opus 5 $0.00028 $0.00556
Sonnet 5 $0.00011 $0.00222
Haiku 4.5 $0.00006 $0.00111

Measured 12d ago against content hash 52b010b4415b, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

Schema Design 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 12d 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.

.agents/skills/schema/SKILL.md · 89 lines

How it starts

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

Database and API Schema Design

Effective schema design is foundational to application performance, data integrity, and future scalability. This guide covers relational, NoSQL, and API schema design principles.

1. Relational Database Schema Design (SQL)

Relational databases (PostgreSQL, MySQL) excel at structured data with complex relationships.

Normalization

The process of organizing data to reduce redundancy and improve data integrity.

  • 1NF: Eliminate repeating groups (each column contains atomic values).
  • 2NF: Eliminate partial dependencies (non-key columns depend on the entire primary key).
  • 3NF: Eliminate transitive dependencies (non-key columns depend only on the primary key, not on other non-key columns). Rule of thumb: Normalize to 3NF by default, denormalize only for specific read-performance bottlenecks.

Indexing

Indexes drastically speed up read operations but slow down writes and consume disk space.

  • Primary Keys: Automatically indexed.
  • Foreign Keys: Always index foreign keys to speed up JOIN operations.
  • Frequent Queries: Create B-Tree indexes on columns frequently used in WHERE, ORDER BY, or GROUP BY clauses.
  • Composite Indexes: Use for queries that filter on multiple columns simultaneously (order matters: put the most selective column first).

Constraints

Enforce data integrity at the database level.

  • NOT NULL, UNIQUE, CHECK (e.g., price > 0), FOREIGN KEY (referential integrity).

Migrations

Always use a migration tool (e.g., Prisma, Flyway, Alembic) to version control schema changes. Never modify the production schema manually.

2. NoSQL Schema Patterns

NoSQL databases (MongoDB, DynamoDB, Neo4j) are chosen for flexibility, horizontal scalability, or specific data models.

Document Databases (MongoDB)

  • Embedding vs. Referencing:
    • Embed data (sub-documents) if it is frequently accessed together and rarely changes (e.g., User addresses).
    • Reference data (store IDs) if the nested data is large, grows unbounded, or is accessed independently (e.g., Post comments).

Read the full file on GitHub · 89 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. 12d ago First seen · 89 lines · 55 tokens per session scan A 52b010b4415b

Subscribe to this mod's changes

Schema Design is a skill published in the GitHub repository GktuOktay/ai-skills (2 stars, last pushed 9d ago), licensed MIT. It adds 55 tokens to every session and 1,112 once invoked, about $0.0003 per session on Opus 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

event-store-design

Design and implement event stores for event-sourced systems. Use when building event sourcing infrastructure, choosing event store technologies, or implementing event persistence patterns.

rmyndharis/antigravity-skills · 33 tokens

event-sourcing-architect

Expert in event sourcing, CQRS, and event-driven architecture patterns. Masters event store design, projection building, saga orchestration, and eventual consistency patterns. Use PROACTIVELY for event-sourced systems, audit trails, or temporal queries.

rmyndharis/antigravity-skills · 55 tokens

cqrs-implementation

Implement Command Query Responsibility Segregation for scalable architectures. Use when separating read and write models, optimizing query performance, or building event-sourced systems.

rmyndharis/antigravity-skills · 35 tokens

backend-engineer

Supabase integration specialist. Handles database schema, authentication, Row Level Security (RLS), real-time subscriptions, and storage. Connects existing UI to real backend. Only called AFTER UI exists with mock data. Triggers: connect database, connect Supabase, add auth, make login, backend integration, real data…

wasintoh/toh-framework · 75 tokens

search-engine-expert

Expert guide for full-text search engines (Typesense, Meilisearch, Elasticsearch), faceted search, and autocomplete / Panduan ahli mesin pencarian full-text (Typesense, Meilisearch, Elasticsearch), pencarian berfaset, dan autocomplete.

roedyrustam/vibes-plug · 56 tokens

api-baas-firebase

Firebase backend-as-a-service — Firestore, Authentication, Cloud Functions v2, Storage, Hosting, Admin SDK, security rules, emulator suite.

agents-inc/skills · 34 tokens