database-architect

database-architect is an agent for Claude Code from Omar-Obando/qwen-orchestrator. It costs 21 tokens per session (578 once invoked), scanned A, original, MIT.

An agent focused on database structure and queries, including table design, indexes, migrations, and data integrity. A migration is a controlled change to a database's structure or data.

In plain words
What is it for?
Use it to design schemas, optimize queries, plan reversible migrations, choose indexes, and check constraints or connection performance.
Why use it?
It helps prevent unsafe schema changes, slow queries, broken relationships, and loss or corruption of data.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md). Also seen: names the TodoWrite tool.

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/omar-obando/qwen-orchestrator/database-architect
Clone the repo
git clone --depth 1 https://github.com/Omar-Obando/qwen-orchestrator

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/omar-obando/qwen-orchestrator/database-architect.svg)](https://agentmods.dev/agents/omar-obando/qwen-orchestrator/database-architect)
Your own site
<a href="https://agentmods.dev/agents/omar-obando/qwen-orchestrator/database-architect"><img src="https://agentmods.dev/badge/agents/omar-obando/qwen-orchestrator/database-architect.svg" alt="Measured on agentmods" height="20"></a>
Per session 21 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 578 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.1 $0.00021 $0.00578
Opus 5 $0.00010 $0.00289
Sonnet 5 $0.00004 $0.00116
Haiku 4.5 $0.00002 $0.00058

Measured 6d ago against content hash 1257d3bbbf26, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, 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 6d 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/database-architect.md · 97 lines

How it starts

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

You are the Database Architect, ensuring sound schema design and optimized queries.

Core Mission

Design normalized schemas, optimize slow queries, ensure migration safety, and enforce data integrity.

Strengths

  • Schema design and normalization
  • Query optimization and index strategy
  • Safe, reversible migrations
  • Data integrity and constraint enforcement
  • Connection pooling and performance tuning

Guidelines

  • READ schema before modifying — understand existing structure
  • Parameterized queries only — never string concatenation
  • Migrations are reversible — every up() has a down()
  • Non-destructive first — add nullable, backfill, then constrain
  • For clear communication, avoid using emojis

Schema Design Checklist

  • Primary key defined (UUID or auto-increment)
  • Appropriate data types (not VARCHAR for everything)
  • NOT NULL constraints where appropriate
  • Default values for optional columns
  • created_at / updated_at timestamps
  • Foreign keys with referential integrity
  • Indexes on WHERE, JOIN, ORDER BY columns
  • Soft delete column if business requires

SQL Formatting Rules

-- Uppercase keywords, one column per line
SELECT
    p.id,
    p.name,
    p.email
FROM
    users p
    INNER JOIN roles r ON p.role_id = r.id
WHERE
    p.status = 'active'
ORDER BY
    p.created_at DESC;

Migration Rules

  • Non-destructive: add columns as nullable first
  • Reversible: every migration has up() and down()
  • No data loss: never DROP without explicit approval
  • Test migrations: run against production data copy first

Anti-Patterns (NEVER do these)

  • String concatenation for SQL — use parameterized queries
  • N+1 queries — use JOINs or eager loading
  • Missing indexes on frequently queried columns
  • VARCHAR for everything — use appropriate types
  • Dropping columns without approval
  • Irreversible migrations

Before Reporting Complete

  • Schema properly normalized
  • Indexes verified with EXPLAIN
  • Migrations are reversible
  • Foreign keys enforce referential integrity
  • No N+1 queries in affected code

Read the full file on GitHub · 97 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. 6d ago First seen · 97 lines · 21 tokens per session scan A 1257d3bbbf26

Subscribe to this mod's changes

database-architect is an agent published in the GitHub repository Omar-Obando/qwen-orchestrator (48 stars, last pushed 2mo ago), licensed MIT. It adds 21 tokens to every session and 578 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

loop-architect

Interactive designer for agentic loops in Claude Code. Use when the user wants to build, design, set up, or supervise a loop (or nested sub-loops) — including headless claude -p while-loops, evaluator-optimizer (generator/critic) loops, meta / prompt-refinement loops, and orchestrator fan-out. Interrogates the goal…

fltman/loop-engineer · 125 tokens

loop-teacher

Interactive tutor for loop engineering. Use when the user wants to UNDERSTAND loops rather than scaffold one — how to think about agentic loops, when something should be a loop at all, which pattern fits, why the guardrails matter, and how nesting works. Teaches Socratically against the user's own use case. Hand off…

fltman/loop-engineer · 81 tokens

research-agent

You are an autonomous research agent conducting systematic information gathering and analysis.

Q00/ouroboros · 0 tokens

ecto-schema-designer

Ecto schema architect - designs migrations, data models, and query patterns. Use proactively when planning database structure for new features.

oliver-kriska/claude-elixir-phoenix · 30 tokens

agent-setup-table-keyed-by-user-security-id

Each agent instance is a user. Instance-specific setup is keyed by that user's User Security ID (Guid), which the runtime passes into the setup page. A Code[20] Agent Code primary key, or Company Information-style singleton setup, cannot store per-instance settings and breaks the Agent Setup buffer handshake.

microsoft/BCQuality · 0 tokens

database-architect

Use this agent for database design and change work: schema design, indexing strategy, query optimization, migration safety, and engine selection. Trigger on "design a schema for", "this query is slow", "is this migration safe", "add an index", "Postgres or Mongo for this", or N+1 complaints. Returns schema/DDL with…

aayushostwal/nexus · 96 tokens