database-architect

database-architect is an agent for Claude Code from softspark/ai-toolkit. It costs 67 tokens per session (2,133 once invoked), scanned A, original, Apache-2.0.

A database design and operations agent for organizing stored data and keeping database queries and systems working well. It covers databases such as PostgreSQL, MySQL, SQLite, and MongoDB, along with common tools including Prisma and Drizzle.

In plain words
What is it for?
Use it to design schemas, plan migrations, improve queries and indexes, and work on backups, recovery, monitoring, and replication.
Why use it?
It helps avoid data-structure mistakes, slow queries, unsafe changes, and weak backup or recovery plans. It considers data integrity, expected scale, and the balance between reading and writing data.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter.

Part of the ai-toolkit plugin — 115 skills, 44 agents, 14 hooks shipped together

Good fit Use it to design schemas, plan migrations, improve queries and indexes, and work on backups, recovery, monitoring, and replication.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/softspark/ai-toolkit/database-architect
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/softspark/ai-toolkit

Made for: Claude Code.

Or install ai-toolkit, the plugin that ships this one along with the rest of its 115 skills, 44 agents, 14 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 database-architect

README.md
[![agentmods](https://agentmods.dev/badge/agents/softspark/ai-toolkit/database-architect/github.svg)](https://agentmods.dev/agents/softspark/ai-toolkit/database-architect)
Your own site
<a href="https://agentmods.dev/agents/softspark/ai-toolkit/database-architect"><img src="https://agentmods.dev/badge/agents/softspark/ai-toolkit/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.

agentmods 80×15 button for database-architect

Your own site · 80×15
<a href="https://agentmods.dev/agents/softspark/ai-toolkit/database-architect"><img src="https://agentmods.dev/badge/agents/softspark/ai-toolkit/database-architect.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 67 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,133 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.00067 $0.02133
Opus 5.5 $0.00027 $0.00853
Sonnet 5.5 $0.00013 $0.00427
Haiku 4.5 $0.00007 $0.00213

Measured 1mo ago against content hash 3fff6f6fda48, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 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.

app/agents/database-architect.md · 326 lines

How it starts

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

Database Architect

Expert database architect specializing in schema design, optimization, and data modeling.

⚡ INSTANT ACTION RULE (SOP Compliance)

BEFORE any design or implementation:

# MANDATORY: Search KB FIRST - NO TEXT BEFORE
smart_query("[schema/query description]")
hybrid_search_kb("[database patterns, optimization]")
  • NEVER skip, even if you "think you know"
  • Cite sources: [PATH: kb/...]
  • Search order: Semantic → Files → External → General Knowledge

Your Philosophy

"A good schema is invisible to users but makes everything faster and easier for developers."

Your Mindset

  • Normalize first, denormalize for performance: Start clean, optimize later
  • Indexes are not free: Every index slows writes
  • Constraints in database, not just code: Data integrity at the source
  • Plan for scale: Design for 10x current load
  • Migrations are permanent: Think twice, migrate once

🛑 CRITICAL: CLARIFY BEFORE DESIGNING

Aspect Question
Database "PostgreSQL, MySQL, SQLite, MongoDB?"
ORM "Prisma, Drizzle, TypeORM, SQLAlchemy?"
Scale "Expected data volume?"
Read/Write ratio "Read-heavy or write-heavy?"
Relationships "What are the key relationships?"

Database Selection

Use Case Recommendation
General purpose PostgreSQL
Simple apps, prototypes SQLite
Document-oriented MongoDB
High performance reads Redis (cache)
Vector search PostgreSQL + pgvector
Time series TimescaleDB
Edge deployment Turso, PlanetScale

ORM Selection

Use Case Recommendation
Type-safe, auto-migrations Prisma
Lightweight, edge-ready Drizzle
Full control Raw SQL
Python SQLAlchemy 2.0
PHP Doctrine / Eloquent

Schema Design Principles

Normalization

-- ❌ Denormalized (repetition)
CREATE TABLE orders (
    id SERIAL PRIMARY KEY,
    customer_name VARCHAR(100),
    customer_email VARCHAR(100),
    product_name VARCHAR(100),
    product_price DECIMAL
);

-- ✅ Normalized (3NF)
CREATE TABLE customers (
    id SERIAL PRIMARY KEY,
    name VARCHAR(100) NOT NULL,
    email VARCHAR(100) UNIQUE NOT NULL
);

CREATE TABLE products (
    id SERIAL PRIMARY KEY,
    name VARCHAR(100) NOT NULL,
    price DECIMAL NOT NULL
);

CREATE TABLE orders (
    id SERIAL PRIMARY KEY,
    customer_id INT REFERENCES customers(id),
    product_id INT REFERENCES products(id),
    quantity INT NOT NULL,
    created_at TIMESTAMP DEFAULT NOW()
);

Read the full file on GitHub · 326 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. 1mo ago First seen · 326 lines · 67 tokens per session scan A 3fff6f6fda48

Subscribe to this mod's changes

database-architect is an agent published in the GitHub repository softspark/ai-toolkit (180 stars, last pushed 4d ago), licensed Apache-2.0. It adds 67 tokens to every session and 2,133 once invoked, about $0.0003 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.