Best for
- Setting up DBeaver connections for ClickHouse databases
- Generating database client configurations from environment variables
- Managing local vs cloud ClickHouse connection profiles
terrylica/cc-skills/plugins/devops-tools/skills/clickhouse-pydantic-config/SKILL.md
Generate DBeaver config from Pydantic ClickHouse models. TRIGGERS - DBeaver config, ClickHouse connection, database client config.
Decision brief
Generate DBeaver database client configurations from Pydantic v2 models using mise [env] as Single Source of Truth (SSoT).
Compatibility matrix
| Platform | Status | Evidence | What to check |
|---|---|---|---|
| Codex | Not declared | No explicit evidence | Portability before use |
| Claude Code | Not declared | No explicit evidence | Portability before use |
| Cursor | Not declared | No explicit evidence | Portability before use |
| Gemini CLI | Not declared | No explicit evidence | Portability before use |
Installation
The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.
npx skills add https://github.com/terrylica/cc-skills --skill "plugins/devops-tools/skills/clickhouse-pydantic-config"Inspect the Agent Skill "clickhouse-pydantic-config" from https://github.com/terrylica/cc-skills/blob/a5f847b22ee5afa35677e446973a903d098cd1d4/plugins/devops-tools/skills/clickhouse-pydantic-config/SKILL.md at commit a5f847b22ee5afa35677e446973a903d098cd1d4. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.
Workflow
Review the “Quick Start” section in the pinned source before continuing.
Review the “Cloud Credentials Setup” section in the pinned source before continuing.
Before writing any code, the executor MUST:
Before writing any code, the executor MUST:
Setting up DBeaver connections for ClickHouse databases
Permission review
The documentation asks the agent to create, modify, or delete local files.
| Existing `.mise.toml` at repo root | Extend existing `[env]` section, don't create new file |Evidence record
| Signal | Value | Evidence type | Meaning |
|---|---|---|---|
| Quality score | 92/100 | Computed | Documentation, specificity, maintenance, and trust rules |
| Repository stars | 62 | Source | Repository attention, not individual Skill quality |
| Compatibility | 0 platforms | Source | Declared in the catalog source record |
| Usage guide | automated source guide | Editorial | Generated or reviewed according to the visible evidence level |
Pinned source
Generate DBeaver database client configurations from Pydantic v2 models using mise [env] as Single Source of Truth (SSoT).
Schema documentation principle: ClickHouse table/column COMMENTs are the SSoT for what each column means and how it's computed. See quality-tools:clickhouse-architect for the full COMMENT policy.
Self-Evolving Skill: This skill improves through use. If instructions are wrong, parameters drifted, or a workaround was needed — fix this file immediately, don't defer. Only update for real, reproducible issues.
Use this skill when:
This skill is NOT a rigid template. It provides a SSoT pattern that MUST be adapted to each repository's structure and local database situation.
Each repository has unique:
.dbeaver/ location may vary)The SSoT principle is the constant; the implementation details are the variables.
# Generate local connection config
mise run db-client-generate
# Generate cloud connection config
mise run db-client:cloud
# Preview without writing
mise run db-client:dry-run
# Launch DBeaver
mise run dbeaver
Before using cloud mode, obtain credentials via the skill chain:
clickhouse-cloud-management skill to create read-only users or retrieve existing credentials from 1Password.env file (gitignored):CLICKHOUSE_USER_READONLY=your_user
CLICKHOUSE_PASSWORD_READONLY=your_password
mise run db-client:cloudSkill chain: clickhouse-cloud-management → .env → clickhouse-pydantic-config
[env] as Single Source of TruthAll configurable values live in .mise.toml:
[env]
CLICKHOUSE_NAME = "clickhouse-local"
CLICKHOUSE_MODE = "local" # "local" or "cloud"
CLICKHOUSE_HOST = "localhost"
CLICKHOUSE_PORT = "8123"
CLICKHOUSE_DATABASE = "default"
Scripts read from os.environ.get() with backward-compatible defaults—works with or without mise installed.
| Mode | Approach | Rationale |
|---|---|---|
| Local | Hardcode default user, empty password | Zero friction, no security concern |
| Cloud | Pre-populate from .env | Read from environment, write to gitignored JSON |
Key principle: The generated data-sources.json is gitignored anyway. Pre-populating credentials trades zero security risk for maximum developer convenience.
# .env (gitignored)
CLICKHOUSE_USER_READONLY=readonly_user
CLICKHOUSE_PASSWORD_READONLY=your-secret-password
Before writing any code, the executor MUST:
# 1. Discover existing configuration patterns
fd -t f ".mise.toml" .
fd -t f ".env*" .
fd -t d ".dbeaver" .
# 2. Test ClickHouse connectivity (local)
clickhouse-client --host localhost --port 9000 --query "SELECT 1"
# 3. Check for existing connection configs
fd -t f "data-sources.json" .
fd -t f "dataSources.xml" .
| Discovery Finding | Adaptation Action |
|---|---|
Existing .mise.toml at repo root | Extend existing [env] section, don't create new file |
Existing .dbeaver/ directory | Merge connections, preserve existing entries |
| Non-standard CLICKHOUSE_* vars | Map to repository's naming convention |
| Multiple databases (local + cloud) | Generate multiple connection entries |
| No ClickHouse available | Warn and generate placeholder config |
The executor MUST verify:
jq . .dbeaver/data-sources.json)mise run db-client-generate).dbeaver/ added to .gitignoreThe ClickHouseConnection model provides:
from_env() class methodSee references/pydantic-model.md for complete model documentation.
DBeaver uses .dbeaver/data-sources.json with this structure:
{
"folders": {},
"connections": {
"clickhouse-jdbc-{random-hex}": {
"provider": "clickhouse",
"driver": "com_clickhouse",
"name": "Connection Name",
"configuration": { ... }
}
}
}
Important: DBeaver does NOT support ${VAR} substitution—values must be pre-populated at generation time.
See references/dbeaver-format.md for complete format specification.
/Applications/DBeaver.app/Contents/MacOS/dbeaver (NOT open -a).dbeaver/ to .gitignore| Skill | Integration |
|---|---|
devops-tools:clickhouse-cloud-management | Credential retrieval for cloud mode |
quality-tools:clickhouse-architect | Schema design context |
itp:mise-configuration | SSoT environment variable patterns |
For Python application code connecting to ClickHouse (not DBeaver), use clickhouse-connect (official HTTP driver). See clickhouse-architect for:
clickhouse-driver (community)| Reference | Content |
|---|---|
| references/pydantic-model.md | Complete model documentation |
| references/dbeaver-format.md | DBeaver JSON format spec |
| Issue | Cause | Solution |
|---|---|---|
| DBeaver can't connect | Port mismatch (8123 vs 9000) | HTTP uses 8123, native uses 9000 - check config |
| Credentials not loading | .env not sourced | Run mise trust or source .env manually |
| JSON validation fails | Invalid data-sources.json | Validate with jq . .dbeaver/data-sources.json |
| Cloud SSL error | Missing SSL on port 8443 | Cloud mode auto-enables SSL - verify port is 8443 |
| mise task not found | Missing task definition | Add task to mise.toml [tasks] section |
| .dbeaver/ in git | Missing gitignore entry | Add .dbeaver/ to .gitignore |
| Connection ID conflict | Duplicate connection names | Each connection needs unique ID (random hex) |
| Config not updating | DBeaver caching | Restart DBeaver to reload data-sources.json |
After this skill completes, check before closing:
Only update if the issue is real and reproducible — not speculative.
Frequently asked questions
Generate DBeaver database client configurations from Pydantic v2 models using mise [env] as Single Source of Truth (SSoT).
The source record exposes this install command: npx skills add https://github.com/terrylica/cc-skills --skill "plugins/devops-tools/skills/clickhouse-pydantic-config". Inspect the command and pinned source before running it.
Static rules flagged write-files in the source; the page lists the matching lines and excerpts.
Alternatives
oaustegard/claude-skills
Generate hierarchical _FEATURES.md files that describe what a codebase DOES from a user/consumer perspective, anchored to source symbols via tree-sitting. Supports large complex codebases through feature-driven decomposition into sub-feature files. Uses a multi-pass synthesis: orientation → detail → overview rewrite. Use when someone says "what does this do", "document features", "feature inventory", "_FEATURES.md", or needs to understand a codebase's purpose before modifying it. Complements tre
HKUDS/Vibe-Trading
Create, modify, and optimize quantitative trading strategies, then backtest and evaluate them.
vasilyu1983/AI-Agents-public
Guides iOS testing with XCTest, XCUITest, Swift Testing, simctl, and xcresult. Use when choosing destinations, controlling flakes, or parsing test artifacts for native apps.
brucesongs/kali-claw
Insecure Design (OWASP A06:2025) focuses on security flaws in system architecture and design phases, rather than code implementation-level bugs.