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/adit-jain-srm/skill-forge/db-schemanpx skills add Adit-Jain-srm/skill-forge --skill db-schemagit clone --depth 1 https://github.com/Adit-Jain-srm/skill-forgeWrote 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/adit-jain-srm/skill-forge/db-schema)<a href="https://agentmods.dev/skills/adit-jain-srm/skill-forge/db-schema"><img src="https://agentmods.dev/badge/skills/adit-jain-srm/skill-forge/db-schema.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.1 | $0.00068 | $0.01739 |
| Opus 5 | $0.00034 | $0.00870 |
| Sonnet 5 | $0.00014 | $0.00348 |
| Haiku 4.5 | $0.00007 | $0.00174 |
Grade A, and why
db-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 6d 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 — 222 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Overview
Enforce queries-first schema discipline — design every table around its access patterns, index every filter, and verify migrations are safe at production scale.
Database Schema Design
Persistence
ACTIVE on every schema change. Every CREATE TABLE, every ALTER, every migration. Think at scale before writing DDL.
The Discipline
Before writing ANY schema:
1. QUERIES FIRST — what queries will run against this? (schema serves queries, not the other way around)
2. SCALE QUESTION — what happens at 10M rows? 100M? Does this still work?
3. INDEX PLAN — every WHERE, JOIN, ORDER BY gets an index. No exceptions.
4. MIGRATION SAFETY — can this ALTER run without locking the table for minutes?
5. VERIFY — explain analyze the critical queries. Prove they use indexes.
Rules (never break)
- Never CREATE TABLE without knowing the top 5 queries it serves
- Never deploy a migration without testing against production-sized data
- Never use FLOAT for money (DECIMAL or integer cents)
- Never skip explicit
created_at/updated_aton any table - Never add a column with DEFAULT on a large table (locks it)
- Never DROP COLUMN in one step (stop writing → deploy → then drop)
Before creating any table:
- Define the access patterns FIRST (queries drive schema, not the other way around)
- Choose normalization level based on read/write ratio
- Plan for the 10x scale (what happens at 10M rows?)
- Identify foreign keys and cascade behavior
- Define indexes for every WHERE/JOIN/ORDER BY clause
- Plan soft-delete vs hard-delete strategy
- Consider multi-tenancy needs upfront
Normalization Decision
| Situation | Strategy | Why |
|---|---|---|
| Read-heavy, rarely changes | Denormalize | Avoid JOINs at query time |
| Write-heavy, consistency critical | Normalize (3NF) | Single source of truth |
| Analytics/reporting | Star schema (denormalized) | Optimized for aggregation |
| User-facing CRUD | 3NF with strategic denorm | Balance of integrity + speed |
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.
- 6d ago First seen · 222 lines · 68 tokens per session scan A 8e1b350f2ef7
db-schema is a skill published in the GitHub repository Adit-Jain-srm/skill-forge (2 stars, last pushed 2mo ago), licensed MIT. It adds 68 tokens to every session and 1,739 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.
Other skills, from other repositories
postgresql-table-design
Use this skill when designing or reviewing a PostgreSQL-specific schema. Covers best-practices, data types, indexing, constraints, performance patterns, and advanced features.
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.
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.
projection-patterns
Build read models and projections from event streams. Use when implementing CQRS read sides, building materialized views, or optimizing query performance in event-sourced systems.
architect/data-api-design
Skill "architect/data-api-design" from echoVic/boss-skill, covering 数据模型与api设计方法论, 适用场景, 数据模型设计, 1. 实体识别 and 2. 关系识别.
mongodb-connection
Optimize MongoDB client connection configuration (pools, timeouts, patterns) for any supported driver language. Use this skill when working/updating/reviewing on functions that instantiate or configure a MongoDB client (eg, when calling connect()), configuring connection pools, troubleshooting connection errors…