agentleFS
sivaprasadreddysivaprasadreddy/sivalabs-agent-skills/skills/database-design/SKILL.md

database-design

Skill198 starsChanged 4 days agoMITView on GitHub

Design technology-independent data models and relational or non-relational schemas with integrity, query patterns, evolution, and lifecycle in mind.

65 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use intelligent-routing, llm-application-dev and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • SKB3002Skill

    intelligent-routing

    Automatic agent selection and intelligent task routing. Analyzes user requests and automatically selects the best specialist agent(s) without requiring explicit user mentions.

    Also in 5 projects that use this

  • pepebot-spaceSkill

    llm-application-dev

    Building applications with Large Language Models - prompt engineering, RAG patterns, and LLM integration. Use for AI-powered features, chatbots, or LLM-based automation.

    Also in 4 projects that use this

  • xenitV1Skill

    red-team-tactics

    Red team tactics principles based on MITRE ATT&CK. Attack phases, detection evasion, reporting.

    Also in 7 projects that use this

  • MoizIbnYousafSkill

    audit-library-health

    Use when checking the overall health of a skills library. Run doctor, validate, check for stale skills, and verify generated docs are in sync.

    Also in 3 projects that use this

  • MoizIbnYousafSkill

    browse-and-evaluate

    Use when exploring the ai-agent-skills catalog to find, compare, and evaluate skills before installing. Always use --fields to limit output size and --dry-run before committing to an install.

    Also in 3 projects that use this

  • SKB3002Skill

    nextjs-react-expert

    React and Next.js performance optimization from Vercel Engineering. Use when building React components, optimizing performance, eliminating waterfalls, reducing bundle size, reviewing code for performance issues, or implementing server/client-side optimizations.

    Also in 3 projects that use this

  • +5 more from MoizIbnYousaf

The file

We split this skill into the rules it gives an agent

11 rules. 0 are common, 11 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 61 edited versions we read keep these.

  • 11

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use when creating or changing entities, tables, collections, relationships, indexes, constraints, retention policies, or storage choices.

    line 12
  2. Distinctive:

    Use stable identifiers and explicit uniqueness rules.

    line 20
  3. Distinctive:

    Avoid storing derived values unless there is a clear performance or historical requirement.

    line 23
  4. Distinctive:

    Consider audit history, soft deletion, retention, and privacy requirements.

    line 33
  5. Distinctive:

    Use primary keys, foreign keys, unique constraints, check constraints, and appropriate nullability.

    line 38
  6. Distinctive:

    Avoid redundant indexes and indexes with no demonstrated use.

    line 40
  7. Distinctive:

    Avoid encoding multiple values into a single field when they need independent querying or integrity.

    line 42
  8. Distinctive:

    Use transactions for related changes that must succeed or fail together.

    line 43
  9. Distinctive:

    Consider item size, partition/shard keys, hot partitions, secondary-index costs, and consistency semantics.

    line 48
  10. Distinctive:

    Avoid treating a non-relational store as a schema-free substitute for data modeling.

    line 49
  11. Distinctive:

    Do indexes support real queries?

    line 55

“Common” is measured: kept by at least 6 in 10 of the 61 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Database Design

Purpose

Guide durable data modeling and schema design based on domain meaning, access patterns, and integrity requirements.

When to use

Use when creating or changing entities, tables, collections, relationships, indexes, constraints, retention policies, or storage choices.

Principles

  1. Model business concepts and invariants, not merely screens or API payloads.
  2. Understand read and write patterns before choosing structures and indexes.
  3. Establish ownership and authoritative sources for each piece of data.
  4. Enforce critical invariants as close to the data as practical, using constraints and transactional guarantees where supported.
  5. Choose normalization or denormalization deliberately. Denormalize for demonstrated access or scale needs and define how consistency is maintained.
  6. Use stable identifiers and explicit uniqueness rules.
  7. Represent money, time, quantities, and state with appropriate semantics and precision.
  8. Define nullability intentionally; distinguish unknown, absent, and inapplicable values.
  9. Avoid storing derived values unless there is a clear performance or historical requirement.
  10. Plan for data growth, retention, deletion, privacy, backup, and restoration.

Workflow

  1. Identify domain entities, value concepts, lifecycle, and invariants.
  2. List important queries, filters, sorts, aggregations, and write paths.
  3. Define relationships, cardinality, ownership, and deletion behavior.
  4. Select storage technology based on consistency, query, scale, operational, and team needs.
  5. Define keys, constraints, indexes, and concurrency expectations.
  6. Decide where transactions are required and what atomicity they must provide.
  7. Consider audit history, soft deletion, retention, and privacy requirements.
  8. Validate the model against realistic examples and edge cases.
  9. Estimate data volume and review likely expensive queries.

Relational design guidance

  • Use primary keys, foreign keys, unique constraints, check constraints, and appropriate nullability.
  • Index actual access paths, including join keys and common filter/sort combinations.
  • Avoid redundant indexes and indexes with no demonstrated use.
  • Define deletion behavior explicitly; cascading deletion must be intentional.
  • Avoid encoding multiple values into a single field when they need independent querying or integrity.
  • Use transactions for related changes that must succeed or fail together.

Non-relational design guidance

  • Choose document, key-value, graph, or search storage based on access patterns and required guarantees.
  • Define aggregate/document boundaries and update contention.
  • Consider item size, partition/shard keys, hot partitions, secondary-index costs, and consistency semantics.
  • Avoid treating a non-relational store as a schema-free substitute for data modeling.

Review checklist

  • Does the model represent domain invariants?
  • Are ownership and relationship cardinalities clear?
  • Are uniqueness and referential integrity protected?
  • Do indexes support real queries?
  • Are concurrent updates and transaction boundaries understood?
  • Are time zones, precision, and null semantics explicit?
  • Are retention, deletion, backup, and recovery addressed?

Provide a concise entity/relationship description and explain non-obvious constraints and indexing decisions. Do not prescribe a specific database without requirements.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.