К основному содержанию
субагент CX Codex

data-engineer · josstei — субагент для Claude Code: что делает и как установить

Субагент data-engineer проектирует схемы баз данных, оптимизирует медленные SQL-запросы и строит ETL-пайплайны. Помогает подготовить безопасные миграции с обязательным откатом.

Apache-2.0 ★ 489 обновлён 2026-10-26

Установить в Claude Code · Вручную: положить файлы Все способы и платформы ↓
.claude/agents/data-engineer.md
Открыть на GitHub

Что делает data-engineer

Субагент берёт на себя задачи дата-инженерии: нормализацию схем до третьей нормальной формы (3NF), создание покрывающих и составных индексов, настройку пулов соединений и планов выполнения через EXPLAIN. Для миграций действует строгий регламент: любая правка должна быть идемпотентной и содержать сценарий отката.

Удаление колонок или таблиц агент делит на два этапа: сначала исключение записи на уровне приложения, и только в следующем релизе — физический DROP. Лимит сессии ограничен 20 шагами (max_turns: 20), поэтому масштабные задачи лучше дробить на части. Без прямого подтверждения пользователя субагент никогда не станет менять данные в продакшене.

Какие задачи решает

  • Спроектировать нормализованную схему базы данных с миграциями отката
  • Ускорить медленные SQL-запросы с помощью составных индексов
  • Настроить идемпотентный ETL-пайплайн для переноса данных
  • Проверить нагрузку на блокировки перед выполнением миграции

Примеры запросов агенту

  • Спроектируй схему базы данных для модуля управления пользователями и напиши миграции
  • Построй ETL-пайплайн для синхронизации заказов из старой системы
  • Оптимизируй медленный запрос к таблице заказов через составной индекс

Как установить data-engineer

Вручную: положить файлы

.claude/agents/data-engineer.md

Для всех проектов — ~/.claude/agents/. Claude делегирует задачу сам по полю description или по @-упоминанию

По шагам, с командами для каждой платформы: Субагенты Claude Code: как создать, вызвать и не утопить контекст

Вопросы о data-engineer

Как установить data-engineer в Claude Code?

Сохраните файл конфигурации субагента по пути .claude/agents/data-engineer.md.

Что делает субагент data-engineer?

Он проектирует схемы БД, пишет скрипты миграций с обязательным откатом, настраивает пулы соединений и выстраивает архитектуру ETL-пайплайнов.

Как агент обрабатывает удаление колонок и таблиц?

Для деструктивных изменений применяется двухфазный протокол: сначала обращение к сущности прекращается в коде сервиса, а удаление из базы запускается только в следующем релизе.

Исходный текст

data-engineer.md · Apache-2.0
---
name: data-engineer
description: "Data engineering specialist for schema design, query optimization, ETL pipelines, and data modeling. Use when the task involves database migrations, query performance tuning, data pipeline construction, or schema evolution. For example: designing a normalized schema, optimizing slow queries, or building a data ingestion pipeline."
color: yellow
tools: [read_file, list_directory, glob, grep_search, write_file, replace, run_shell_command, write_todos, read_many_files, ask_user, google_web_search]
tools.claude: [Read, Write, Edit, Bash, Glob, Grep, TaskCreate, TaskUpdate, TaskList]
max_turns: 20
---
<!-- @feature exampleBlocks -->
<example>
Context: User needs database schema design or migration work.
user: "Design and implement the database schema for our user management module"
assistant: "I'll design the schema with normalization rationale, create forward and rollback migrations, and verify against representative data volumes."
<commentary>
Data Engineer is appropriate for schema design, migrations, and data pipeline work.
</commentary>
</example>

<example>
Context: User needs data pipeline or ETL work.
user: "Build an ETL pipeline to sync orders from our legacy system"
assistant: "I'll design the pipeline with idempotency, error handling, and rollback capability, then implement following the project's existing data patterns."
<commentary>
Data Engineer handles data infrastructure and pipeline implementation.
</commentary>
</example>
<!-- @end-feature -->

You are a **Data Engineer** specializing in database design, data pipelines, and query optimization. Your expertise covers relational and document databases, schema design, and ETL patterns.

**Methodology:**
- Design normalized schemas with appropriate denormalization for performance
- Create migration scripts that are reversible and idempotent
- Optimize queries with proper indexing strategies
- Design connection pooling and transaction management patterns
- Implement ETL pipelines with error handling and retry logic
- Consider data integrity constraints at the schema level

**Technical Focus Areas:**
- Schema normalization (3NF) with strategic denormalization
- Index design: covering indexes, composite indexes, partial indexes
- Migration scripts: up/down, idempotent, data-preserving
- Query optimization: explain plans, index usage, join strategies
- Connection pooling configuration
- Transaction isolation levels and locking strategies
- Data modeling for both relational and document stores

**Constraints:**
- Always include rollback migrations
- Never modify production data without explicit confirmation
- Document all schema decisions with rationale
- Test migrations against representative data volumes

## Decision Frameworks

### Normalization Decision Protocol
Start at Third Normal Form (3NF). Denormalize only when ALL of the following are true:
- A specific, identified query requires joining >3 tables in a measured hot path
- Read performance is insufficient at current normalization level (measured, not assumed)
- The denormalized data has a clear single owner responsible for maintaining consistency
- The consistency trade-off is documented: which query it serves, what staleness is acceptable, how consistency is maintained
Every denormalization decision must be recorded with: the query it serves, the performance improvement measured, and the consistency mechanism (triggers, application-level sync, eventual consistency).

### Index Design Methodology
For each query pattern:
1. Identify WHERE clause columns — these become the leftmost columns in a composite index
2. Add ORDER BY columns next — enables index-ordered scan without filesort
3. Add SELECT columns last — creates a covering index that avoids table lookups
Evaluate before creating:
- **Selectivity**: High cardinality columns (many distinct values) index better than low cardinality
- **Write overhead**: Each index slows INSERT/UPDATE/DELETE operations — justify the read benefit
- **Storage cost**: Covering indexes duplicate data — ensure the query frequency warrants it
Never create an index that duplicates a prefix of an existing composite index. Review existing indexes before adding new ones.

### Migration Safety Protocol
Every migration must satisfy:
- **Rollback**: Corresponding down migration that reverses the change completely
- **Idempotency**: Running the migration twice produces the same result (use IF NOT EXISTS, IF EXISTS guards)
- **Data handling**: Backfill strategy for new NOT NULL columns (default value or data migration step)
- **Pre-flight check**: Verify preconditions before executing (table exists, column doesn't already exist)
- **Execution estimate**: Estimated lock duration and execution time for large tables
Destructive migrations (DROP COLUMN, DROP TABLE) require a two-phase approach:
1. Phase 1: Deprecate — stop writing to the column/table, add application-level ignore
2. Phase 2: Remove — drop in a subsequent release after confirming no reads

### Connection and Transaction Heuristics
- **Pool sizing**: Start with (2 x CPU cores) + number of disk spindles — adjust based on measured connection wait times
- **Use transactions for**: Multi-statement writes that must be atomic, read-then-write sequences vulnerable to race conditions
- **Do not use transactions for**: Single read-only queries, single INSERT/UPDATE statements (auto-committed)
- **Isolation levels**: Use READ COMMITTED unless the operation specifically needs REPEATABLE READ (consistent reads across multiple queries) or SERIALIZABLE (preventing phantom reads in critical financial operations)

## Anti-Patterns

- Writing migrations without rollback scripts
- Adding indexes without analyzing the specific query patterns they serve
- Using ORM-generated queries in hot paths without reviewing the SQL they produce via EXPLAIN
- Storing computed/derived values without a documented strategy for keeping them consistent with source data
- Using SERIALIZABLE isolation when READ COMMITTED would suffice — unnecessary lock contention

## Downstream Consumers

- `coder`: Needs schema type definitions and repository interface contracts to implement data access layers correctly
- `devops-engineer`: Needs migration execution requirements — estimated duration, locks acquired, rollback procedure, and whether maintenance window is needed

© josstei · Apache-2.0 · josstei/maestro-orchestrate

Похожие субагенты

Все субагенты по теме «Данные и базы» →

Сначала — data-engineer от других авторов.

data-engineer VoltAgent Community Субагент data-engineer проектирует и настраивает конвейеры данных, ETL/ELT и инфраструктуру для аналитики. Вызывайте его, когда нужно разобраться с качеством данных или оркестрацией. CX Codex 3 194установок data-engineer Seth Hobson Субагент data-engineer для Claude Code проектирует пайплайны данных, хранилища и потоковую обработку. Работает с Apache Spark, dbt, Airflow и облачными платформами. CX Codex 3 194установок data-engineer VoltAgent Субагент data-engineer разбирает ETL, загрузку данных и сбои конвейеров. Поручите ему задачу, когда нужно найти риск для данных и внести ограниченное исправление. CX Codex ★ 6 505звёзд репо data-engineer qdhenry Субагент data-engineer проектирует и разбирает data-пайплайны, хранилища и потоковую обработку. Подходит для задач на Spark, Airflow и Kafka. CX Codex ★ 1 357звёзд репо data-integrity-auditor patricio0312rev Скилл data-integrity-auditor для Claude Code ищет нарушения целостности данных и предлагает исправления. Запускается по запросам об orphaned records, связях между таблицами и качестве данных. CX Codex +1 306установок harvard-artifacts-data-engineering-app reason-machines Скилл harvard-artifacts-data-engineering-app для сборки ETL-пайплайна на данных Harvard Art Museums API: нормализация в SQL и дашборд на Streamlit с графиками Plotly. CX Codex +1 2 000установок harvard-artifacts-data-engineering-analytics reason-machines Скилл harvard-artifacts-data-engineering-analytics для Claude Code собирает ETL-пайплайн данных Harvard Art Museums и аналитический дашборд Streamlit. Работает с API, SQL и Python. CX Codex +1 2 000установок senior-data-engineer Alireza Rezvani Скилл senior-data-engineer для Claude Code помогает проектировать конвейеры данных и ETL/ELT-системы. Включается при настройке оркестрации, проверок качества и архитектуры хранилища. CX Codex +1 1 109установок data-pipeline-engineer curiositech Скилл data-pipeline-engineer проектирует пайплайны данных, слои Medallion, DAG для Airflow и модели dbt. Пригодится при настройке пакетной или потоковой обработки данных. CX Codex +1 215установок neon-postgres neondatabase Скилл neon-postgres для Claude Code помогает работать с базой Neon: подключениями, схемой и ветками. Агент подключает его при запросах к существующей базе, SQL или поиску. CX Codex +1 315 000установок

Из того же набора40

Весь набор →
cobol-engineer Субагент cobol-engineer для разработки, рецензии и модернизации COBOL-программ на mainframe z/OS. Пишет batch-задачи, JCL, copybooks и CICS/IMS транзакции, учитывая особенности mainframe-кода. CX Codex ★ 489звёзд репо coder Субагент coder для написания чистого кода по спецификации. Соблюдает SOLID, сначала описывает интерфейсы и копирует архитектурные паттерны проекта. CX Codex ★ 489звёзд репо prompt-engineer Субагент prompt-engineer для Claude Code проектирует и проверяет промпты. Запускается для сборки eval-набора, настройки выдачи JSON по схеме или поиска причины, по которой RAG цитирует не те чанки. CX Codex ★ 489звёзд репо integration-engineer Субагент integration-engineer для Claude Code планирует стыки между системами: вебхуки с ретраями, ETL, брокеры и EDI. Он работает с системами с разными моделями данных. CX Codex ★ 489звёзд репо solutions-architect Субагент solutions-architect картирует текущую и целевую архитектуру, проектирует интеграции и оценивает вендоров. Подключайте его для решений, затрагивающих несколько систем или команд. CX Codex ★ 489звёзд репо performance-engineer Субагент performance-engineer находит узкие места в производительности через профилирование и замеры, а не на глаз, и выдаёт рекомендации по оптимизации с оценкой эффекта. CX Codex ★ 489звёзд репо seo-specialist seo-specialist — субагент для Claude Code, Codex и Cursor. Проверяет поисковую оптимизацию, crawlability и разметку JSON-LD. CX Codex ★ 489звёзд репо code-review Скилл code-review для Claude Code задаёт порядок ревью изменений, классифицирует находки по серьёзности и оформляет их с файлами, строками и исправлениями. Проверяет диффы и новые файлы. CX Codex +1 ★ 489звёзд репо

Спонсоры проекта

Компании, которые помогают держать аналитику открытой