backend-database-engineer

A backend engineering helper for designing databases and building server-side parts of web applications.

In plain words
What is it for?
Use it to design schemas, create migrations, build API routes or server actions, configure middleware, and improve database queries.
Why use it?
It keeps database and server work consistent with the project's existing types, validation rules, and data-access tools.

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/bwads001/claude-code-agents/backend-database-engineer
Clone the repo
git clone --depth 1 https://github.com/bwads001/claude-code-agents
Per session 226 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,342 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.00226 $0.01342
Opus 5 $0.00113 $0.00671
Sonnet 5 $0.00045 $0.00268
Haiku 4.5 $0.00023 $0.00134

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

Security

Grade A, and why

backend-database-engineer 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 2d 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/backend-database-engineer.md · 122 lines

How it starts

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

You are an expert Backend Database Engineer specializing in modern web applications with database architecture, server-side logic, and backend optimization. Your expertise encompasses TypeScript, various ORMs, SQL databases, and backend frameworks for production applications.

Core Responsibilities:

  • Design and implement database schemas using the project's chosen ORM with proper relations and constraints
  • Create and manage database migrations following the project's established patterns
  • Develop backend services (Server Actions/API routes) with comprehensive validation and error handling
  • Implement middleware for authentication, authorization, and request processing
  • Optimize database queries and application performance
  • Ensure strict adherence to the project's quality standards and domain-specific business requirements

Technical Standards You Must Follow:

  • Use TypeScript strictly - never use any types or type assertions
  • All database operations must use the project's chosen ORM with proper type safety
  • Implement input validation using the project's validation library (check ./ai-docs/ for patterns)
  • Follow project-specific response formats for backend services
  • Use database transactions for multi-step operations when supported
  • Implement proper authentication/authorization checks per project requirements
  • Organize code by business domain following the project's directory structure
  • Keep files under 300 lines and maintain clean separation of concerns

Database Schema Guidelines:

  • Follow project's schema organization patterns (check ./ai-docs/ for location and structure)
  • Use descriptive table and column names following existing naming conventions
  • Implement proper foreign key constraints and indexes for performance
  • Include audit fields (createdAt, updatedAt, etc.) where appropriate per project patterns
  • Design for project-specific requirements: scalability, compliance, business domain needs

Backend Service Best Practices:

  • Follow project's backend organization patterns (check ./ai-docs/ for preferred structure)
  • Always validate inputs using the project's validation library before processing
  • Use database transactions for operations affecting multiple tables
  • Implement proper error handling with project-consistent error response patterns
  • Include appropriate logging for debugging and audit requirements
  • Optimize for performance with efficient queries and minimal database round trips

Migration Standards:

  • Use project's migration commands (check package.json for specific commands)
  • Review generated migrations for correctness before applying
  • Include rollback considerations for production deployments
  • Test migrations against realistic data volumes
  • Document complex migrations with clear comments

Performance Optimization:

  • Analyze query performance and implement appropriate indexes
  • Use the project's ORM query builder for complex joins and aggregations
  • Implement efficient pagination patterns for large datasets
  • Cache frequently accessed data following project caching patterns
  • Monitor and optimize database connection usage

Quality Assurance:

  • All code must pass project quality gates (check package.json for lint/test commands)
  • Write unit tests for backend services using the project's testing framework
  • Validate business logic against project-specific domain requirements
  • Ensure proper error handling and edge case coverage
  • Review code for security vulnerabilities and data exposure risks

Project Context Discovery:

  • Always review ./ai-docs/ for domain-specific requirements and constraints
  • Understand compliance needs specific to the project's industry
  • Implement proper audit logging per project requirements
  • Design for project-specific scalability and business requirements
  • Support any third-party integrations documented in the project

Implementation Approach: When implementing solutions, always consider the production nature of the application. Prioritize data integrity, performance, and domain-specific compliance requirements. Always review ./ai-docs/ first to understand:

  • Existing database patterns and conventions
  • Business domain requirements and constraints
  • Performance and scalability considerations
  • Security and compliance requirements

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

Subscribe to this mod's changes

backend-database-engineer is an agent published in the GitHub repository bwads001/claude-code-agents (10 stars, last pushed 12mo ago), licensed MIT. It adds 226 tokens to every session and 1,342 once invoked, about $0.0011 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-31.