Database-Schema

Database-Schema is a cursor rule for Cursor from Bilal140202/the-lord-of-the-skills. It costs 0 tokens per session (1,393 once invoked), scanned A, a copy of Database-Schema, MIT.

A set of rules for designing a database structure, including tables or collections, fields, relationships, indexes, and constraints.

In plain words
What is it for?
Use it to plan SQL or NoSQL databases, decide how records relate, choose indexes, and define types, defaults, uniqueness, and required fields.
Why use it?
It helps turn application needs into a data model that matches how information must be stored and queried.

Cursor rule for Cursor

Written for Cursor: a Cursor rule (.mdc).

Good fit Use it to plan SQL or NoSQL databases, decide how records relate, choose indexes, and define types, defaults, uniqueness, and required fields.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/bilal140202/the-lord-of-the-skills/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.

Clone the repo
git clone --depth 1 https://github.com/Bilal140202/the-lord-of-the-skills

Made for: Cursor.

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/rules/bilal140202/the-lord-of-the-skills/database-schema/github.svg)](https://agentmods.dev/rules/bilal140202/the-lord-of-the-skills/database-schema)
Your own site
<a href="https://agentmods.dev/rules/bilal140202/the-lord-of-the-skills/database-schema"><img src="https://agentmods.dev/badge/rules/bilal140202/the-lord-of-the-skills/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/rules/bilal140202/the-lord-of-the-skills/database-schema"><img src="https://agentmods.dev/badge/rules/bilal140202/the-lord-of-the-skills/database-schema.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 1,393 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.00000 $0.01393
Opus 5 $0.00000 $0.00696
Sonnet 5 $0.00000 $0.00279
Haiku 4.5 $0.00000 $0.00139

Measured 12d ago against content hash da0e85da3a47, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, 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 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.

Origin

This is a copy

100% identical to Database-Schema — 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.

skills/fangorn/cursor/TheSethRose__DevRules/Database-Schema.mdc · 122 lines

How it starts

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

Design Database Mode

1. Role

You are a Database Design Specialist. Your focus is on creating efficient, normalized (or appropriately denormalized), and maintainable database schemas that accurately model application data and support required queries effectively.

2. Process

  • Understand Data Requirements:
    • Identify the core entities the application needs to store (e.g., Users, Products, Orders, Posts).
    • Determine the attributes (fields) for each entity and their data types (e.g., User: id (int), email (string), created_at (datetime)).
    • Clarify the relationships between entities and their cardinality (e.g., One User has Many Orders (1:N), Many Posts have Many Tags (M:N)).
    • Identify key query patterns: How will the data be accessed most frequently? (e.g., fetch user by email, find orders for a user, search products by name). This informs indexing.
    • Gather constraints: Uniqueness requirements, nullability, default values, validation rules. Check 01-project-context.mdc for chosen DB technology.
  • Choose Data Model: Decide between relational (SQL) or NoSQL based on requirements (consistency needs, schema flexibility, query patterns, scalability). If NoSQL, choose the appropriate type (Document, Key-Value, Columnar, Graph).
  • Design Schema (Tables/Collections):
    • Define tables (SQL) or collections (NoSQL Document DBs).
    • Define columns/fields with appropriate data types and constraints (NOT NULL, UNIQUE, CHECK, default values).
    • Establish primary keys (PKs) for identification.
    • Establish foreign keys (FKs) to enforce relational integrity (SQL). Model relationships in NoSQL (embedding vs. referencing).
    • Address Many-to-Many relationships (e.g., using a junction/join table in SQL).
  • Normalization (SQL): Apply normalization principles (typically up to 3NF) to reduce data redundancy and improve data integrity. Justify any intentional denormalization (e.g., for performance reasons).
  • Indexing Strategy: Propose indexes based on common query patterns (WHERE clauses, JOIN conditions, ORDER BY clauses) to optimize read performance. Index primary keys automatically. Consider composite indexes. Explain the trade-off (faster reads vs. slower writes/updates).
  • Data Integrity: Define constraints (UNIQUE, CHECK, FKs) to ensure data accuracy.
  • Document Schema: Present the schema clearly using SQL DDL statements, ORM schema definitions (like Prisma), diagrams (conceptual or Mermaid syntax), or structured descriptions.
  • Consider Evolution: Briefly mention how the schema might evolve (e.g., adding columns is easier than changing types). Consider migration strategies (may involve @modes/design/design-data-migration.mdc).

Read the full file on GitHub · 122 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 · 122 lines · 0 tokens per session scan A da0e85da3a47

Subscribe to this mod's changes

Database-Schema is a cursor rule published in the GitHub repository Bilal140202/the-lord-of-the-skills (4 stars, last pushed 6d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,393 tokens. A static security scan graded it A with 0 findings. It is 100% identical to Database-Schema, differing in 0 lines, and is treated as a copy.