database

database is an agent for Claude Code from shahtuyakov/claude-setup. It costs 56 tokens per session (1,541 once invoked), scanned A, original, MIT.

A database development agent for storing and retrieving application data. It works with PostgreSQL, MongoDB, Prisma, and Drizzle ORM, which is a code layer for working with databases.

In plain words
What is it for?
Use it to design schemas, write migrations, optimize queries, choose indexes, configure an ORM, and implement data access.
Why use it?
It helps plan how data is organized and address slow or difficult database operations before they cause problems in the application.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md). Also seen: model in frontmatter.

Good fit Use it to design schemas, write migrations, optimize queries, choose indexes, configure an ORM, and implement data access.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/shahtuyakov/claude-setup/database
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/shahtuyakov/claude-setup

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

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

Your own site · 80×15
<a href="https://agentmods.dev/agents/shahtuyakov/claude-setup/database"><img src="https://agentmods.dev/badge/agents/shahtuyakov/claude-setup/database.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 56 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,541 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.00056 $0.01541
Opus 5.5 $0.00022 $0.00616
Sonnet 5.5 $0.00011 $0.00308
Haiku 4.5 $0.00006 $0.00154

Measured 1mo ago against content hash 6503ccda5860, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

database 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.

agents/database.md · 219 lines

How it starts

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

Database Agent

Role

Design database schemas, write migrations, optimize queries, and implement data access patterns.

Hub Architecture

This agent operates in a Hub Architecture pattern. If you need another agent's help:

Request delegation by including this in your response:

{
  "delegation_request": {
    "agent": "backend",
    "reason": "Need API data requirements before designing schema",
    "prompt": "Document data shapes needed for user profile endpoints",
    "blocking": true
  }
}

The hub (main conversation) will spawn the requested agent and return results to continue your work.

Workflow

Step 1: Read Context

  • .agents/architect/current-plan.json - Current task details (JSON format)
  • .agents/backend/notes.md - API requirements, data shapes
  • .agents/database/notes.md - Previous database decisions
  • Project files (schema.prisma, drizzle.config.ts, migrations/)

Step 2: Setup Worktree

git worktree add -b database/[task-id] .worktrees/database main
cd .worktrees/database

Step 3: Load Skills

Based on task type, load from database-patterns:

  • Schema design → references/schema-design.md
  • PostgreSQL specifics → references/postgresql-patterns.md
  • MongoDB specifics → references/mongodb-patterns.md
  • ORM usage → references/orm-patterns.md
  • Migrations → references/migrations.md
  • Security → references/security.md

Step 4: Detect Project Setup

File/Folder Indicates
schema.prisma Prisma ORM
drizzle.config.ts Drizzle ORM
src/db/schema.ts Drizzle schema
migrations/ Migration history
docker-compose.yml with postgres PostgreSQL
docker-compose.yml with mongo MongoDB

Step 5: Implement

Follow patterns from loaded skills:

  • Design normalized schemas (3NF minimum)
  • Create appropriate indexes
  • Write backward-compatible migrations
  • Use parameterized queries (never string concatenation)
  • Implement proper constraints and validations
  • Document schema decisions

Read the full file on GitHub · 219 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 · 219 lines · 56 tokens per session scan A 6503ccda5860

Subscribe to this mod's changes

database is an agent published in the GitHub repository shahtuyakov/claude-setup (13 stars, last pushed 9mo ago), licensed MIT. It adds 56 tokens to every session and 1,541 once invoked, about $0.0002 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.

Related

Other agents, from other repositories

db-postgres-expert

Use this agent when you need expert PostgreSQL database management, optimization, and architecture guidance. This agent specializes in PostgreSQL 16+ features, advanced SQL queries, indexing strategies, performance tuning, replication, and high-availability configurations. Examples: Context: User needs to optimize…

andisab/swe-marketplace · 403 tokens

database-performance-optimizer

Use this agent when you need to optimize database performance for B2B applications at enterprise scale. This agent specializes in multi-tenant database optimization, query performance tuning, indexing strategies, connection pooling, and database scaling for SaaS platforms. Handles PostgreSQL, MySQL, MongoDB, and cloud…

Najeebullah3124/awesome-claude-universe · 0 tokens

database-reviewer

PostgreSQL database specialist for query optimization, schema design, security, and performance. Use PROACTIVELY when writing SQL, creating migrations, designing schemas, or troubleshooting database performance. Incorporates Supabase best practices.

affaan-m/ECC · 48 tokens

database-reviewer

Use when writing SQL queries, creating migrations, or troubleshooting database performance in Supabase/PostgreSQL projects. Reviews indexes, RLS policies, schema types, N+1 patterns. Read-only reviewer with EXPLAIN ANALYZE capability.

sangrokjung/claude-forge · 52 tokens

db-migration-reviewer

Database migration safety specialist. Activates when migrations/ files are detected in a PR or feature branch. Checks lock duration, rollback strategy, zero-downtime patterns, PII column handling, and index creation safety. Writes docs/migrations/MIGRATE-{slug}.md. Blocks deploy if no rollback path exists.

avelikiy/great_cto · 69 tokens

database-reviewer

PostgreSQL database specialist for query optimization, schema design, security, and performance. Use PROACTIVELY when writing SQL, creating migrations, designing schemas, or troubleshooting database performance. Incorporates Supabase best practices.

vibeeval/vibecosystem · 48 tokens