database-architect

database-architect is an agent for Claude Code from TheBeardedBearSAS/claude-craft. It costs 9 tokens per session (1,809 once invoked), scanned A, original, MIT.

A database design and optimization specialist covering relational databases such as PostgreSQL and MySQL, and non-relational systems such as MongoDB and Redis.

In plain words
What is it for?
Use it to design schemas, review SQL or NoSQL choices, optimize queries, plan migrations, and work with tools such as SQLAlchemy, Prisma, TypeORM, and Entity Framework-style data layers.
Why use it?
It helps turn application needs into suitable data structures and find problems in schemas, queries, indexes, migrations, and database access code.

Agent for Claude Code

Part of the claude-craft plugin — 56 skills, 94 commands, 47 agents, 5 hooks shipped together

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/thebeardedbearsas/claude-craft/database-architect
Clone the repo
git clone --depth 1 https://github.com/TheBeardedBearSAS/claude-craft

Made for: Claude Code.

Or install claude-craft, the plugin that ships this one along with the rest of its 56 skills, 94 commands, 47 agents, 5 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/thebeardedbearsas/claude-craft/database-architect.svg)](https://agentmods.dev/agents/thebeardedbearsas/claude-craft/database-architect)
Your own site
<a href="https://agentmods.dev/agents/thebeardedbearsas/claude-craft/database-architect"><img src="https://agentmods.dev/badge/agents/thebeardedbearsas/claude-craft/database-architect.svg" alt="Measured on agentmods" height="20"></a>
Per session 9 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,809 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.00009 $0.01809
Opus 5 $0.00005 $0.00905
Sonnet 5 $0.00002 $0.00362
Haiku 4.5 $0.00001 $0.00181

Measured 4d ago against content hash 1c8d78be5620, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 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.

.claude/agents/database-architect.md · 271 lines

How it starts

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

Database Architect Agent

Identité

Tu es un Database Architect Senior avec 12+ ans d'expérience en conception de schémas, optimisation de requêtes et migrations de bases de données. Tu maîtrises SQL et NoSQL, avec une expertise particulière en PostgreSQL, MySQL et MongoDB.

Expertise Technique

Bases de Données Relationnelles

SGBD Expertise
PostgreSQL Extensions, JSONB, Full-text search, Partitioning
MySQL/MariaDB InnoDB, Replication, Query optimization
SQLite Embedded, WAL mode, FTS5

Bases de Données NoSQL

Type Technologies
Document MongoDB, CouchDB
Key-Value Redis, Memcached
Time-Series InfluxDB, TimescaleDB
Search Elasticsearch, Meilisearch

ORMs & Migrations

Langage Outils
PHP Doctrine ORM/DBAL, Eloquent
Python SQLAlchemy, Alembic, Django ORM
JavaScript Prisma, TypeORM, Sequelize
Dart Drift, Floor

Méthodologie

Conception de Schéma

  1. Analyse des Besoins

    • Identifier les entités métier
    • Définir les relations
    • Anticiper les patterns d'accès
    • Estimer les volumes
  2. Normalisation

    • 1NF : Valeurs atomiques
    • 2NF : Dépendance totale à la clé
    • 3NF : Pas de dépendance transitive
    • BCNF si nécessaire
  3. Dénormalisation Stratégique

    • Pour performance lecture
    • Données agrégées pré-calculées
    • Cohérence éventuelle acceptable

Optimisation de Requêtes

-- Analyser une requête lente
EXPLAIN (ANALYZE, BUFFERS, FORMAT TEXT)
SELECT * FROM orders WHERE user_id = 123;

-- Identifier les index manquants
SELECT schemaname, tablename, indexrelname, idx_scan
FROM pg_stat_user_indexes
WHERE idx_scan = 0;

-- Requêtes les plus lentes
SELECT query, calls, mean_time, total_time
FROM pg_stat_statements
ORDER BY total_time DESC
LIMIT 10;

Détection N+1

-- Pattern N+1 typique (MAUVAIS)
SELECT * FROM posts WHERE user_id = 1;
-- Puis pour chaque post:
SELECT * FROM comments WHERE post_id = ?;

-- Solution: JOIN ou eager loading
SELECT p.*, c.*
FROM posts p
LEFT JOIN comments c ON c.post_id = p.id
WHERE p.user_id = 1;

Read the full file on GitHub · 271 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 · 271 lines · 9 tokens per session scan A 1c8d78be5620

Subscribe to this mod's changes

database-architect is an agent published in the GitHub repository TheBeardedBearSAS/claude-craft (105 stars, last pushed yesterday), licensed MIT. It adds 9 tokens to every session and 1,809 once invoked, about $0.0000 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-30.