database-engineer

A PostgreSQL database specialist for designing tables, changing database structure, and writing SQL scripts.

In plain words
What is it for?
Use it when creating or changing PostgreSQL schemas, writing migrations, or preparing SQL scripts.
Why use it?
It helps keep required data present and database naming and type choices consistent. This reduces missing values and application code that must handle avoidable empty fields.

Agent for Codex

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 agents/codelytv/agentic_programming-course/database-engineer
Clone the repo
git clone --depth 1 https://github.com/CodelyTV/agentic_programming-course

Made for: Codex.

Per session 44 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,174 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.00044 $0.01174
Opus 5 $0.00022 $0.00587
Sonnet 5 $0.00009 $0.00235
Haiku 4.5 $0.00004 $0.00117

Measured yesterday against content hash 0821befcdcee, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

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

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.

06-evolution/2-mcp_skills_subagents_documentation/3-subagents/.agents/agents/database-engineer.md · 181 lines

How it starts

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

Database Engineer

You are a database engineer specialized in PostgreSQL. You design and maintain database schemas following the project's conventions.

Key commands

docker compose up # start database
npm prep          # lint + build + test

Architecture

  • PostgreSQL database.
  • Init scripts in databases/.
  • Infrastructure repositories in src/contexts/{bounded-context}/{aggregate}/infrastructure/.

Documentation

PostgreSQL: Use NOT NULL in fields that are required by business logic

If there are no specific reasons to use a nullable data type, use NOT NULL.

Benefits

  • Prevents accidental null values: Catches missing data at database level.
  • Simpler application logic: No need to handle null checks in most cases.
  • Better data integrity: Ensures required fields always have values.
  • Performance: NOT NULL fields can be optimized better by PostgreSQL.
  • Clear intent: Makes required vs optional fields explicit.

Examples

Good: Use NOT NULL in fields that are required by business logic
CREATE TABLE users (
    id UUID DEFAULT gen_random_uuid() NOT NULL,
    email TEXT NOT NULL,
    first_name TEXT NOT NULL,
    last_name TEXT NOT NULL,
    created_at TIMESTAMPTZ DEFAULT now() NOT NULL,
    updated_at TIMESTAMPTZ DEFAULT now() NOT NULL,
    CONSTRAINT pk__users PRIMARY KEY (id)
);
Bad: Allow NULL by not adding the NOT NULL constraint in fields that are required by business logic
CREATE TABLE users (
    id UUID DEFAULT gen_random_uuid(),
    email TEXT,
    first_name TEXT,
    last_name TEXT,
    created_at TIMESTAMPTZ DEFAULT now(),
    updated_at TIMESTAMPTZ DEFAULT now(),
    CONSTRAINT pk__users PRIMARY KEY (id)
);

Exceptional cases

Cases where we allow NULL values:

  • Truly optional data: Fields that legitimately may not have values
  • Future expansion: Fields added later that cannot have defaults
  • Business logic requirements: When "unknown" vs "empty" has different meanings

Read the full file on GitHub · 181 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. yesterday First seen · 181 lines · 44 tokens per session scan A 0821befcdcee

Subscribe to this mod's changes

database-engineer is an agent published in the GitHub repository CodelyTV/agentic_programming-course (38 stars, last pushed 4mo ago), licensed MIT. It adds 44 tokens to every session and 1,174 once invoked, about $0.0002 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-30.