ecosystem-database

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

🗄️ Database Domain Ecosystem

🗄️ 数据库领域生态系统

Welcome to the
database
domain ecosystem. This directory contains specialized agentic skills for database schema design, query optimization, data migration, and security (SQL & NoSQL).
For Orchestrator Agents (
task-decomposer
,
parallel-planner
):
When asked to plan a database-related task, you MUST consult the workflows below. Do not hallucinate steps; map your plan strictly to these available skills in the order defined.

欢迎来到
database
领域生态系统。本目录包含针对数据库架构设计、查询优化、数据迁移以及安全(SQL & NoSQL)的专业化Agent技能。
针对编排器Agent(
task-decomposer
parallel-planner
):
当需要规划数据库相关任务时,你必须参考以下工作流。不得凭空捏造步骤;必须严格按照定义的顺序,基于现有技能制定计划。

🔄 Standard Workflows & Handoffs

🔄 标准工作流与任务交接

1. New Schema Design Flow

1. 新架构设计流程

When the user asks to "design a database", "create tables", or "model the data", execute these skills sequentially:
  1. @schema-architect
    -> Creates the ERDs, tables, relationships, and normalizes the models.
  2. @access-policy-designer
    -> Designs Row-Level Security (RLS) or application-level access controls.
  3. @seed-data-generator
    -> Generates realistic, varied placeholder data for development and testing.
当用户提出“设计数据库”“创建数据表”或“数据建模”需求时,按顺序执行以下技能:
  1. @schema-architect
    -> 创建ERD、数据表、关系并规范化数据模型。
  2. @access-policy-designer
    -> 设计行级安全(RLS)或应用级访问控制策略。
  3. @seed-data-generator
    -> 生成用于开发和测试的真实多样的占位数据。

2. Performance Optimization Flow

2. 性能优化流程

When the user asks to "fix a slow query", "optimize the database", or "why is the DB lagging":
  1. @query-explainer
    -> Analyzes the execution plans (e.g.,
    EXPLAIN ANALYZE
    ) to locate bottlenecks.
  2. @index-advisor
    -> Recommends optimal covering indexes, composites, or partition keys to solve the bottleneck.
  3. @query-budget-enforcer
    -> Sets up mechanisms to detect and alert on N+1 queries or heavy reads in the future.
当用户提出“修复慢查询”“优化数据库”或“数据库为什么卡顿”需求时:
  1. @query-explainer
    -> 分析执行计划(如
    EXPLAIN ANALYZE
    )以定位性能瓶颈。
  2. @index-advisor
    -> 推荐最优的覆盖索引、复合索引或分区键来解决瓶颈问题。
  3. @query-budget-enforcer
    -> 建立机制以检测并预警未来出现的N+1查询或大量读操作。

3. Database Evolution Flow

3. 数据库演进流程

When the user asks to "update the database", "change a table", or "migrate data":
  1. @schema-diff-analyzer
    -> Compares the old schema and new schema to detect potential data loss or locks.
  2. @migration-strategist
    -> Designs the zero-downtime migration scripts (up/down) and backfill jobs.
当用户提出“更新数据库”“修改数据表”或“数据迁移”需求时:
  1. @schema-diff-analyzer
    -> 对比新旧架构,检测潜在的数据丢失或锁风险。
  2. @migration-strategist
    -> 设计零停机迁移脚本(升级/回滚)和回填任务。

4. Compliance & Observability Flow

4. 合规性与可观测性流程

When the user asks about "data privacy", "GDPR", or "where does this data go":
  1. @data-masker
    -> Identifies PII (Personally Identifiable Information) and designs obfuscation/encryption strategies.
  2. @data-lineage-tracer
    -> Maps how data flows from ingestion to the data warehouse.
当用户询问“数据隐私”“GDPR”或“数据流向”相关问题时:
  1. @data-masker
    -> 识别PII(个人可识别信息)并设计混淆/加密策略。
  2. @data-lineage-tracer
    -> 绘制数据从 ingestion 到数据仓库的流转路径。

5. Infrastructure & Scaling Flow

5. 基础设施与扩容流程

When the user asks to "scale database connections", "setup pgbouncer", "fix too many connections", or "configure connection pool":
  1. @pgbouncer-architect
    -> Analyzes workload, calculates optimal pool sizes, selects pooling mode, and generates PgBouncer configurations.

当用户提出“扩容数据库连接”“配置pgbouncer”“修复连接数过多问题”或“配置连接池”需求时:
  1. @pgbouncer-architect
    -> 分析工作负载,计算最优池大小,选择池化模式并生成PgBouncer配置。

🧠 Core Philosophy

🧠 核心理念

Database design is focused on data integrity, scalable reads/writes, and strict security constraints. Every skill in this domain is programmed to defend against data corruption and insecure data exposure. Never prioritize feature delivery over data safety.

数据库设计聚焦于数据完整性、可扩展的读写能力以及严格的安全约束。本领域的每一项技能都旨在防范数据损坏和不安全的数据泄露。绝不能为了功能交付而牺牲数据安全。

🚀 Installation & Orchestration Instructions

🚀 安装与编排说明

As an AI Agent reading this ecosystem file, you must actively guide the user to install the missing skills for the selected workflow.
To install all skills within this ecosystem at once, you must execute or instruct the user to execute the provided installation script:
bash
python skills/ecosystem-database/scripts/install_all.py
Execution Rule: Do not attempt to perform the tasks of these skills yourself. Your job is to install them and hand off the execution to the appropriate skill, or instruct the user to trigger the newly installed skills in order.
作为读取本生态系统文件的AI Agent,你必须主动引导用户安装所选工作流中缺失的技能。
如需一次性安装本生态系统中的所有技能,你必须执行或指导用户执行以下安装脚本:
bash
python skills/ecosystem-database/scripts/install_all.py
执行规则: 不得尝试自行执行这些技能的任务。你的职责是安装这些技能,并将执行任务交接给对应的技能,或指导用户按顺序触发新安装的技能。