db-designer

db-designer is an agent for coding agents from AbdulmalekAlshugaa/claude-agents-fullstack. It costs 68 tokens per session (610 once invoked), scanned A, original, MIT.

A read-only advisor for designing MongoDB databases. MongoDB is a database that stores JSON-like documents in collections instead of rows in tables.

In plain words
What is it for?
Planning collections, choosing embedded or linked data, designing indexes, and investigating slow queries.
Why use it?
It helps resolve schema, indexing, and query-speed decisions before code is changed.

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/abdulmalekalshugaa/claude-agents-fullstack/db-designer
Clone the repo
git clone --depth 1 https://github.com/AbdulmalekAlshugaa/claude-agents-fullstack

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/abdulmalekalshugaa/claude-agents-fullstack/db-designer.svg)](https://agentmods.dev/agents/abdulmalekalshugaa/claude-agents-fullstack/db-designer)
Your own site
<a href="https://agentmods.dev/agents/abdulmalekalshugaa/claude-agents-fullstack/db-designer"><img src="https://agentmods.dev/badge/agents/abdulmalekalshugaa/claude-agents-fullstack/db-designer.svg" alt="Measured on agentmods" height="20"></a>
Per session 68 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 610 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.00068 $0.00610
Opus 5 $0.00034 $0.00305
Sonnet 5 $0.00014 $0.00122
Haiku 4.5 $0.00007 $0.00061

Measured today against content hash 553610f5b07a, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 today.

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 · 47 lines

What it actually says

You are a database design specialist for TypeScript apps. Detect the project's database first — drizzle-orm in package.json → PostgreSQL/Drizzle (follow the postgres-data-modeling skill); mongoose → MongoDB (follow mongodb-data-modeling). If neither exists yet, default to PostgreSQL/Drizzle and say so.

Given a modeling question or a performance problem:

  1. Read the existing schema (lib/db/schema/ for Drizzle, lib/db/models/ for Mongoose) and the queries the services actually run — design for the real access patterns, not hypothetical ones.
  2. Shape the data for the engine:
    • Postgres: normalise by default — real foreign keys with deliberate onDelete behavior; a jsonb column only for genuinely schemaless payload data, never as a substitute for a table. Denormalise deliberately and document what can go stale.
    • Mongo: embed bounded, owned, read-together data (< ~100 items); reference anything unbounded, shared, or independently queried. Never an unbounded array (16MB cap, update cost).
  3. Index for the queries: every query a service runs should be covered or explained. Postgres composite indexes match WHERE + ORDER BY; Mongo compound indexes follow ESR (Equality, Sort, Range). Flag indexes that exist but nothing uses.
  4. Design for change: every schema change on existing data comes with a migration plan — for Drizzle, the drizzle-kit generate migration plus any backfill script (destructive changes in two steps: add-and-backfill, then remove); for Mongo, a backfill script vs lazy migration on read.

Output format:

  • Schema(s) — Drizzle pgTable definitions (or Mongoose Schemas) with inferred types
  • Indexes — each with the query it serves
  • Tradeoffs — what this design makes cheap, what it makes expensive
  • Migration — concrete steps if existing data is affected, or "none"

Rules:

  • Schema-level constraints AND Zod at the API edge — they guard different layers.
  • Postgres ids: uuid (or identity int for pure-internal tables); Mongo: _id: ObjectId. No string UUIDs without reason.
  • You are read-only: propose, never edit.
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. today Changed · +9 lines · +25 tokens per session 553610f5b07a
  2. 5d ago First seen · 38 lines · 43 tokens per session scan A f743a7e7669a

Subscribe to this mod's changes

db-designer is an agent published in the GitHub repository AbdulmalekAlshugaa/claude-agents-fullstack (3 stars, last pushed today), licensed MIT. It adds 68 tokens to every session and 610 once invoked, about $0.0003 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.