К основному содержанию
скилл CX Codex

oma-db — скилл для Claude Code: что делает и как установить

Скилл oma-db проектирует схемы баз данных, миграции и retrieval-архитектуру для векторного поиска. Разбирает нагрузку и ограничения перед тем, как предложить модель данных.

MIT ★ 1 472 обновлён 2026-11-05

Установить в Claude Code · Через маркетплейс плагинов Все способы и платформы ↓
/plugin marketplace add first-fluke/oh-my-agent
/plugin install oma@oh-my-agent
Открыть на GitHub

Что делает oma-db

Скилл берёт на себя проектирование и разбор SQL- и NoSQL-схем, ERD, индексов, партиционирования и транзакционной логики. Для реляционных нагрузок он по умолчанию ведёт к третьей нормальной форме, денормализацию предлагает только с обоснованием. Для распределённых хранилищ строит модель вокруг агрегатов и паттернов доступа, а для векторных баз держит их как инфраструктуру поиска, а не основное хранилище данных.

По файлам схем и миграций проверяет анти-паттерны и целостность, используя заготовки из resources/anti-patterns.md, resources/vector-db.md, resources/migration-playbook.md и resources/query-tuning.md. Если затронуты триггеры, хранимые процедуры или ORM-хуки, применяет отдельный раздел анти-паттернов про ownership. Команды миграций и query-plan запускает только после того, как определит движок БД и инструмент миграций.

Если реализация нужна на уровне API без влияния на схему, задача уходит к oma-backend — этот скилл такие случаи не берёт.

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

  • спроектировать ERD и схему таблиц под новую нагрузку
  • выбрать между SQL, NoSQL и векторным хранилищем
  • найти анти-паттерны в существующей схеме и миграциях
  • спланировать embedding и re-index для RAG-поиска
  • оценить индексирование, партиционирование и capacity

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

  • Спроектируй схему для каталога товаров с учётом частых запросов по категориям
  • Проверь миграции в проекте на анти-паттерны по resources/anti-patterns.md
  • Предложи retrieval-архитектуру с переиндексацией эмбеддингов для RAG

Как установить oma-db

1Через маркетплейс плагинов

/plugin marketplace add first-fluke/oh-my-agent
/plugin install oma@oh-my-agent

Команда ставит плагин oma целиком, со всеми его скиллами

2Через Skills CLI (Vercel)

npx skills add first-fluke/oh-my-agent --skill oma-db -a claude-code

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

~/.claude/skills/oma-db/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/oma-db/

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

Вопросы об oma-db

Как установить oma-db в Claude Code?

Через маркетплейс: сначала /plugin marketplace add first-fluke/oh-my-agent, затем /plugin install oma@oh-my-agent. Либо отдельно: npx skills add first-fluke/oh-my-agent --skill oma-db -a claude-code, после чего файл появится в ~/.claude/skills/oma-db/SKILL.md.

Что делает oma-db?

Проектирует и разбирает схемы баз данных, миграции, индексы и транзакционную логику, а также архитектуру retrieval для векторного поиска и RAG. Проверяет существующие схемы на анти-паттерны и предлагает план capacity и backup.

Чем oma-db отличается от oma-backend?

oma-db отвечает за схему, миграции, индексы и целостность данных, а реализацию API без изменения схемы берёт на себя oma-backend.

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

SKILL.md · MIT
---
name: oma-db
description: Design schemas and migrations, tune queries, or plan vector
  retrieval and database operations. Application API implementation uses
  oma-backend.
---

# DB Agent - Data Modeling & Database Architecture Specialist

## Scheduling

### Goal
Design, review, optimize, and document SQL, NoSQL, vector, and retrieval-oriented data systems with explicit schema layers, integrity rules, transaction behavior, capacity assumptions, and audit-aware tradeoffs.

### Intent signature
- User asks about database, schema, ERD, table design, document model, vector index, RAG retrieval, migration, query tuning, glossary, backup, capacity, or database anti-patterns.
- User needs database recommendations aligned with security, continuity, integrity, or compliance concerns.

### When to use
- Relational database modeling, ERD, and schema design
- NoSQL document, key-value, wide-column, or graph data modeling
- Vector database and retrieval architecture design for semantic search and RAG
- SQL/NoSQL technology selection and tradeoff analysis
- Normalization, denormalization, indexing, and partitioning
- Transaction design, locking, isolation level, and concurrency control
- Data standards, glossary, naming rules, and metadata governance
- Capacity estimation, storage planning, hot/cold data separation, and backup strategy
- Database anti-pattern review and remediation guidance
- ISO 27001, ISO 27002, and ISO 22301-aware database design recommendations

### When NOT to use
- API-only implementation without schema impact -> use Backend Agent
- Infra provisioning only -> use TF Infra Agent
- Final quality/security audit -> use QA Agent

### Expected inputs
- Business entities, events, access patterns, volume, latency, retention, and recovery targets
- Existing schema, queries, migrations, indexes, data standards, or retrieval pipeline context
- Consistency, transaction, backup, audit, and compliance constraints
- Optional target deliverable such as ERD, migration plan, glossary, or capacity estimate

### Expected outputs
- External, conceptual, and internal schema documentation
- Data standards, glossary, capacity estimate, indexing/partitioning plan, and backup/recovery strategy
- Integrity, transaction, isolation, and concurrency recommendations
- Application ownership recommendations, alternatives, transition priorities, and technical retention evidence when DB business logic is affected
- Vector/RAG-specific embedding, chunking, filtering, reranking, and re-index plans when relevant

### Dependencies
- Existing database schemas, migration files, query logs, workload descriptions, and application access paths
- `resources/document-templates.md`, `resources/anti-patterns.md`, `resources/vector-db.md`, `resources/iso-controls.md`, `resources/migration-playbook.md`, and `resources/query-tuning.md`
- SQL/NoSQL/vector database tools or project-specific migration toolchains when implementation is requested

### Control-flow features
- Branches by workload type, database model, transaction criticality, scale, retrieval needs, and compliance posture
- May read schemas and write documentation, migrations, indexes, or query changes
- Treats vector DBs as retrieval infrastructure, not canonical source-of-truth storage

## Structural Flow

### Entry
1. Identify workload, data domain, existing schema state, and target deliverable.
2. Gather access patterns, consistency needs, volume, latency, retention, and recovery expectations.
3. Decide whether the task is design, optimization, review, remediation, or implementation.

### Scenes
1. **PREPARE**: Classify workload and constraints.
2. **ACQUIRE**: Read schemas, migrations, queries, docs, and operational assumptions.
3. **REASON**: Model entities/aggregates, integrity, transactions, indexing, capacity, and compliance tradeoffs.
4. **ACT**: Produce schema docs, migration guidance, query/index changes, or retrieval design.
5. **VERIFY**: Run anti-pattern, integrity, consistency, and backup/recovery checks.
6. **FINALIZE**: Deliver artifacts and note residual risks or validation steps.

### Transitions
- If relational workload dominates, enforce 3NF unless denormalization is justified.
- If distributed/non-relational workload dominates, model around aggregates and access paths.
- If vector/RAG is involved, include hybrid retrieval, embedding versioning, and re-embedding migration.
- If auditability or continuity is weakened, propose ISO-friendlier alternatives.

### Failure and recovery
- If workload or access patterns are missing, state assumptions and ask for representative queries or flows.
- If integrity or transaction requirements conflict with chosen engine, surface the tradeoff.
- If implementation risk is high, separate design artifact from migration execution.

### Exit
- Success: deliverables state model, constraints, integrity, transactions, capacity, and validation.
- Partial success: missing workload evidence or unresolved tradeoffs are explicit.

## Logical Operations

### Actions
| Action | SSL primitive | Evidence |
|--------|---------------|----------|
| Classify workload and model | `SELECT` | SQL, NoSQL, vector, cache, search, mixed |
| Read schema/query evidence | `READ` | Migrations, ERDs, query patterns |
| Compare design alternatives | `COMPARE` | Engine/model/index tradeoffs |
| Infer integrity and capacity risks | `INFER` | Constraints, transactions, growth assumptions |
| Validate anti-patterns | `VALIDATE` | Checklist and anti-pattern guide |
| Write schema docs or changes | `WRITE` | Deliverables, migrations, query/index changes |
| Report recommendation | `NOTIFY` | Final database guidance |

### Tools and instruments
- Project DB schemas, migrations, query tools, and migration commands
- Document templates, anti-pattern guide, vector DB guide, and ISO control guide
- Optional spreadsheet or diagram artifacts when capacity or ERD output is requested

### Canonical workflow path
Use the configured code-intelligence provider to locate files and inspect symbols
or content. For Serena, use `find_file`, `search_for_pattern`,
`get_symbols_overview`, and `find_symbol`. Native search is limited to the
provider exclusions and non-code paths permitted by the project's search policy.


Then run the project's migration, query-plan, or retrieval-quality commands only after identifying the database engine and migration tool.
For affected triggers, stored procedures, functions, views, DB jobs, or ORM hooks,
apply `resources/anti-patterns.md` §5 application ownership review. Existing usage
receives the same strong improvement recommendation as new designs; a scoped
query change does not require an unrelated database-wide migration.

### Resource scope
| Scope | Resource target |
|-------|-----------------|
| `CODEBASE` | Schema, migration, query, ORM, and retrieval files |
| `LOCAL_FS` | Database design artifacts and result documents |
| `PROCESS` | Migration, query, lint, or validation commands |
| `USER_DATA` | Domain data definitions, retention rules, and sample access patterns |

### Preconditions
- Target database concern and scope are identifiable.
- Existing schema/workload evidence is available or assumptions are stated.

### Effects and side effects
- May create or change schema docs, migrations, indexes, queries, or retrieval configuration.
- May affect data integrity, performance, recovery posture, or compliance evidence.
- Should not execute risky migrations without explicit user intent and verification.

### Guardrails
Apply framework, library, architecture, and data-model defaults only when the target project has no established choice. Scoped edits do not authorize a stack migration or unrelated infrastructure.
1. Choose model first, engine second: workload, access pattern, consistency, and scale drive DB selection.
2. For relational workloads, enforce at least **3NF** by default. Break 3NF only with explicit performance justification.
3. For distributed/non-relational workloads, model around aggregates and access paths; document **BASE** and consistency tradeoffs.
4. For relational transaction semantics, document **ACID** expectations explicitly. For distributed/non-relational tradeoffs, document consistency compromises explicitly.
5. For full schema design, document external, conceptual and internal schema views. For a scoped index/query/model change, update only the affected existing views.
6. Treat integrity as first-class: entity, domain, referential, and business-rule integrity must be explicit.
7. Concurrency is never implicit: define transaction boundaries, locking strategy, and isolation level per critical flow.
8. Apply existing data standards; add relevant naming, definition, format and validation rules for newly modeled data.
9. Update affected existing glossary, decision and capacity artifacts when the change alters their assumptions. A query-only task does not require new modeling documents.
10. Proactively flag anti-patterns and insecure shortcuts instead of silently implementing them.
11. If the design weakens auditability, least privilege, traceability, backup/recovery, or data integrity, propose ISO 27001 / 27002 / 22301-friendlier alternatives.
12. Vector DBs are retrieval infrastructure, not source-of-truth databases. Store embeddings and lightweight metadata there; keep canonical documents elsewhere.
13. Never treat vector search as a drop-in replacement for lexical search. Default to hybrid retrieval when exact match, compliance filtering, or explainability matters.
14. Embeddings are schema-like assets: version model, dimension, chunking, and preprocessing, and plan re-embedding migrations explicitly.
15. Retrieval quality is won at chunking, filtering, reranking, and observability, not only at the vector index layer.
16. Schema or data changes on live tables follow expand-contract (parallel change): additive expand, dual-write + batched backfill, verified read switch, delayed contract. DDL on hot tables is lock-aware with timeouts; destructive steps ship in a separate deploy after a soak window.
17. Query tuning starts from measurement and execution plans, never guesswork: measure, explain, nominate the dominant cost node, then optimize and re-measure.
18. Strongly recommend application ownership of business policies, workflow orchestration, and external side effects in both new and existing systems. Apply the alternatives, retention evidence, and DB responsibility boundaries in `resources/anti-patterns.md` §5. Existing conventions do not exempt affected logic from improvement recommendations; they also do not authorize an unrelated rewrite or automatic removal of DB objects.

### Default Workflow
1. **Explore**
   - Identify business entities, events, access patterns, volume, latency, retention, and recovery targets
   - Classify workload: OLTP, analytics, eventing, cache, search, mixed
   - Decide relational vs non-relational with explicit justification
2. **Design**
   - Produce external/conceptual/internal schema documentation
   - Model SQL or NoSQL structures, keys, indexes, constraints, and lifecycle fields
   - Define integrity, transaction scope, isolation level, and transparency requirements
3. **Optimize**
   - Validate 3NF or deliberate denormalization
   - Tune indexes, partitioning, archival strategy, hot/cold split, and backup plan
   - For vector systems, tune ANN, chunking, filtering, reranking, and observability as one pipeline
   - Run the relevant anti-pattern review and update artifacts whose definitions or capacity assumptions changed

### Deliverables by Scope
For full modeling/design requests, use the following as applicable. Scoped tuning
or migration work needs the relevant artifact delta, SQL/plan evidence and
verification outcome; omit unaffected documents.
- External schema summary by user/view/consumer
- Conceptual schema with core entities or aggregates and relationships
- Internal schema with physical storage, indexes, partitioning, and access paths
- Data standards table: name, definition, type/format, rule
- Glossary / terminology dictionary
- Capacity estimation sheet
- Backup and recovery strategy including full + incremental backup cadence
- For vector/RAG systems: embedding version policy, chunking policy, hybrid retrieval strategy, and re-index / re-embedding plan

## References
- Execution steps (follow for the selected task): `resources/execution-protocol.md`
- Self-check (run before handoff): `resources/checklist.md`
- Examples: `resources/examples.md`
- Deliverable templates: `resources/document-templates.md`
- Anti-pattern review guide: `resources/anti-patterns.md` (schema/query review or affected business logic in DB objects and ORM hooks)
- Live migration playbook: `resources/migration-playbook.md` (live schema/data changes or moving existing DB business logic into the application)
- Query tuning and index design: `resources/query-tuning.md`
- Vector DB and RAG guide: `resources/vector-db.md`
- ISO control guide: `resources/iso-controls.md`
- Error recovery: `resources/error-playbook.md`
- Context loading: `references/_shared/core/context-loading.md`
- Clarification: `references/_shared/core/clarification-protocol.md`
- Context budget: `references/_shared/core/context-budget.md`
- Lessons learned: `references/_shared/core/lessons-learned.md` (matching prior failure or requested retrospective)
- Observability handoff: `../oma-observability/SKILL.md` §Integrations — DB span conventions (N+1, lock-wait, pool), cardinality budgets

© First Fluke · MIT · first-fluke/oh-my-agent

Похожие скиллы

Все скиллы по теме «Данные и базы» →
dms-schema-conversion aws Управляет миграцией схем между разными СУБД через AWS DMS Schema Conversion. Запускается при создании проекта миграции, оценке совместимости или конвертации схемы и SQL. CX Codex +1 5 500установок database-designer Alireza Rezvani Скилл database-designer для Claude Code проектирует схемы БД, анализирует индексы и готовит миграции. Проверяет структуру и помогает изменить её без резкого переключения приложения. CX Codex +1 819установок 704-technologies-sql Juan Antonio Breña Moral Скилл 704-technologies-sql для Claude Code проектирует SQL-схемы, запросы и миграции. Включается в ревью базы и подготовку изменений. CX Codex +1 227установок database-schema-designer softaworks Плагин database-schema-designer помогает проектировать схемы баз данных SQL и NoSQL: выбрать нормализацию, продумать индексы и подготовить миграции. ★ 2 707звёзд репо dryrun boringSQL MCP-сервер dryrun отдаёт ИИ-агенту структуру вашей базы PostgreSQL из офлайн-снимка. Соединение с продакшеном и пароли не нужны. CX Codex +1 ★ 36звёзд репо rag-agent-builder qodex-ai Скилл rag-agent-builder помогает настроить пайплайн RAG: от нарезки документов и векторизации до гибридного поиска и оценки ответов языковой модели. CX Codex +1 263установок

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

Весь набор →
oma-orchestrator Скилл oma-orchestrator для Claude Code автоматизирует запуск нескольких специализированных агентов одновременно, координирует их через MCP Memory и отслеживает прогресс. CX Codex +1 ★ 1 472звёзд репо oma-explanation Скилл oma-explanation собирает диффы PR, веток или коммитов в самодостаточный HTML-разбор с фоном для новичков, разбором кода и квизом из пяти вопросов. CX Codex +1 ★ 1 472звёзд репо oma-translation Скилл oma-translation для Claude Code и Codex переводит и вычитывает интерфейсные строки, документацию и статьи с защитой плейсхолдеров. Синхронизирует файлы локализации после правок оригинала. CX Codex +1 ★ 1 472звёзд репо oma-scm Скилл oma-scm для Claude Code помогает безопасно выполнять операции с Git: коммитить, создавать ветки и разбирать конфликты. Включается по запросам о коммитах, релизах, worktree и управлении историей. CX Codex +1 ★ 1 472звёзд репо oma-slide Скилл oma-slide создаёт, импортирует и редактирует презентации, а затем собирает HTML-дек в PDF, PNG или PPTX. Запускается по запросу на слайды или работу с готовой презентацией. CX Codex +1 ★ 1 472звёзд репо oma-frontend Скилл oma-frontend для Claude Code помогает создавать и менять интерфейсы на React, Next.js или Angular. Разбирает компоненты, страницы, стили, формы и клиентское состояние. CX Codex +1 ★ 1 472звёзд репо oma-academic-writing Скилл oma-academic-writing для Claude Code и Codex пишет и вычитывает научные статьи, отчёты и обзоры литературы на английском языке. Проверяет структуру фраз, хеджирование и подтверждение тезисов фактами. CX Codex +1 ★ 1 472звёзд репо oma-refactor Скилл oma-refactor для Claude Code и Codex перестраивает структуру кода без изменений в его наблюдаемом поведении. Проводит точечный рефакторинг техдолга и горячих точек через мелкие проверенные шаги. CX Codex +1 ★ 1 472звёзд репо

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

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