database

A set of general guidelines for software that stores and retrieves data, covering database structure, queries, migrations, transactions, and data access. It applies across programming languages, databases, and frameworks.

In plain words
What is it for?
Use it to design or review schemas, constraints, queries, migrations, transactions, data-access code, and behavior during concurrent writes or partial failures.
Why use it?
It helps prevent inconsistent data, unsafe or inefficient queries, partial updates, and concurrency problems when multiple operations happen at once. It emphasizes enforcing important rules at the database as well as in application code.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/soden46/engineer-flow/database
Any agent
npx skills add soden46/engineer-flow --skill database
Clone the repo
git clone --depth 1 https://github.com/soden46/engineer-flow

Made for: Claude Code, Codex.

Per session 24 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 458 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00024 $0.00458
Opus 5 $0.00012 $0.00229
Sonnet 5 $0.00005 $0.00092
Haiku 4.5 $0.00002 $0.00046

Measured 2d ago against content hash 593b4eea8d2c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

database 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.

skills/engineer-flow/core/database/SKILL.md · 112 lines

How it starts

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

Database

Use this skill for persistence, queries, schema changes, migrations, transactions, data integrity, and data-access behavior.

This skill is language, ORM, and database framework agnostic.

Data Integrity

Enforce important invariants at the strongest practical layer.

Use appropriate:

  • constraints
  • uniqueness rules
  • foreign keys
  • nullability
  • validation
  • transaction boundaries

Application validation does not replace database integrity where concurrent writes can violate an invariant.

Queries

Prefer structured and parameterized query mechanisms.

Avoid:

  • unbounded reads
  • unnecessary columns
  • repeated identical queries
  • N+1 access patterns
  • avoidable full scans
  • query construction from untrusted input

Inspect the actual workload before adding optimization complexity.

Transactions

Use transactions when multiple operations must succeed or fail as one logical change.

Keep transaction scopes as small as practical.

Consider:

  • partial failure
  • retries
  • deadlocks
  • external side effects
  • long-running work

Do not hold database transactions open while performing unnecessary external operations.

Concurrency

When correctness depends on concurrent access, explicitly consider:

  • lost updates
  • duplicate creation
  • stale reads
  • locking
  • atomic operations
  • optimistic concurrency
  • idempotency

Do not assume application-level checks remain valid between read and write.

Schema Changes

Schema changes should consider:

  • backwards compatibility
  • existing data
  • nullability
  • defaults
  • index creation
  • rollout ordering
  • rollback strategy
  • large table impact

For risky migrations, prefer staged changes.

Data Access Boundaries

Keep persistence concerns separate from unrelated presentation or transport logic.

Avoid leaking database-specific details throughout the application when an established data-access boundary exists.

Verification

Relevant checks may include:

  • correct persisted state
  • constraint enforcement
  • transaction rollback
  • concurrent behavior
  • query count
  • execution plan
  • migration safety
  • backwards compatibility

Read the full file on GitHub · 112 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. 2d ago First seen · 112 lines · 24 tokens per session scan A 593b4eea8d2c

Subscribe to this mod's changes

database is a skill published in the GitHub repository soden46/engineer-flow (3 stars, last pushed 4d ago), licensed MIT. It adds 24 tokens to every session and 458 once invoked, about $0.0001 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.

Related

Other skills, from other repositories

snip

You are an expert at writing declarative YAML filters for snip, a CLI proxy that reduces LLM token consumption by filtering shell output.

edouard-claude/snip · 0 tokens

todos

This chat has a shared, live TODO plan — your tasks for the conversation, which the user also edits. Read this skill and reach for the todo tools whenever a request takes more than a couple of steps. It covers the plan model (group = task, items = its steps; loose items are the user's lane), how to work it: propose…

JetBrains/thinkrail · 127 tokens

writing-workflow-skills

Use when adding a new workflow skill to pi-thinkrail-workflow, changing an existing workflow skill's role, trigger, handoff, or structure, or checking a workflow skill against the workflow system's rules. Not for authoring general-purpose skills outside this package.

JetBrains/thinkrail · 60 tokens

reviewing-changes

Use when a review package asks you to review a plan step's change set (todo.startReview): you are the REVIEWER, not the author. How to judge an agent-written diff, file findings with addreviewcomment, and settle with exactly one reviewverdict.

JetBrains/thinkrail · 59 tokens

setting-up-a-project

Use whenever asked to set up, onboard, initialize, or spec a project — the front door when the workspace has no spec graph yet (brand-new or an existing codebase); also seeded by the app's Set-up-project card (/skill:setting-up-a-project). Not for feature work in an already-specced project — use the brainstorming…

JetBrains/thinkrail · 76 tokens

writing-specs

Use when a workflow step drafts or revises a spec artifact — a goal-and-requirements, an architecture, or a module SPEC — or when a workflow skill names it at such a step. The shared quality bar for specs — not a workflow, nothing to execute.

JetBrains/thinkrail · 59 tokens