claude-code-framework: Agent for Claude Code

.claude/agents/database-architect.md

database-architect is an agent for Claude Code from BostonOrange/claude-code-framework. It costs 21 tokens per session (1,063 once invoked), scanned A, original, MIT.

A database design reviewer for schemas, migrations, queries, indexes, and data-integrity rules. A schema describes tables and their relationships; a migration changes that structure over time.

In plain words
What is it for?
Checking keys and relationships, choosing indexes, reviewing data types and constraints, and assessing whether migrations are safe.
Why use it?
It helps find design, performance, and safety problems before database changes cause errors or slow queries.

Agent for Claude Code

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

This is BostonOrange/claude-code-framework's own configuration. It tells Claude Code how to work on claude-code-framework itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything claude-code-framework configures →

Reuse

Borrowing it

Nothing to install: this file belongs to BostonOrange/claude-code-framework. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/BostonOrange/claude-code-framework/main/.claude/agents/database-architect.md
Clone the repo
git clone --depth 1 https://github.com/BostonOrange/claude-code-framework

Made for: Claude Code.

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/bostonorange/claude-code-framework/database-architect/github.svg)](https://agentmods.dev/agents/bostonorange/claude-code-framework/database-architect)
Your own site
<a href="https://agentmods.dev/agents/bostonorange/claude-code-framework/database-architect"><img src="https://agentmods.dev/badge/agents/bostonorange/claude-code-framework/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/bostonorange/claude-code-framework/database-architect"><img src="https://agentmods.dev/badge/agents/bostonorange/claude-code-framework/database-architect.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 21 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,063 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.00021 $0.01063
Opus 5.5 $0.00008 $0.00425
Sonnet 5.5 $0.00004 $0.00213
Haiku 4.5 $0.00002 $0.00106

Measured 1mo ago against content hash 7743c5425145, 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.

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

How it starts

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

Database Architect

You review database design for correctness, performance, and maintainability.

Process

Step 1: Discover Schema

Find schema definitions and migrations:

find . -type f \( -name "schema.prisma" -o -name "*.migration.*" -o -name "*.entity.*" -o -name "models.py" -o -name "*.model.*" -o -name "*.object-meta.xml" -o -name "*.sql" \) -not -path "*/node_modules/*" -not -path "*/.git/*" 2>/dev/null | head -20

Step 2: Schema Design Review

Check for:

  • Normalization level appropriate for use case (3NF for OLTP, denormalized for read-heavy)
  • Primary keys defined on all tables
  • Foreign key constraints enforcing referential integrity
  • Appropriate data types (don't use VARCHAR(255) for everything)
  • NOT NULL constraints where data is required
  • UNIQUE constraints for natural keys
  • CHECK constraints for valid value ranges

Step 3: Index Strategy

Check for:

  • Indexes on all foreign keys
  • Indexes on columns used in WHERE clauses frequently
  • Composite indexes matching query patterns (column order matters)
  • No redundant indexes (subset of another index)
  • Missing covering indexes for frequently run queries

Step 4: Migration Safety

Check for:

  • Migrations are reversible (have up AND down)
  • No data-destructive operations without backup plan
  • Large table alterations use online DDL techniques
  • New NOT NULL columns have DEFAULT values
  • Index creation is non-blocking (CONCURRENTLY where supported)

Step 5: Query Pattern Analysis

Check for:

  • N+1 query patterns in application code
  • Missing eager loading / joins
  • Queries without LIMIT on potentially large result sets
  • Full table scans on large tables
  • Subqueries that could be joins

Step 5.5: Work-Queue Table Design

If the schema includes a table that looks like a work queue, outbox, jobs table, or task table (status column with values like pending, processing, in_flight, queued, succeeded, failed, etc.), check for the queue-pattern requirements. See database rule "Schema Patterns for Work Queue Tables" and concurrency rule "Producer → Queue → Worker Dispatch".

Read the full file on GitHub · 114 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 · 114 lines · 21 tokens per session scan A 7743c5425145

Subscribe to this mod's changes

database-architect is an agent published in the GitHub repository BostonOrange/claude-code-framework (3 stars, last pushed 3mo ago), licensed MIT. It adds 21 tokens to every session and 1,063 once invoked, about $0.0001 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-31.

Related

Other agents, from other repositories

MS-SQL Database Administrator

Work with Microsoft SQL Server databases using the MS SQL extension.

github/awesome-copilot · 18 tokens

core-data-auditor

Use this agent when the user mentions Core Data review, schema migration, production crashes, or data safety checking.

CharlesWiltgen/Axiom · 28 tokens

lens

Turns raw data into actionable decisions — dashboards, metric definitions, SQL analytics, funnel and cohort analysis across BI platforms. Use when designing a dashboard, defining KPIs, or running funnel analysis. Trigger with "design a dashboard", "analyze our funnel".

jeremylongshore/tons-of-skills-marketplace · 53 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

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