dbhub: Skill for Claude Code

.claude/skills/testing/SKILL.md

testing is a skill for Claude Code from bytebase/dbhub. It costs 67 tokens per session (1,767 once invoked), scanned A, original, MIT.

A testing guide for DBHub, a server that lets compatible AI tools connect to databases. It covers unit tests, integration tests that use Docker database containers, and database-specific checks.

In plain words
What is it for?
Use it to run all or selected tests, distinguish unit tests from integration tests, troubleshoot container problems, and add or verify DBHub tests.
Why use it?
It explains which commands to run, how tests are grouped, and which failures may require Docker or other setup.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

This is bytebase/dbhub's own configuration. It tells Claude Code how to work on dbhub itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything dbhub configures →

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is import { setupManagerWithFixture, FIXTURES } from '../../__fixtures__/helpers.js';.

About the project

DBHub is a lightweight Model Context Protocol server that lets compatible AI clients connect to and explore PostgreSQL, MySQL, MariaDB, SQL Server, and SQLite databases through one interface. Developers and other users employ it for schema inspection, query validation, debugging, and controlled read-only database access; the catalogue entries provide agent skills, instructions, an MCP configuration, and a plugin.

bytebase/dbhub · 3,753 stars · on GitHub · dbhub.ai

Reuse

Borrowing it

Nothing to install: this file belongs to bytebase/dbhub. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/bytebase/dbhub/main/.claude/skills/testing/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/bytebase/dbhub

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for testing

README.md
[![agentmods](https://agentmods.dev/badge/skills/bytebase/dbhub/testing/github.svg)](https://agentmods.dev/skills/bytebase/dbhub/testing)
Your own site
<a href="https://agentmods.dev/skills/bytebase/dbhub/testing"><img src="https://agentmods.dev/badge/skills/bytebase/dbhub/testing/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for testing

Your own site · 80×15
<a href="https://agentmods.dev/skills/bytebase/dbhub/testing"><img src="https://agentmods.dev/badge/skills/bytebase/dbhub/testing.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 67 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,767 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00067 $0.01767
Opus 5.5 $0.00027 $0.00707
Sonnet 5.5 $0.00013 $0.00353
Haiku 4.5 $0.00007 $0.00177

Measured 20d ago against content hash cf33a88c9a65, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

testing scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 20d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

  • testing — 100% identical, 12 lines differ
.claude/skills/testing/SKILL.md · 168 lines

How it starts

The opening of the file, as written. The whole thing — 168 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Testing Skill

This skill helps you run, write, and troubleshoot tests in the DBHub project.

Test Commands

pnpm test              # Run all tests (unit + integration)
pnpm test:unit         # Unit tests only (no Docker needed)
pnpm test:watch        # Interactive watch mode
pnpm test:integration  # Integration tests only (requires Docker)

Run a specific test file:

pnpm test src/connectors/__tests__/postgres.integration.test.ts
pnpm test src/utils/__tests__/allowed-keywords.test.ts

Run tests matching a name pattern:

pnpm test -- --testNamePattern="PostgreSQL"

Verbose output for debugging:

pnpm test:integration --reporter=verbose

Test Architecture

Vitest is configured with two projects in vitest.config.ts:

  • unit: All *.test.ts files excluding *integration* in the filename
  • integration: Only *integration*.test.ts files

This means the naming convention matters — integration tests MUST have integration in their filename to be correctly categorized.

Test File Locations

Unit tests (~20 files, no Docker needed):

  • src/utils/__tests__/ — Utility function tests (SQL parsing, DSN obfuscation, SSH config, allowed keywords, identifier quoting, parameter mapping, row limiting, safe URL, config watcher, AWS RDS signer)
  • src/tools/__tests__/ — Tool handler tests (execute-sql, search-objects, custom-tool-handler)
  • src/config/__tests__/ — Configuration tests (env parsing, TOML loading)
  • src/connectors/__tests__/ — Connector unit tests (dsn-parser, manager)
  • src/requests/__tests__/ — Request store tests

Integration tests (~11 files, Docker required):

  • src/connectors/__tests__/postgres.integration.test.ts
  • src/connectors/__tests__/mysql.integration.test.ts
  • src/connectors/__tests__/mariadb.integration.test.ts
  • src/connectors/__tests__/sqlserver.integration.test.ts
  • src/connectors/__tests__/oracle.integration.test.ts
  • src/connectors/__tests__/sqlite.integration.test.ts
  • src/connectors/__tests__/postgres-ssh.integration.test.ts
  • src/connectors/__tests__/multi-sqlite-sources.integration.test.ts
  • src/__tests__/json-rpc-integration.test.ts
  • src/api/__tests__/sources.integration.test.ts
  • src/api/__tests__/requests.integration.test.ts
  • src/config/__tests__/ssh-config-integration.test.ts

Read the full file on GitHub · 168 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 20d ago Changed · +10 lines cf33a88c9a65
  2. 1mo ago Changed · +2 lines a2300224619f
  3. 2mo ago First seen · 156 lines · 67 tokens per session scan A 751c29f59298

Subscribe to this mod's changes

testing is a skill published in the GitHub repository bytebase/dbhub (3,753 stars, last pushed 3d ago), licensed MIT. It adds 67 tokens to every session and 1,767 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

ssh-manager

How to use the MCP SSH Manager core tools (sshlistservers, sshexecute, sshupload, sshdownload, sshsync) without breaking a server: server names, the remote shell, time limits and long commands, file transfer pitfalls, security modes, host keys. Use it whenever a task runs a command or moves a file on a remote machine…

bvisible/mcp-ssh-manager · 79 tokens

phpunit-migration-test-generation

Use this skill when the user asks to generate, write, or create migration tests for a Shopware 6 migration class — phrases like "generate migration tests", "write a migration test", "create migration test", "test this migration", "test Migration1234Foo". Analyzes the source migration's SQL operations to pick an…

shopwareLabs/ai-coding-tools · 141 tokens

dbt-expert

Expert-level dbt (data build tool), models, tests, documentation, incremental models, macros, and Jinja templating. Use when the user mentions analytics engineering, SQL, data transformation, Jinja, or testing, or when the task involves Project Structure and Configuration, Sources and Staging Models, Intermediate and…

personamanagmentlayer/pcl · 76 tokens

dev-prisma

Pointer to Prisma's own agent skills (prisma-cli, prisma-client-api...) and how to install them, plus the schema-change workflow. Use for Prisma ORM work (schema, migrations, queries, schema.prisma) only when no prisma- skill is installed; when one is, use it instead.

christopherlouet/claude-base · 65 tokens

datasets

Use when a collection needs queried or joined test inputs, a reusable named view, spreadsheet worksheet data, live database rows, or script access through pm.datasets(). Chooses between a simple iteration file and a dataset while preserving query semantics, portability, and credential boundaries. Use for requests such…

Aryan-Jhaveri/mcp-statcan · 67 tokens

backtesting-py-oracle

Configuration and anti-patterns for using backtesting.py to validate ClickHouse SQL sweep results. Ensures bit-atomic replicability between SQL and Python trade evaluation.

terrylica/cc-skills · 30 tokens