Skip to main content

oma-db

Design schemas and migrations, tune queries, or plan vector retrieval and database operations. Application API implementation uses oma-backend.

v1.0.0New

Unsigned, install at your own risk

Unverified

This skill has no cryptographic signature attached. We can't verify the contents match what the publisher intended.

Install this skill

No account required. Pick your tool, or use the command that detects it for you.

Run in your terminal. It detects your AI tool.

npx @skills-hub-ai/cli install oh-my-agent-agents-oma-db
Or get the file:
Browse all CLI commands →
Manual setup by platform

Claude Code

~/.claude/skills/oh-my-agent-agents-oma-db/SKILL.md

Setup guide →
0Save

Instructions

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
  • The project's query tools and its migration, query, lint, or validation commands
  • Optional spreadsheet or diagram artifacts when capacity or ERD output is requested

Structural Flow

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

Canonical workflow path

  1. Identify the workload, data domain, existing schema state, and target deliverable, and decide whether the task is design, optimization, review, remediation, or implementation. Gather business entities, events, access patterns, consistency needs, volume, latency, retention, and recovery targets; state assumptions where schema or workload evidence is unavailable.
  2. Locate files and inspect symbols or content with the configured code-intelligence provider. 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.
  3. Read the existing schemas, migrations, ERDs, queries, docs, and operational assumptions.
  4. Classify the workload (OLTP, analytics, eventing, cache, search, mixed) and the data model (SQL, NoSQL, vector, mixed). Decide relational vs non-relational with explicit justification, comparing engine, model, and index tradeoffs.
  5. Design: produce external/conceptual/internal schema documentation; model SQL or NoSQL structures (entities or aggregates), keys, indexes, constraints, and lifecycle fields; define integrity, transaction scope, isolation level, and transparency requirements.
  6. Optimize: validate 3NF or deliberate denormalization; tune indexes, partitioning, archival strategy, hot/cold split, capacity, and backup plan. For vector systems, tune ANN, chunking, filtering, reranking, and observability as one pipeline.
  7. 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.
  8. Run the project's migration, query-plan, or retrieval-quality commands only after identifying the database engine and migration tool.
  9. Run the relevant anti-pattern review (resources/anti-patterns.md) and the relevant resources/checklist.md sections, covering integrity, consistency, and backup/recovery. Update artifacts whose definitions or capacity assumptions changed.
  10. Deliver the artifacts (see Deliverables by Scope) and note residual risks or validation steps.

Resource scope and effects

Reads schema, migration, query, ORM, and retrieval files, along with domain data definitions, retention rules, and sample access patterns. May create or change schema docs, database design artifacts and result documents, migrations, indexes, queries, or retrieval configuration, and runs the project's migration, query, lint, or validation commands. A change may affect data integrity, performance, recovery posture, or compliance evidence. Do not execute a risky migration 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.

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 (check the sections relevant to the task before handoff): resources/checklist.md
  • Examples: resources/examples.md (worked outputs for full design, RAG retrieval, live-table remediation, and DB business-logic requests)
  • 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: ../_shared/core/context-loading.md
  • Clarification: ../_shared/core/clarification-protocol.md
  • Context budget: ../_shared/core/context-budget.md
  • Lessons learned: ../_shared/core/lessons-learned.md (matching prior failure or requested retrospective)
  • Observability handoff: ../oma-observability/SKILL.md §Integrations — DB span conventions (N+1, connection pool), cardinality budgets
This skill doesn’t include stateful context yet, instructions only. Learn about stateful skills.

Security

Loading security scan...

Reviews (0)

Browse all →

More from oh-my-agent

View source →

More Build skills

Browse category →
senior-frontendBuild and review React, Next.js, TypeScript or Tailwind frontends: components, scaffolding, performance and bundle size. Use whenever the user wants a new component or app, a page feels slow, the bundle is too big, or asks for a frontend code review.635 installsui-design-systemUse when building a design system: tokens, component docs, responsive scales or developer handoff. Generates tokens with design_token_generator.py.535 installsfrontend-designGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.346 installssenior-backendBuild and fix backend services: REST or GraphQL APIs, auth, microservices, PostgreSQL queries, migrations and load tests. Use whenever the user's API is slow or broken, needs login or auth added, a schema change, or a new endpoint or service scaffolded.246 installsself-improving-agentCurate what the agent has learned into durable project knowledge. Reviews Claude Code auto-memory (MEMORY.md and its topic files) for learnings worth keeping, promotes proven ones into CLAUDE.md or .claude/rules/, records a correction as a lesson that persists across sessions, prunes stale or duplicate entries, and turns a recurring fix into a reusable skill. Use whenever the user asks what you have learned or saved about the project, which memories should become permanent rules, to remember a lesson or stop repeating a mistake, or to clean up, audit or check memory health.173 installsusing-superpowersUse when starting any conversation - establishes how to find and use skills, requiring skill invocation before ANY response including clarifying questions145 installs

Frequently asked questions about oma-db

What does the oma-db skill do?

Design schemas and migrations, tune queries, or plan vector retrieval and database operations. Application API implementation uses oma-backend. It's a reusable SKILL.md instruction set that loads into your AI coding assistant on demand, no prompt engineering, no copy-pasting every session.

How do I install the oma-db skill?

Run `npx @skills-hub-ai/cli install oh-my-agent-agents-oma-db` from your terminal. The CLI writes the SKILL.md to the correct location for your AI tool (e.g. ~/.claude/skills/oh-my-agent-agents-oma-db/ for Claude Code or ~/.cursor/skills/ for Cursor with --target cursor) and adds it to your project's .skills.json lockfile.

Which AI tools does oma-db work with?

oma-db runs in Claude Code. It follows the open Agent Skills standard (SKILL.md), so the same skill works in every supported tool without modification.

Is the oma-db skill free?

Yes. Every skill on skills-hub.ai is free and open-source. There are no premium tiers, paywalls, or usage limits. You only pay for whatever AI assistant you're already using.

How do I use oma-db after installing it?

In Claude Code, type `/oh-my-agent-agents-oma-db` (or whatever slash command the skill registers) and the AI follows the skill's instructions immediately. You can also reference it by name in natural language, your AI loads the skill into context when relevant.

Can I share the oma-db skill with my team?

Yes. Commit your project's .skills.json lockfile and teammates run `npx @skills-hub-ai/cli install` (no args) to install every skill at the exact version you pinned. Organization-scoped installs work via skills-hub.ai organizations.