DBHub 测试技能
技能 已验证 活跃为 DBHub 运行和排查测试,包括单元测试、使用 Testcontainers 的集成测试以及特定于数据库的测试。在被要求运行测试、修复测试失败、调试集成测试、排查 Docker/数据库容器问题或添加新测试时使用。在验证代码更改是否正常工作或需要调查 CI 测试失败时也使用。
提供一种可靠且文档齐全的方式来运行、调试和排查 DBHub 项目的测试,以确保代码质量和稳定性。
功能
- 运行单元测试
- 运行带有 Testcontainers 的集成测试
- 排查 Docker 和数据库容器问题
- 调试测试失败
- 添加新测试
使用场景
- 当被要求为 DBHub 运行测试时
- 当修复测试失败时
- 当调试集成测试时
- 当调查 CI 测试失败时
非目标
- 开发或修改 DBHub 核心应用程序逻辑
- 在测试上下文之外管理数据库架构或数据
工作流
- 确定要运行的测试类型(单元、集成、特定文件)。
- 执行相应的 pnpm test 命令。
- 如果出现问题,请查阅排查部分以获取有关容器启动、超时或隔离问题的指导。
- 分析测试输出以识别失败。
- 进行必要的代码或测试更正并重新运行测试。
先决条件
- 已安装并运行 Docker
- 足够的 Docker 内存(建议 4GB+)
安装
npx skills add bytebase/dbhub通过 npx 运行 Vercel skills CLI(skills.sh)— 需要本地安装 Node.js,以及至少一个兼容 skills 的智能体(Claude Code、Cursor、Codex 等)。前提是仓库遵循 agentskills.io 格式。
质量评分
已验证类似扩展
Vue Testing Best Practices
100Use for Vue.js testing. Covers Vitest, Vue Test Utils, component testing, mocking, testing patterns, and Playwright for E2E testing.
API Test Suite Builder
99Use when the user asks to generate API tests, create integration test suites, test REST endpoints, or build contract tests.
Containerize MCP Server
100Containerize an R-based MCP (Model Context Protocol) server using Docker. Covers mcptools integration, port exposure, stdio vs HTTP transport, and connecting Claude Code to the containerized server. Use when deploying an R MCP server without requiring a local R installation, creating a reproducible MCP server environment, running MCP servers alongside other containerized services, or distributing an MCP server to other developers.
Azure Container Registry SDK for Python
100Azure Container Registry SDK for Python. Use for managing container images, artifacts, and repositories. Triggers: "azure-containerregistry", "ContainerRegistryClient", "container images", "docker registry", "ACR".
Migrate Validate
100Validate pending migrations for foreign key consistency, rollback safety, and best practices
Sql Optimization
100Universal 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.