跳转到主要内容

DBHub Database Query Guide

技能 已验证 活跃

DBHub MCP 服务器查询数据库指南。每当您需要通过 DBHub 的 MCP 工具(search_objects、execute_sql)来探索数据库模式、检查表或运行 SQL 查询时,请使用此技能。在任何数据库查询任务、模式探索、数据检索或通过 MCP 执行 SQL 时激活,即使用户只说“检查数据库”或“为我查找一些数据”。此技能可确保您遵循正确的先探索后查询的工作流程,而不是猜测表结构。

目的

使用户能够通过 DBHub 的 MCP 工具安全有效地探索数据库模式和运行 SQL 查询,防止常见错误并促进结构化工作流程。

功能

  • 使用 `search_objects` 探索数据库模式
  • 使用 `execute_sql` 执行 SQL 查询
  • 支持多个数据库和连接
  • 指导“先探索后查询”的工作流程
  • 为常见的数据库问题提供错误恢复步骤

使用场景

  • 在编写查询之前需要了解数据库结构时
  • 当被要求从数据库检索特定数据时
  • 需要针对数据库运行特定 SQL 语句时
  • 在数据库操作期间遇到错误时

非目标

  • 在未验证的情况下猜测表名或列名
  • 未经渐进披露而倾倒整个模式
  • 在多数据库设置中使用错误的工具
  • 在不调查的情况下盲目重试失败的查询

工作流

  1. 发现可用的模式
  2. 必要时使用模式查找相关表
  3. 检查表结构(列、索引)
  4. 编写并执行精确的 SQL 查询

实践

  • 数据库模式探索
  • SQL 查询执行
  • 安全数据库交互工作流程

安装

npx skills add bytebase/dbhub

通过 npx 运行 Vercel skills CLI(skills.sh)— 需要本地安装 Node.js,以及至少一个兼容 skills 的智能体(Claude Code、Cursor、Codex 等)。前提是仓库遵循 agentskills.io 格式。

质量评分

已验证
100 /100
1 day ago 分析

信任信号

最近提交23 days ago
星标2.7k
许可证MIT
状态
查看源代码

类似扩展

Dsql

100

Build with Aurora DSQL — manage schemas, execute queries, handle migrations, diagnose query plans, and develop applications with a serverless, distributed SQL database. Covers IAM auth, multi-tenant patterns, MySQL-to-DSQL migration, DDL operations, query plan explainability, and SQL compatibility validation. Triggers on phrases like: DSQL, Aurora DSQL, create DSQL table, DSQL schema, migrate to DSQL, distributed SQL database, serverless PostgreSQL-compatible database, DSQL query plan, DSQL EXPLAIN ANALYZE, why is my DSQL query slow.

技能
awslabs

Migrate Validate

100

Validate pending migrations for foreign key consistency, rollback safety, and best practices

技能
ruvnet

Sql Optimization

100

Universal SQL performance optimization assistant for comprehensive query tuning, indexing strategies, and database performance analysis across all SQL databases (MySQL, PostgreSQL, SQL Server, Oracle). Provides execution plan analysis, pagination optimization, batch operations, and performance monitoring guidance.

技能
github

Migrate Create

99

Create a new sequentially numbered database migration with up/down SQL files

技能
ruvnet

Agentdb Query

99

Query AgentDB through the controller bridge -- semantic routing, hierarchical recall, causal graphs, context synthesis, pattern store/search

技能
ruvnet

MySQL Read Only Query Skill

99

Execute read-only SQL queries against multiple MySQL databases. Use when: (1) querying MySQL databases, (2) exploring database schemas/tables, (3) running SELECT queries for data analysis, (4) checking database contents. Supports multiple database connections with descriptions for intelligent auto-selection. Blocks all write operations (INSERT, UPDATE, DELETE, DROP, etc.) for safety.

技能
sanjay3290