ownyourcode: Skill for Claude Code

.claude/skills/fundamentals/database/SKILL.md

database-fundamentals is a skill for Claude Code from DanielPodolsky/ownyourcode. It costs 54 tokens per session (1,581 once invoked), scanned A, original, MIT.

A review checklist for database tables, relationships, migrations, queries, and data access code. It covers SQL and NoSQL systems, including tools such as Prisma, MongoDB, and PostgreSQL.

In plain words
What is it for?
Use it when designing schemas, writing queries, adding migrations, defining ORM models, creating indexes, or investigating issues such as N+1 queries and missing pagination.
Why use it?
It helps catch data-modeling errors, unsafe queries, missing constraints, and slow access patterns before they become production problems.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

This is DanielPodolsky/ownyourcode's own configuration. It tells Claude Code how to work on ownyourcode itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything ownyourcode configures →

Reuse

Borrowing it

Nothing to install: this file belongs to DanielPodolsky/ownyourcode. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/DanielPodolsky/ownyourcode/main/.claude/skills/fundamentals/database/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/DanielPodolsky/ownyourcode

Made for: Claude Code.

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-fundamentals

README.md
[![agentmods](https://agentmods.dev/badge/skills/danielpodolsky/ownyourcode/database/github.svg)](https://agentmods.dev/skills/danielpodolsky/ownyourcode/database)
Your own site
<a href="https://agentmods.dev/skills/danielpodolsky/ownyourcode/database"><img src="https://agentmods.dev/badge/skills/danielpodolsky/ownyourcode/database/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-fundamentals

Your own site · 80×15
<a href="https://agentmods.dev/skills/danielpodolsky/ownyourcode/database"><img src="https://agentmods.dev/badge/skills/danielpodolsky/ownyourcode/database.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 54 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,581 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00054 $0.01581
Opus 5.5 $0.00022 $0.00632
Sonnet 5.5 $0.00011 $0.00316
Haiku 4.5 $0.00005 $0.00158

Measured 1mo ago against content hash fd81eeaed2d9, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

database-fundamentals 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 1mo 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.

.claude/skills/fundamentals/database/SKILL.md · 224 lines

How it starts

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

Database Fundamentals Review

"Your database is the foundation. Build it wrong, and everything above it will crack."

When to Apply

Activate this skill when reviewing:

  • Schema design and migrations
  • SQL/NoSQL queries
  • ORM model definitions
  • Data relationships
  • Index creation
  • Query performance

Review Checklist

Schema Design

  • Normalization: Is data normalized appropriately (no excessive duplication)?
  • Denormalization justified: If denormalized, is there a performance reason?
  • Primary keys: Does every table have a clear primary key?
  • Foreign keys: Are relationships enforced at the database level?
  • Data types: Are appropriate types used (not everything TEXT)?

Indexes

  • Query-based: Are indexes created for frequently queried columns?
  • Composite indexes: Are multi-column queries covered?
  • Not over-indexed: Are there unnecessary indexes slowing writes?
  • Unique constraints: Are unique fields enforced at DB level?

Queries

  • No N+1: Are related records fetched in bulk?
  • Select specific fields: Are we avoiding SELECT *?
  • Pagination: Do list queries limit results?
  • Parameterized: Are all queries parameterized (no string concatenation)?

Migrations

  • Reversible: Can this migration be rolled back?
  • No data loss: Will existing data survive the migration?
  • Tested: Has this been tested against production-like data?
  • Incremental: Are large changes broken into smaller migrations?

Common Mistakes (Anti-Patterns)

1. The N+1 Query Problem

❌ // 1 query for users + N queries for posts
   const users = await User.findAll();
   for (const user of users) {
     user.posts = await Post.findAll({ where: { userId: user.id } });
   }

✅ // 1 query with JOIN
   const users = await User.findAll({
     include: [{ model: Post }]
   });

   // Or 2 queries with IN clause
   const users = await User.findAll();
   const userIds = users.map(u => u.id);
   const posts = await Post.findAll({ where: { userId: userIds } });

Read the full file on GitHub · 224 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. 1mo ago First seen · 224 lines · 54 tokens per session scan A fd81eeaed2d9

Subscribe to this mod's changes

database-fundamentals is a skill published in the GitHub repository DanielPodolsky/ownyourcode (292 stars, last pushed 4mo ago), licensed MIT. It adds 54 tokens to every session and 1,581 once invoked, about $0.0002 per session on Opus 5.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-30.

Related

Other skills, from other repositories

sql-code-review

Universal SQL code review assistant that performs comprehensive security, maintainability, and code quality analysis across all SQL databases (MySQL, PostgreSQL, SQL Server, Oracle). Focuses on SQL injection prevention, access control, code standards, and anti-pattern detection. Complements SQL optimisation prompt for…

MarieLynneBlock/arcanum-artifex · 65 tokens

review-implement-phase

Implements triaged review actions, commits focused fixes, and posts Done plus resolves threads. Use when the user wants only the implementation phase of the review-framework workflow.

prisma/orm · 38 tokens

no-bare-casts

Writing as in TypeScript or TSX production code, modifying a file that contains a bare as cast, silencing a type error with a cast, encountering as unknown as, or reviewing a cast site.

prisma/orm · 52 tokens

embeddings

Vector embeddings with HNSW indexing, sql.js persistence, and hyperbolic support. 75x faster with agentic-flow integration. Use when: semantic search, pattern matching, similarity queries, knowledge retrieval. Skip when: exact text matching, simple lookups, no semantic understanding needed.

ruvnet/ruflo · 62 tokens

migration-review

Review database migration files when a change adds or modifies paths under migrations/. Use it before merge to collect forward, rollback, locking, and data-safety evidence.

rohitg00/ai-engineering-from-scratch · 35 tokens

revdiff

Review diffs, files, and documents with inline annotations in a TUI overlay, or answer questions about revdiff usage, configuration, themes, and keybindings. Opens revdiff in agterm/tmux/zellij/herdr/kitty/wezterm/cmux/ghostty/iterm2/emacs-vterm, captures annotations, and addresses them. Works in git, hg, and jj repos…

umputun/revdiff · 248 tokens