db-specialist

db-specialist is an agent for Claude Code from mnzralee/claude-multi-agent-architecture. It costs 47 tokens per session (1,957 once invoked), scanned A, original, MIT.

An agent for database schemas, migrations, and ORM operations. An ORM is a programming tool that maps application code to database tables; a migration is a controlled change to a database structure.

In plain words
What is it for?
Use it to organise schemas, plan migrations, handle ORM clients, and review database operations across tools such as Prisma, Drizzle, TypeORM, Alembic, Flyway, or Liquibase.
Why use it?
It helps prevent data-integrity mistakes and confusion between generating application code, changing a schema, and applying changes to a database.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter.

Part of the claude-multi-agent-architecture plugin — 18 skills, 19 agents, 3 hooks shipped together

Good fit Use it to organise schemas, plan migrations, handle ORM clients, and review database operations across tools such as Prisma, Drizzle, TypeORM, Alembic, Flyway, or Liquibase.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/mnzralee/claude-multi-agent-architecture/db-specialist
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/mnzralee/claude-multi-agent-architecture

Made for: Claude Code.

Or install claude-multi-agent-architecture, the plugin that ships this one along with the rest of its 18 skills, 19 agents, 3 hooks.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/agents/mnzralee/claude-multi-agent-architecture/db-specialist"><img src="https://agentmods.dev/badge/agents/mnzralee/claude-multi-agent-architecture/db-specialist.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 47 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,957 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.00047 $0.01957
Opus 5 $0.00023 $0.00979
Sonnet 5 $0.00009 $0.00391
Haiku 4.5 $0.00005 $0.00196

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

Security

Grade A, and why

db-specialist 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 10d 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/db-specialist.md · 146 lines

How it starts

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

DB Specialist Agent

Purpose

Specialist for schema management, migrations, and database operations across any ORM or migration framework. The examples below use Prisma (TypeScript) for concreteness; the same discipline applies to any ORM or migration tool: Drizzle, TypeORM, Alembic, Flyway, Liquibase, and so on.

Key Knowledge

Schema Structure

A well-organized schema separates generator/datasource configuration from domain models. A typical layout for an ORM that supports multi-file schemas looks like:

<db-package>/
├── schema.<ext>          # Main entry-point (used for client generation)
└── schema/               # Domain-organized sub-schemas
    ├── _config.<ext>     # Generator + datasource (ONE file only)
    ├── _shared/          # Shared enums / base types
    ├── users/            # User, Profile, Session
    ├── orders/           # Order, LineItem, Payment
    ├── identity/         # AuthCredential, Permission, Role
    ├── catalog/          # Product, Category, Variant
    └── ...

Keep one entry-point file at the root. Domain sub-schemas are for human organization; the toolchain may or may not auto-discover them depending on its version.

Critical Rule: generate vs migrate

These two commands (or their equivalents in your toolchain) are NOT interchangeable:

  • generate (or "codegen") processes the schema file you point it at and writes a typed client library. It does NOT touch the live database.
  • migrate / db push applies SQL changes to a database. In development, db push (Prisma) or sync (other ORMs) is fast but schema-only. For production, always use migration files.

For build pipelines and Docker images: all models that the application imports at runtime MUST be present in the schema that the generate step processes. If your ORM uses multi-file auto-discovery at runtime but a single-file path for the build, keep both in sync or the generated client will be missing models.

Common Data-Integrity Gotchas

  1. Untyped client access ((db as any).modelName in TypeScript, raw getattr(session, 'Model') in Python) produces undefined or AttributeError if the model was not present during generation. Fix the generate step; do not work around it with casts.
  2. updateMany matching 0 rows is NOT an error in most ORMs. The operation succeeds silently with a count of 0. Always check the affected-row count and raise an application-level error if your business logic requires at least one match.
  3. .catch() inside a transaction does not roll back a database-level abort. In PostgreSQL, a failed statement inside a transaction puts the connection into an aborted state; catching the error in application code does not help. Use existence checks or save-points instead of catch-blocks inside transactions.
  4. Migration recorded does not mean migration applied. The migrations table (_prisma_migrations, alembic_version, flyway_schema_history, etc.) records what the toolchain believes ran. Verify the actual database columns with an information-schema query before trusting the record.
  5. Enum additions vs removals: adding a value to an enum is typically safe (ALTER TYPE ... ADD VALUE in PostgreSQL). Removing a value requires dropping and recreating the type, which is destructive. Plan enum removal as a multi-step migration (add replacement, migrate data, drop old value in a later release).

Read the full file on GitHub · 146 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. 10d ago First seen · 146 lines · 47 tokens per session scan A 07470590c622

Subscribe to this mod's changes

db-specialist is an agent published in the GitHub repository mnzralee/claude-multi-agent-architecture (6 stars, last pushed 1mo ago), licensed MIT. It adds 47 tokens to every session and 1,957 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

backend-connector

Expert Supabase integration that connects UI to real database securely. Delegate when: database connection, authentication, RLS policies, real-time features. Self-sufficient: analyzes existing code, generates schema from types, implements with security-first approach - all autonomously.

wasintoh/toh-framework · 56 tokens

messaging-cache

Fully autonomous pentest sub agent using MCP-backed fastcmp toolbox for message brokers and caches (Redis/RabbitMQ/Kafka/NATS/MQTT/ActiveMQ/ZooKeeper) covering unauthenticated exposure, management APIs, and RCE-adjacent primitives.

ASCIT31/Dark-Moon · 56 tokens

nosql-databases

Fully autonomous pentest sub agent using MCP-backed fastcmp toolbox for NoSQL data stores (MongoDB/Elasticsearch/Neo4j/CouchDB: unauthenticated access, role and index enumeration, server-side scripting, snapshot and file primitives, document extraction).

ASCIT31/Dark-Moon · 0 tokens

sql-databases

Fully autonomous pentest sub agent using MCP-backed fastcmp toolbox for relational databases (PostgreSQL/MySQL-MariaDB/MSSQL/Oracle) covering roles-grants, network exposure, file-read-write and command-execution primitives, and data extraction.

ASCIT31/Dark-Moon · 55 tokens

db-schema

Read-only database schema introspection for any project. Returns concise schema summaries (table → columns → PK → indexes → FKs) from the live DB, migrations, or config. Hand off when the main thread is about to grep through migration files or run multiple SHOW CREATE TABLE round-trips. Never writes, never runs…

Xakki/ai-agents-skills · 69 tokens

ciel-data-guild

CIEL's elite data and storage guild. Specializes in SQL, NoSQL, ClickHouse, Kafka, and Data Architecture.

jxoesneon/Ciel · 32 tokens