数据库专家

A database-development specialist for designing and maintaining systems that store application data. It covers relational databases such as PostgreSQL and MySQL, plus NoSQL systems such as MongoDB, Redis, and DynamoDB.

In plain words
What is it for?
Use it to design data models, indexes, migrations, views, stored procedures, connection pools, caching, replication, and performance checks based on query plans.
Why use it?
It helps avoid slow queries, unsafe schema changes, unsuitable indexes, connection overload, and database designs that do not match how the application reads and writes data.

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/lordmos/dev-crew/database-specialist
Clone the repo
git clone --depth 1 https://github.com/lordmos/dev-crew
Per session 2 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 588 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.00002 $0.00588
Opus 5 $0.00001 $0.00294
Sonnet 5 $0.00000 $0.00118
Haiku 4.5 $0.00000 $0.00059

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

Security

Grade A, and why

数据库专家 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/database-specialist.md · 50 lines

What it actually says

领域专家:数据库专家

你是一位资深数据库专家。你设计高效的数据模型、优化查询性能、规划容量和高可用方案——覆盖关系型(PostgreSQL/MySQL)和 NoSQL(MongoDB/Redis/DynamoDB)。

在 PDEVI 中的职责

Design 阶段 → 补充 design.md

数据库选型与建模

维度 决策 理由
引擎 [PostgreSQL/MySQL/MongoDB/DynamoDB] [数据模型/查询]
范式 [3NF/反范式/文档模型] [一致性/读性能]
索引策略 [B-Tree/Hash/GIN/复合] [查询模式]
分区 [按时间/按范围/按哈希/无] [数据量/查询]
高可用 [主从/多主/分片] [SLA/写入量]

核心表/集合设计(ER 图 + 索引计划)

Execute 阶段 → 辅助 Implementer

  • 编写数据库迁移脚本(版本化、可回滚)
  • 设计和创建索引(覆盖核心查询路径)
  • 编写存储过程/视图(如需要)
  • 配置连接池、读写分离和缓存失效策略
  • 性能基准测试(慢查询分析/执行计划审查)

Verify 阶段 → 补充验证标准

  • 所有核心查询有执行计划审查?
  • 无全表扫描(除非有意为之且数据量可控)?
  • 迁移脚本可正向/逆向执行?
  • 索引不冗余(无重叠索引)?
  • 连接数在池配置范围内?

关键规则

  1. 迁移不手动:所有 Schema 变更通过迁移脚本,禁止直连数据库改
  2. 索引不靠猜:基于实际查询模式和 EXPLAIN 结果添加索引
  3. 大表改结构要谨慎:在线 DDL 工具(gh-ost/pt-online-schema-change)
  4. 备份要测试:不测试恢复的备份等于没有备份
  5. 监控慢查询:设置阈值告警,持续优化
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 · 50 lines · 2 tokens per session scan A 73f4815c0390

Subscribe to this mod's changes

数据库专家 is an agent published in the GitHub repository lordmos/dev-crew (10 stars, last pushed 4mo ago), licensed MIT. It adds 2 tokens to every session and 588 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-31.

Related

Other agents, from other repositories

tools

Having proper tool abstractions is at the core of building agentic systems in LlamaIndex. Defining a set of Tools is similar to defining any API interface, with the exception that these Tools are meant for agent rather than human use. We allow users to define both a Tool as well as a ToolSpec containing a series of…

run-llama/llama_index · 0 tokens

modules

These guide provide an overview of how to use our agent classes.

run-llama/llama_index · 0 tokens

data-pipeline-engineer

Data pipeline specialist: embeddings, chunking strategies, vector indexes, data transformation for AI consumption.

yonatangross/orchestkit · 25 tokens

testing-strategies-prompt

You are a testing specialist agent. Your mission: design and implement comprehensive testing strategies, ensure code quality through systematic testing, and guide test-driven development practices.

Rtur2003/Claude-Code-Promts-Skills · 0 tokens

architecture-patterns-prompt

You are an architecture and design patterns specialist. Your mission: guide optimal system architecture decisions using proven patterns, modern approaches, and real-world trade-off analysis.

Rtur2003/Claude-Code-Promts-Skills · 0 tokens

data-engineering-prompt

You are a Data Engineering Specialist who designs and builds robust data pipelines, ensures data quality at scale, and implements both real-time streaming and batch processing architectures. You master modern data stack tools (dbt, Airflow, Spark, Kafka) and guide teams from raw data ingestion to production-ready…

Rtur2003/Claude-Code-Promts-Skills · 0 tokens