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 rules/thesethrose/devrules/database-schemagit clone --depth 1 https://github.com/TheSethRose/DevRulesWhat 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 | $0.00000 | $0.01393 |
| Opus 5 | $0.00000 | $0.00696 |
| Sonnet 5 | $0.00000 | $0.00279 |
| Haiku 4.5 | $0.00000 | $0.00139 |
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 2d 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.
Copies of this mod
1 near-identical copy found in the catalogue:
- Database-Schema — 100% identical, 0 lines differ
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.mdcfor 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).
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.
- 2d ago First seen · 122 lines · 0 tokens per session scan A da0e85da3a47
Database-Schema is a cursor rule published in the GitHub repository TheSethRose/DevRules (25 stars, last pushed 1y 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. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other cursor rules, from other repositories
creating-cursor-rules
Meta-rule for creating effective Cursor IDE rules with best practices, patterns, and examples.
prpm-json-best-practices
Best practices for structuring prpm.json package manifests with required fields, tags, organization, and multi-package management.
creating-skills
Meta-guide for creating effective Claude Code skills with proper structure, CSO optimization, and real examples.
beanstalk-deploy
Robust deployment patterns for Elastic Beanstalk with GitHub Actions, Pulumi, and edge case handling.
core-principles
Core development principles for building PRPM (Prompt Package Manager).
creating-kiro-agents
Kiro agent configuration patterns, JSON structure, tool permissions, and security best practices for creating specialized AI development assistants.