db-designer

db-designer is an agent for Claude Code from T4LEL/Claude-Arsenal. It costs 42 tokens per session (434 once invoked), scanned A, original, MIT.

A database-design agent focused on PostgreSQL and Supabase, including schemas, migrations, access rules, indexes, queries, and seed data. It designs the database structure before writing application code.

In plain words
What is it for?
Designing tables and relationships, writing migration files, creating Supabase row-level security policies, adding useful indexes, optimizing queries, and preparing seed data.
Why use it?
It helps keep data rules in the database, reducing inconsistent records and unsafe access. For Supabase, it requires row-level security—rules that control which users can access each row—and explicit policies.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md). Also seen: model in frontmatter.

Good fit Designing tables and relationships, writing migration files, creating Supabase row-level security policies, adding useful indexes, optimizing queries, and preparing seed data.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/t4lel/claude-arsenal/db-designer
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.

Clone the repo
git clone --depth 1 https://github.com/T4LEL/Claude-Arsenal

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 db-designer

README.md
[![agentmods](https://agentmods.dev/badge/agents/t4lel/claude-arsenal/db-designer/github.svg)](https://agentmods.dev/agents/t4lel/claude-arsenal/db-designer)
Your own site
<a href="https://agentmods.dev/agents/t4lel/claude-arsenal/db-designer"><img src="https://agentmods.dev/badge/agents/t4lel/claude-arsenal/db-designer/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 db-designer

Your own site · 80×15
<a href="https://agentmods.dev/agents/t4lel/claude-arsenal/db-designer"><img src="https://agentmods.dev/badge/agents/t4lel/claude-arsenal/db-designer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 42 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 434 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.
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.00042 $0.00434
Opus 5 $0.00021 $0.00217
Sonnet 5 $0.00008 $0.00087
Haiku 4.5 $0.00004 $0.00043

Measured 9d ago against content hash bd120a4afec2, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

db-designer 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 9d 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.

agents/db-designer.md · 22 lines

What it actually says

You are a database engineer specialized in Postgres and Supabase.

You run non-interactively: you cannot ask questions mid-task, and your final message is the only thing the requester sees — it must contain everything in Definition of done. When access patterns are ambiguous, design for the stated use case, note the assumption, and flag decisions that deserve the user's confirmation; if truly blocked, stop and report exactly what's missing.

Rules

  • Schema first, code second: nail entities, relationships, constraints (NOT NULL, UNIQUE, FK, CHECK) before anything touches the app layer. The database is the last line of defense for data integrity.
  • Every table: primary key, created_at timestamptz default now(), and explicit ownership column (user_id etc.) when data belongs to someone.
  • Supabase projects: every table gets RLS enabled with explicit policies — a table without RLS is a finding, not a default. Write policies for each verb actually used (select/insert/update/delete), scoped to auth.uid().
  • All schema changes go through migration files (never ad-hoc SQL against production). Name them descriptively.
  • Index what the queries actually filter/join/order by — no speculative indexes. Explain each index you add in one line.
  • Prefer database-enforced invariants (constraints, triggers for denormalized counts) over application-code promises.
  • Destructive migrations (dropping columns/tables, type changes on populated tables): stop and report the risk instead of executing.

Definition of done

Migration file(s) written and applied to the local/dev database successfully (paste real output), RLS covered, and a short summary of the schema decisions and their trade-offs. If no local/dev database is reachable, deliver the migration files unapplied and say so explicitly — never claim an apply you didn't run, and never apply directly to production.

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. 9d ago First seen · 22 lines · 42 tokens per session scan A bd120a4afec2

Subscribe to this mod's changes

db-designer is an agent published in the GitHub repository T4LEL/Claude-Arsenal (1 stars, last pushed 1mo ago), licensed MIT. It adds 42 tokens to every session and 434 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-31.

Related

Other agents, from other repositories

database-engineer

Designs schemas, optimizes queries, manages migrations. Expert in PostgreSQL, Supabase, Prisma, Redis.

Chipagosfinest/enterprise-team · 27 tokens

neon-optimization-analyzer

Identify and fix slow Postgres queries automatically using Neon's branching workflow. Analyzes execution plans, tests optimizations in isolated database branches, and provides clear before/after performance metrics with actionable code fixes.

asleekgeek/claude-multiagent-catalogue · 48 tokens

oracle-to-postgres-migration-expert

Agent for Oracle-to-PostgreSQL application migrations. Educates users on migration concepts, pitfalls, and best practices; makes code edits and runs commands directly; and invokes extension tools on user confirmation.

asleekgeek/claude-multiagent-catalogue · 49 tokens

neon-migration-specialist

Safe Postgres migrations with zero-downtime using Neon's branching workflow. Test schema changes in isolated database branches, validate thoroughly, then apply to production—all automated with support for Prisma, Drizzle, or your favorite ORM.

asleekgeek/claude-multiagent-catalogue · 52 tokens

postgresql-dba

Work with PostgreSQL databases using the PostgreSQL extension.

asleekgeek/claude-multiagent-catalogue · 16 tokens

Neon Performance Analyzer

Identify and fix slow Postgres queries automatically using Neon's branching workflow. Analyzes execution plans, tests optimizations in isolated database branches, and provides clear before/after performance metrics with actionable code fixes.

github/awesome-copilot · 46 tokens