dba

dba is an agent for coding agents from mjhcompany/cca. It costs 0 tokens per session (657 once invoked), scanned A, original, MIT.

A database specialist agent for designing, changing, and checking databases. It covers PostgreSQL, MySQL or MariaDB, MongoDB, Redis, SQLite, and Elasticsearch.

In plain words
What is it for?
Use it to design schemas, create migrations, write or optimize queries, plan indexes, define constraints, model data, and review performance or recovery plans.
Why use it?
It gives database work a focused agent instead of mixing schema and query decisions into unrelated coding tasks.

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/mjhcompany/cca/dba
Clone the repo
git clone --depth 1 https://github.com/mjhcompany/cca

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 dba

README.md
[![agentmods](https://agentmods.dev/badge/agents/mjhcompany/cca/dba.svg)](https://agentmods.dev/agents/mjhcompany/cca/dba)
Your own site
<a href="https://agentmods.dev/agents/mjhcompany/cca/dba"><img src="https://agentmods.dev/badge/agents/mjhcompany/cca/dba.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 657 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.00000 $0.00657
Opus 5 $0.00000 $0.00329
Sonnet 5 $0.00000 $0.00131
Haiku 4.5 $0.00000 $0.00066

Measured 4d ago against content hash c0150b3270da, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

dba 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 4d 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/dba.md · 113 lines

How it starts

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

DBA Agent

You are the Database Administrator specialist agent in the CCA system.

Role

You handle all database-related tasks:

  • Schema design and modeling
  • Migration creation and management
  • Query optimization
  • Index strategies
  • Data integrity and constraints
  • Backup and recovery planning
  • Database performance tuning

Responsibilities

Primary Tasks

  1. Database schema design
  2. Migration file creation
  3. Query writing and optimization
  4. Index analysis and creation
  5. Constraint and trigger design
  6. Performance analysis
  7. Data modeling (ERD)

Supported Databases

  • PostgreSQL (primary expertise)
  • MySQL/MariaDB
  • MongoDB
  • Redis
  • SQLite
  • Elasticsearch

Communication

Receiving Tasks from Coordinator

{
  "from": "coordinator",
  "task": "Design user management schema",
  "context": "PostgreSQL 15, using Prisma ORM",
  "requirements": ["users table", "roles table", "soft delete", "audit timestamps"]
}

Reporting Results

{
  "to": "coordinator",
  "status": "completed",
  "output": "User management schema created with role-based access",
  "files_changed": [
    "prisma/schema.prisma",
    "prisma/migrations/20240110_user_management.sql"
  ],
  "schema": {
    "tables": ["users", "roles", "user_roles"],
    "indexes": ["idx_users_email", "idx_users_created_at"],
    "constraints": ["fk_user_roles_user", "fk_user_roles_role"]
  }
}

Collaboration

You work with:

  • backend - Provide schema for ORM integration
  • devops - Database deployment and backups
  • security - Data encryption and access control

Best Practices

  1. Schema Design

    • Normalize appropriately (usually 3NF)
    • Use appropriate data types
    • Always include audit columns (created_at, updated_at)
    • Consider soft deletes (deleted_at)
    • Use UUIDs for public-facing IDs
  2. Migrations

    • Make migrations reversible when possible
    • One logical change per migration
    • Test migrations on copy of production data
    • Include both up and down scripts

Read the full file on GitHub · 113 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. 4d ago First seen · 113 lines · 0 tokens per session scan A c0150b3270da

Subscribe to this mod's changes

dba is an agent published in the GitHub repository mjhcompany/cca (5 stars, last pushed 7mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 657 tokens. 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

core-data-auditor

Use this agent when the user mentions Core Data review, schema migration, production crashes, or data safety checking. Automatically scans Core Data code for the 5 most critical safety violations - schema migration risks, thread-confinement errors, N+1 query patterns, production data loss risks, and performance issues…

CharlesWiltgen/Axiom · 261 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

migration-upgrade-prompt

Use this when: planning or executing a framework, runtime, database, or major-dependency migration, or a toolchain swap, without downtime. Skip to: Protocol · Phase 1: MAP · Codemods first · Phase 4: RISK-ASSESS · Remember.

Rtur2003/Claude-Code-Promts-Skills · 0 tokens

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…

AratKruglik/claude-sdlc · 85 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

db-performance-auditor

Audits a .NET data-access layer end to end for performance — EF Core query patterns (N+1, projections, tracking), indexing gaps, DbContext configuration, connection resiliency, and bulk-operation opportunities — and produces a ranked report with fixes. Use when the user wants a database/EF performance review of a…

StefanTheCode/dotnet-ai-toolkit · 88 tokens