convez.ai
MCP ServerDevOps & InfraestruturaAvançado
vicleung01

OpenOcta DB Ops Skills

vicleung01/openocta-db-ops-skills

8 skills testadas em produção para diagnosticar DB em segundos

Ver no GitHub
InicialPluginScore · de 0 a 100

Pacote de 8 skills de operações de banco de dados para o agente OpenOcta, com servidor MCP de referência. Reduz diagnósticos de DBA de 20 minutos para 8 segundos, cobrindo MySQL, MariaDB e TiDB com workflows testados em produção para replicação, queries lentas, deadlocks e auditoria de schema.

Instalação

$npx convez-ai vicleung01/openocta-db-ops-skills

1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.

Métricas

Estrelas
9
Forks
4
Acompanhando
0
Saúde
42%
Último commit
há 5 meses
Versão
—
Issues abertas
0
Contribuidores
1

Casos de uso

  • Diagnóstico automático de queries lentas com recomendação de índices
  • Resolução rápida de lag de replicação em fleets MySQL/MariaDB
  • Inspeção de saúde de clusters TiDB e detecção de problemas
  • Análise de deadlocks com recomendações de correção
  • Previsão de capacidade com 6 dias de antecedência

Veredito

Solução madura e bem-documentada para times de DBA que buscam automação inteligente de diagnósticos. Redução de tempo de resposta verificada em produção, mas exige integração com infraestrutura MySQL/MariaDB/TiDB existente e configuração do MCP server.

README

A tradução para o português deste README ainda está na fila.

Database Ops Skills for OpenOcta

8 production-tested skills + a reference MCP server. Turn a 20-minute DBA diagnosis into an 8-second AI analysis.

A collection of database operations skills for OpenOcta AI Agent — distilled from a financial-institution DBA practice managing a 600+-instance fleet. Coverage: MySQL / MariaDB / TiDB (slow query, replication, deadlock, capacity, schema audit, cluster inspection); Redis and PostgreSQL workflows are not part of this pack. The DBA goes from "operator" to "approver" — AI does the diagnosis, DBA says "confirm".

What's Included

ComponentDescription
8 SkillsWorkflows for slow query, replication lag, health check, capacity, deadlock, TiDB, schema
MCP ServerReference Python implementation exposing the 9 db_* tools the skills need — run it and everything works out of the box
ExamplesEnd-to-end smoke test verifying all tools against a live database

The Problem

At 2:37 AM, a replication lag alert fires. Traditional response:

📱 Alert → 😴 Wake up → 💻 Open laptop → 🔒 Connect VPN
→ 🖥️ Login jumpbox → 📊 Check monitoring → 🔍 Analyze SQL → 🛠️ Manual fix
⏱ Full process: 15~20 minutes

With these skills:

📱 View AI diagnosis on phone → ✅ Confirm
⏱ Full process: ~2 minutes (10x faster)

Skills Overview

Incident Response (5 skills)

SkillReal-World ScenarioImpact
mysql-slow-query-diagnoseSlow query diagnosis + index recommendation144x faster (20min → 8.3s)
mysql-replication-lag-resolverReplication lag auto-diagnosis + KILL approval10x faster (20min → 2min)
mysql-batch-health-checkMySQL/MariaDB fleet health inspection30x faster (half day → 10min)
sql-duration-spike-detectorDetect slow SQL before it hits the threshold0 → 1 (previously impossible)
mysql-capacity-early-warningCapacity prediction with growth source attribution6-day early warning

Diagnostics & Audit (3 skills)

SkillDescription
mysql-deadlock-analyzerFull-chain deadlock analysis: InnoDB status → lock chain → pattern classification → fix
tidb-cluster-inspectorTiDB cluster inspection: topology → health → slow queries → hot regions → TiKV → PD
mysql-schema-linterSchema audit: PK, engine, charset, redundant indexes, FK, auto-inc overflow

Total: 8 skills, 2,800+ lines of battle-tested diagnostic workflows

Quick Start

1. Add skills to OpenOcta

cp -r mysql-slow-query-diagnose /path/to/openocta/skills/
cp -r mysql-replication-lag-resolver /path/to/openocta/skills/
cp -r mysql-batch-health-check /path/to/openocta/skills/
cp -r sql-duration-spike-detector /path/to/openocta/skills/
cp -r mysql-capacity-early-warning /path/to/openocta/skills/
cp -r mysql-deadlock-analyzer /path/to/openocta/skills/
cp -r tidb-cluster-inspector /path/to/openocta/skills/
cp -r mysql-schema-linter /path/to/openocta/skills/

2. Configure an MCP server

These skills require a MySQL MCP server exposing the following tools:

ToolDescription
db_queryExecute SQL queries
db_get_statusGet server status variables
db_get_variableGet server configuration variables
db_get_processlistView current connections
db_kill_queryTerminate a query/connection
db_get_slow_logRetrieve slow query log entries
db_describe_tableShow table structure and indexes
db_list_databasesList databases with size
db_list_tablesList tables in a database with size

Compatible MCP servers:

  • omnidb-mcp — Multi-database MCP server supporting 22 databases (MySQL, MariaDB, TiDB, PostgreSQL, Redis, and more)

Map the MCP server's tools to db_* naming in your OpenOcta configuration.

3. Use in conversation

User: "Check slow queries on db-prod-01"
→ AI finds TOP 3 slow queries, analyzes index hit rate, suggests indexes
→ "Add (status, create_time) index on order_detail — est. 237x speedup"

User: "Replication lag alert on db-slave-01"
→ AI identifies 3 blocking queries on master, classifies kill safety
→ DBA confirms → 623s lag → 0s in 90 seconds

User: "Check all instances health"
→ AI inspects the MySQL/MariaDB fleet, outputs TOP 5 anomalies sorted by urgency
→ "#1: disk 92%, 4 days to full — clear audit_log to free 54GB"

User: "Any SQL performance degradation?"
→ AI compares 24h vs 7d baseline, finds 14.7x spike on order_detail
→ "Index selectivity dropped — table grew 1.2M → 3.8M rows"

User: "Check capacity outlook"
→ AI breaks down disk growth by source: binlog 44%, audit 34%, data 22%
→ "6 days to full. Action: clear audit_log (→51%), reduce binlog retention"

Design Principles

  1. Value over features — Each skill solves a real pain point with measurable ROI
  2. Safety first — Destructive operations (KILL) require double user confirmation
  3. Root cause, not symptoms — Don't just show "slow query", explain WHY and HOW to fix
  4. Growth attribution — Capacity analysis breaks down growth by source (binlog/audit/data)
  5. Pre-threshold detection — Find problems before they trigger alerts
  6. Zero proprietary dependencies — Generic db_* tool names, compatible with any MCP server
  7. Production validated — All SQL tested against real databases with 8,000+ tables

License

Apache 2.0 — See LICENSE

Author

vicleung — DBA who manages 600+ instances with AI. From "operator" to "approver".

Ver o original no GitHub

Bom para

Relacionados