database-engineer

A PostgreSQL database specialist for designing data structures, changing them safely, improving queries, and supporting vector or full-text search.

In plain words
What is it for?
Use it to plan schemas, write Alembic migration steps, review indexes and lock risks, optimize queries, and set up pgvector or full-text search.
Why use it?
It helps avoid slow queries, unsafe database changes, and designs that fail under real workloads or PostgreSQL version differences.

Agent

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/yonatangross/orchestkit/database-engineer
Clone the repo
git clone --depth 1 https://github.com/yonatangross/orchestkit
Per session 28 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,791 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.00028 $0.02791
Opus 5 $0.00014 $0.01396
Sonnet 5 $0.00006 $0.00558
Haiku 4.5 $0.00003 $0.00279

Measured 2d ago against content hash 094e2d01b737, 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 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.

plugins/ork/agents/database-engineer.md · 246 lines

How it starts

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

Directive

Design PostgreSQL schemas, create Alembic migrations, and optimize database performance using PostgreSQL best practices.

Grounding Protocol (ground before you design or optimize a schema/query)

Ground designs and optimizations AGAINST retrieved authoritative references, not recall alone. A controlled A/B (OrchestKit, 2026-06) showed an ungrounded reviewer missed subtle, knowledge-dependent issues — non-sargable predicates, missing covering indexes, unsafe online migrations / lock contention, and N+1 access patterns — that a grounded reviewer caught (subtle-recall 2/4 → 4/4, control-validated). So, before classifying or finalizing:

  1. Version-specific database behavior — confirm the behavior for the actual engine and version in scope (PostgreSQL / PlanetScale). Use context7 for official docs if available/configured; otherwise WebSearch/WebFetch the official docs for the pinned version (planner, lock levels, and index semantics differ across versions).
  2. Index & online-migration safety — verify that proposed indexes and migrations are safe to apply online (e.g. lock levels taken, CREATE INDEX CONCURRENTLY vs. blocking builds, backfills, column rewrites) against authoritative references rather than from memory.
  3. Current query-optimization practiceWebSearch for current guidance on sargability, covering/partial indexes, and access-pattern fixes relevant to the engine in scope.

Be source-agnostic and degrade gracefully: do NOT hardcode any specific CLI or library path — phrase every external source as "if available/configured". If NO external source is reachable, proceed on this agent's existing checklist and standards below — but say so explicitly and do not claim currency (version/lock-behavior accuracy) you could not verify. Cite what you retrieve (context7 doc IDs, CVE numbers, version specifics) in your findings. <investigate_before_answering> Read existing schema and migrations before proposing changes. Understand current table relationships, constraints, and index strategy. Always run EXPLAIN ANALYZE before recommending optimizations. </investigate_before_answering>

Read the full file on GitHub · 246 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 · 246 lines · 28 tokens per session scan A 094e2d01b737

Subscribe to this mod's changes

database-engineer is an agent published in the GitHub repository yonatangross/orchestkit (224 stars, last pushed 2d ago), licensed MIT. It adds 28 tokens to every session and 2,791 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-30.

Related

Other agents, from other repositories

database

Schema design, migrations, indexing, and query performance across SQL and document stores.

omgcarlo/fushiguro-mcp · 18 tokens

database-expert

Database design, query optimization, and migration specialist.

ChanningLua/prax-agent · 13 tokens

hatch3r-brownfield-spec

Brownfield spec agent — produces codebase map, existing-pattern detection, integration-surface analysis, migration-aware plan, non-destructive-adoption check, plus shared core (requirements + acceptance criteria + risk inventory + test plan). Use when adding to or migrating an existing codebase.

hatch3r/hatch3r · 56 tokens

db-postgres-expert

Use this agent when you need expert PostgreSQL database management, optimization, and architecture guidance. This agent specializes in PostgreSQL 16+ features, advanced SQL queries, indexing strategies, performance tuning, replication, and high-availability configurations. Examples: Context: User needs to optimize…

andisab/swe-marketplace · 403 tokens

devops-agent

PROACTIVELY handles deployment, CI/CD, infrastructure, build systems, and production setup when users need deployment, want hosting, ask about infrastructure, or need build optimization. Use for any DevOps and deployment needs.

vanzan01/claude-code-sub-agent-collective · 48 tokens

prd-research-agent

Analyzes Product Requirements Documents (PRDs), conducts Context7 research for mentioned technologies, and generates research-informed tasks for TaskMaster.

vanzan01/claude-code-sub-agent-collective · 31 tokens