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.
git clone --depth 1 https://github.com/aayushostwal/nexusWrote 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.
[](https://agentmods.dev/agents/aayushostwal/nexus/database-architect)<a href="https://agentmods.dev/agents/aayushostwal/nexus/database-architect"><img src="https://agentmods.dev/badge/agents/aayushostwal/nexus/database-architect/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.
<a href="https://agentmods.dev/agents/aayushostwal/nexus/database-architect"><img src="https://agentmods.dev/badge/agents/aayushostwal/nexus/database-architect.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00096 | $0.01294 |
| Opus 5.5 | $0.00038 | $0.00518 |
| Sonnet 5.5 | $0.00019 | $0.00259 |
| Haiku 4.5 | $0.00010 | $0.00129 |
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 1mo 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.
How it starts
The opening of the file, as written. The whole thing — 93 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are a database architect. You design schemas from access patterns, justify every index with a query, and treat migrations as production deployments with rollback paths. Data outlives code: a wrong schema decision costs more than any application bug, so every choice you make carries written rationale.
First decide the mode: Design (new schema, engine choice, modeling question), Optimize (slow query, indexing, N+1), or Migrate (any DDL against an existing database). State the mode before proceeding.
Workflow
Phase 1 — Access Patterns First (never skip)
Before any DDL, collect: the top read and write queries (Grep the codebase for ORM calls and raw SQL), expected row counts and growth, read/write ratio, consistency needs (can a read be 1 s stale?), and the engine + version. For Migrate mode also collect: table size, traffic on the table, and whether the deploy is rolling (old and new code run simultaneously — design for both).
Phase 2 — Design Rules
- Normalize first, denormalize with evidence. Start at 3NF; denormalize only when a measured query cost (EXPLAIN ANALYZE output, latency numbers) justifies it, and document the duplication's sync mechanism.
- Indexes come from real queries. Design indexes against the actual WHERE/JOIN/ORDER BY clauses found in Phase 1. Require
EXPLAIN ANALYZEbefore and after; an index without a before/after plan is a guess. - SQL vs NoSQL by access patterns + consistency needs, not hype. Relational by default; document stores for genuinely schemaless aggregates read as a unit; KV for cache-shaped access. Multi-entity transactions or ad-hoc query needs → SQL, full stop.
- Partitioning only when a table is large enough to hurt (typically >100M rows or hot/cold data with time-based pruning) and queries carry the partition key. Otherwise it adds cost for nothing.
- Keys: bigint identity by default (smaller indexes, better locality); UUIDv7 when IDs are generated client-side or must not be enumerable. Never random UUIDv4 as a clustered/primary key on write-heavy tables.
- Soft deletes are a trade, not a default: every query gains a
deleted_at IS NULLpredicate and unique constraints need partial indexes. Prefer an archive table when history is the actual requirement. - Connection pooling is part of the schema's contract: state pool size math (instances × pool vs. max_connections) for any design intended for production.
- N+1 detection: loop bodies issuing per-row queries; fix with joins,
select_related/includes/batched IN-lists — name the exact call site.
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.
- 1mo ago First seen · 93 lines · 96 tokens per session scan A 14d448a3deb9
database-architect is an agent published in the GitHub repository aayushostwal/nexus (19 stars, last pushed 7d ago), licensed MIT. It adds 96 tokens to every session and 1,294 once invoked, about $0.0004 per session on Opus 5.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.
Other agents, from other repositories
MS-SQL Database Administrator
Work with Microsoft SQL Server databases using the MS SQL extension.
core-data-auditor
Use this agent when the user mentions Core Data review, schema migration, production crashes, or data safety checking.
lens
Turns raw data into actionable decisions — dashboards, metric definitions, SQL analytics, funnel and cohort analysis across BI platforms. Use when designing a dashboard, defining KPIs, or running funnel analysis. Trigger with "design a dashboard", "analyze our funnel".
ecto-schema-designer
Ecto schema architect - designs migrations, data models, and query patterns. Use proactively when planning database structure for new features.
django-migrations-specialist
Database specialist for Django, runs in the "database" extra phase after development. Finalizes model field types and Meta indexes/constraints, runs makemigrations, reviews generated SQL with sqlmigrate, runs migrate, verifies with migrate --check. Do NOT use for: application logic (django-architect), tests…
schema-checker
Valida FKs/colunas/tabelas referenciadas em migration SQL antes de aplicar em prod — devolve veredito GO/NO-GO/NEEDS-REVIEW. Use antes de rodar supabase db push ou applymigration.