database-architect

database-architect is an agent for Claude Code from Yassinello/claude-plugin-prd-workflow. It costs 17 tokens per session (423 once invoked), scanned A, original, MIT.

An agent focused on PostgreSQL database design, including table structure, migrations, indexes, constraints, and query performance. PostgreSQL is a relational database used to store structured application data.

In plain words
What is it for?
Use it to design schemas, plan safer migrations, choose data types and constraints, create indexes, and investigate slow queries with PostgreSQL tools.
Why use it?
It helps turn application requirements into maintainable database structures and find queries or indexes that may cause slowdowns.

Agent for Claude Code

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/yassinello/claude-plugin-prd-workflow/database-architect
Clone the repo
git clone --depth 1 https://github.com/Yassinello/claude-plugin-prd-workflow

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

README.md
[![agentmods](https://agentmods.dev/badge/agents/yassinello/claude-plugin-prd-workflow/database-architect.svg)](https://agentmods.dev/agents/yassinello/claude-plugin-prd-workflow/database-architect)
Your own site
<a href="https://agentmods.dev/agents/yassinello/claude-plugin-prd-workflow/database-architect"><img src="https://agentmods.dev/badge/agents/yassinello/claude-plugin-prd-workflow/database-architect.svg" alt="Measured on agentmods" height="20"></a>
Per session 17 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 423 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.00017 $0.00423
Opus 5 $0.00009 $0.00211
Sonnet 5 $0.00003 $0.00085
Haiku 4.5 $0.00002 $0.00042

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

Security

Grade A, and why

database-architect 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 4d 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/agents/database-architect.md · 51 lines

What it actually says

Database Architect Agent

Expert guidance on database schema design, migrations, and performance optimization.

Expertise

  • Schema Design: Normalized (3NF) relational models, relationships (1:1, 1:N, N:N)
  • Migrations: Zero-downtime strategies, batch updates, CREATE INDEX CONCURRENTLY
  • Indexes: B-tree, GIN, partial indexes, covering indexes
  • Query Optimization: EXPLAIN ANALYZE, query rewriting, avoiding N+1
  • Data Types: UUID vs BIGINT, JSONB, TIMESTAMPTZ, ENUM, money as integers
  • Constraints: Foreign keys, CHECK constraints, unique indexes

Example: E-Commerce Schema

CREATE TABLE products (
  id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
  sku VARCHAR(50) UNIQUE NOT NULL,
  name VARCHAR(255) NOT NULL,
  price_cents INTEGER NOT NULL CHECK (price_cents >= 0),
  stock INTEGER DEFAULT 0 CHECK (stock >= 0),
  created_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
);

-- Indexes for common queries
CREATE INDEX idx_products_sku ON products(sku);
CREATE INDEX idx_products_price ON products(price_cents);

-- Full-text search
CREATE INDEX idx_products_search ON products
USING GIN (to_tsvector('english', name));

Best Practices

  1. Use UUID for IDs (distributed-friendly, non-enumerable)
  2. Money in cents (INTEGER) to avoid float precision
  3. Always TIMESTAMPTZ (never TIMESTAMP)
  4. Index foreign keys for join performance
  5. Use transactions for data consistency
  6. Batch large migrations to avoid locks
  7. Monitor with pg_stat_statements
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. 4d ago First seen · 51 lines · 17 tokens per session scan A c1ea54ebca50

Subscribe to this mod's changes

database-architect is an agent published in the GitHub repository Yassinello/claude-plugin-prd-workflow (12 stars, last pushed 9mo ago), licensed MIT. It adds 17 tokens to every session and 423 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

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

evolve-data-model-design

Data-model designer for the Evolve Loop (Plan archetype). The advisor INSERTS this phase after Triage on database cycles (scout.goaltype == "database"), BEFORE any build, to fix entities, keys, indexes, and query access paths against the cycle's data-heavy goal. DELIVERS a data-model-design-report.md the TDD/Builder…

mickeyyaya/evolve-loop · 92 tokens

migration-builder

You are a Supabase migration specialist for your project. You generate production-safe PostgreSQL migrations following established patterns and avoiding known gotchas.

Hulupeep/Specflow · 0 tokens

data-analyst

Analyzes database server configuration and host secrets hygiene findings for a single host bundle.

greglas75/zuvo · 21 tokens

PostgreSQL Expert

Designs and optimizes PostgreSQL schemas, queries, indexes, and migrations, reasoning from EXPLAIN plans and pgstat data. Use for slow queries, migration safety, index strategy, or lock contention. Pairs with Backend Staff Engineer, who owns the application layer.

domengabrovsek/claude · 60 tokens

peer-sql-reviewer

Stage 1 peer code reviewer focused on schema correctness, query quality, and migration safety.

hazarsozer/crucible-cc · 24 tokens