omh-relational-db
하는 일
이 스킬은 인덱스 추가나 대형 테이블 이전 같은 관계형 데이터베이스 변경을 계획합니다. 라이브 시스템을 잠그거나 망가뜨리지 않는 변경을 원하는 개발자와 데이터베이스 관리자를 위한 스킬입니다.
사용하는 경우
- ✓데이터베이스 쿼리가 느려서 어떤 인덱스가 도움이 될지 알고 싶을 때.
- ✓매우 큰 테이블을 서비스 중단 없이 바꿔야 할 때.
- ✓배포 중 데이터베이스 마이그레이션이 테이블을 잠글까 걱정될 때.
스킬 링크
https://github.com/rlaope/oh-my-hermes/blob/main/agent-skills/omh-relational-db/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“2억 행짜리 테이블을 사용자가 잠기지 않도록 바꾸는 온라인 마이그레이션 계획을 작성해 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
에이전트는 데이터베이스 종류, 버전, 테이블 크기를 묻고, 각 단계의 잠금 동작과 롤백을 포함해 계획합니다. 이 내용이 분명해지기 전에는 마이그레이션이 준비되었다고 하지 않습니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Relational Db
This is an OMH relational-db workflow skill, projected for Agent Skills hosts (Claude Code, Codex, Cursor, opencode, OpenClaw, pi).
Why This Exists
relational-db exists because the database work itself had no owner: backend owns schema_migration_plan/v1 for a service change, and an index question, a lock taken during deploy, or an N+1 finding was answered by a data, deploy, or interview lane with no lock model at all.
First Steps
- Ask for the engine, the version, and the table sizes before proposing any statement.
- For a migration, give every step its lock behaviour and its rollback before calling the plan ready.
Do Not Use When
- The request is a service or API change whose storage part is one section of the contract; use
omh-backend, which owns schema_migration_plan/v1. - The request is an end-to-end performance goal across the whole system rather than one database; use
ulw-perf. - The request is analysis of the data itself -- trends, metrics, a report; use
omh-data-analysis. - The request is watching a release roll out with its health signals and rollback criteria; use
omh-deploy-and-monitor.
Examples
Good example:
- Prompt: write an online migration for a 200M row table
- Expected behavior: Ask for the engine and version, then prepare online_migration_plan/v1: expand, batched backfill, switch, and contract, each step with the lock it takes, its
lock_timeout, and its rollback, and a readiness verdict. - Why: At 200M rows the lock each statement takes decides whether the deploy is an outage.
Bad example:
- Prompt: just add the index, it will be fine
- Expected behavior: Size the index, cite the plan it changes, build it with the non-blocking method, and name what is unverified.
- Why: An index built with a blocking statement on a large table locks writes for the whole build.
Completion Checklist
- Engine, version, and table sizes are stated.
- Every proposed index cites an observed plan or is marked unverified.
- Every migration step states its lock mode, its duration bound, and its rollback.
- The readiness verdict is ready only when no step lacks lock behaviour or rollback.
- Nothing was connected to, run, or applied by OMH.
Recovery Notes
- If the engine or version is unknown, plan for the most restrictive lock behaviour and say so.
- If no query plan is available, ask for the observed plan before proposing an index, and mark any proposal unverified.
When to Use
Use when the work is the database itself on a relational engine such as Postgres or MySQL: a slow query and the index that fixes it, an online migration on a large table, DDL that took or would take a lock during deploy, N+1 queries from an endpoint, or when to partition or shard. The output is a plan plus the checks that prove it safe to run; OMH never connects to a database.
Strong routing signals: `relational-db`, `relational database`, `online migration`, `migration for a large table`, `lock-safe ddl`, `alter table`, `took a lock`, `table lock`, `lock during deploy`, `create index concurrently`, `which index`, `what index`, `missing index`, `index size`, `seq scan`, `seq-scans`, `sequential scan`, `explain analyze`, `query plan`, `n+1`, `n+1 query`, `n+1 queries`, `need to shard`, `shard the database`, `database sharding`, `table partitioning`, `partition the table`, `index bloat`, `postgres lock`, `mysql online ddl`
Catalog Metadata
Category: planning
Phase: relational-db
Quality tier: db-lock-and-rollback-gated
Reasoning demand: standard
Quality bar:
- State the engine and version first; lock behaviour differs by engine and by version.
- Load
references/engine-lock-tables.mdfor the per-engine lock modes, the online DDL rules, and index-type selection instead of recalling them. - Size an index before proposing it: rows, key width, and the write amplification it adds.
- Order an online migration as expand, backfill in batches, switch, contract, with the rollback for each step.
- For a read-modify-write, an upsert, a queue table, or a deadlock, use the concurrency section of the lock tables: name the isolation level, the row lock and its order, and which error codes retry the whole transaction.
- Give non-transactional DDL such as
CREATE INDEX CONCURRENTLYits own migration marked non-transactional; never dropCONCURRENTLYto satisfy the migration tool. - Keep planned, observed, and applied as separate states for every statement.
Required inputs:
자주 묻는 질문
어떤 데이터베이스를 지원하나요?
사용하는 데이터베이스를 물어보고, 그 엔진과 버전에 맞게 계획을 세웁니다.
마이그레이션을 대신 실행하나요?
아닙니다. 계획과 점검을 준비하며, 변경은 사용자나 팀이 실행합니다.
롤백이란 무엇인가요?
문제가 생겼을 때 각 단계를 되돌리는 명확한 방법을 말합니다.
상세 정보
작성자의 원본 설명
[omh] Database work on a relational store -- a slow query, an index to size, a migration on a big table, a lock taken during deploy, N+1 queries: plan it with the checks that prove it safe, and never call a migration ready without its lock behaviour and rollback. Use when the user says: relational-db, relational database, online migration, migration for a large table, lock-safe ddl, alter table, took a lock, table lock.
repo: rlaope/oh-my-hermes
인기도
- GitHub 스타
- 5.1k
- 순위
- #15150
- 라이선스
- MIT
- 업데이트
- 2026. 11. 2.
댓글
- …
이 저장소의 다른 스킬
omh-accessibility-audit
5.1k에이전트가 화면이나 흐름을 키보드 사용, 스크린 리더 레이블, 명암비, 터치 대상 크기 측면에서 접근성 부족이 없는지 점검하도록 돕습니다.
omh-adversarial-consensus
5.1k에이전트가 기술 제안을 독립된 여러 관점에서 공격하고, 결정 전에 살아남는 내용을 요약하도록 돕습니다.
omh-agent-debug
5.1k다른 AI 에이전트가 왜 멈추거나, 반복하거나, 방향을 잃는지 알아내고, 가장 작고 안전한 복구 방법을 제안하도록 돕습니다.
omh-agent-instructions
5.1kAI 도구가 프로젝트에서 어떻게 작업할지 알려 주는 지침 파일, 예를 들어 AGENTS.md나 CLAUDE.md를 작성하거나 업데이트하도록 돕습니다.
비슷한 스킬
discrawl
394k에이전트가 저장된 로컬 Discord 메시지 보관본을 검색하고 요약하며, 최신 상태를 확인하고 다이렉트 메시지를 읽도록 돕습니다.
clickhouse-io
280k에이전트가 ClickHouse 데이터베이스의 쿼리와 스키마를 최적화하도록 돕습니다. 고성능 분석 작업의 모범 사례를 적용합니다. 분석 쿼리가 느릴 때 씁니다.
scientific-db-pubmed-database
280k생의학 분야의 과학 논문을 에이전트가 검색하도록 돕습니다. 특정 의학 정보가 필요한 연구에 유용합니다.