Source profileQuality 92/100

terrylica/cc-skills/plugins/devops-tools/skills/clickhouse-pydantic-config/SKILL.md

clickhouse-pydantic-config

Generate DBeaver config from Pydantic ClickHouse models. TRIGGERS - DBeaver config, ClickHouse connection, database client config.

Source repository stars
62
Declared platforms
0
Static risk flags
1
Last source update
2026-08-24
Source checked
2026-08-25

Decision brief

What it does: where it fits

Generate DBeaver database client configurations from Pydantic v2 models using mise [env] as Single Source of Truth (SSoT).

Best for

  • Setting up DBeaver connections for ClickHouse databases
  • Generating database client configurations from environment variables
  • Managing local vs cloud ClickHouse connection profiles

Not for

  • Tasks that require unconfirmed production actions or broad system permissions.
  • Environments where the pinned source and install steps cannot be inspected.

Compatibility matrix

Platform support, with evidence labels

PlatformStatusEvidenceWhat to check
CodexNot declaredNo explicit evidencePortability before use
Claude CodeNot declaredNo explicit evidencePortability before use
CursorNot declaredNo explicit evidencePortability before use
Gemini CLINot declaredNo explicit evidencePortability before use
Open the compatibility checker

Installation

Inspect first. Install second.

The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.

Source-detected install commandSource
npx skills add https://github.com/terrylica/cc-skills --skill "plugins/devops-tools/skills/clickhouse-pydantic-config"
Safe inspection promptEditorial

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

What the source asks the agent to do

  1. 01

    Quick Start

    Review the “Quick Start” section in the pinned source before continuing.

    Review and apply the “Quick Start” source section.
  2. 02

    Cloud Credentials Setup

    Review the “Cloud Credentials Setup” section in the pinned source before continuing.

    Review and apply the “Cloud Credentials Setup” source section.
  3. 03

    Repository Adaptation Workflow

    Before writing any code, the executor MUST:

    Before writing any code, the executor MUST:
  4. 04

    Pre-Implementation Discovery (Phase 0)

    Before writing any code, the executor MUST:

    Before writing any code, the executor MUST:
  5. 05

    When to Use This Skill

    Setting up DBeaver connections for ClickHouse databases

    Setting up DBeaver connections for ClickHouse databasesGenerating database client configurations from environment variablesManaging local vs cloud ClickHouse connection profiles

Permission review

Static risk signals and limitations

Writes files

medium · line 127

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

Why each signal appears

EvidenceSourceComputedTestedEditorial
SignalValueEvidence typeMeaning
Quality score92/100ComputedDocumentation, specificity, maintenance, and trust rules
Repository stars62SourceRepository attention, not individual Skill quality
Compatibility0 platformsSourceDeclared in the catalog source record
Usage guideautomated source guideEditorialGenerated or reviewed according to the visible evidence level

Pinned source

Provenance and original SKILL.md

Repository
terrylica/cc-skills
Skill path
plugins/devops-tools/skills/clickhouse-pydantic-config/SKILL.md
Commit
a5f847b22ee5afa35677e446973a903d098cd1d4
License
MIT
Collected
2026-08-25
Default branch
main
View the original SKILL.md

ClickHouse Pydantic Config

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.

When to Use This Skill

Use this skill when:

  • Setting up DBeaver connections for ClickHouse databases
  • Generating database client configurations from environment variables
  • Managing local vs cloud ClickHouse connection profiles
  • Integrating ClickHouse with mise-based development workflows
  • Automating DBeaver data-sources.json generation

Critical Design Principle: Semi-Prescriptive Adaptation

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.

Why This Matters

Each repository has unique:

  • Directory layouts (.dbeaver/ location may vary)
  • Environment variable naming conventions
  • Existing connection management patterns
  • Local vs cloud database mix

The SSoT principle is the constant; the implementation details are the variables.

Quick Start

# 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

Credential Prerequisites (Cloud Mode)

Before using cloud mode, obtain credentials via the skill chain:

  1. Create/retrieve user: Use clickhouse-cloud-management skill to create read-only users or retrieve existing credentials from 1Password
  2. Store in .env: Add to .env file (gitignored):
CLICKHOUSE_USER_READONLY=your_user
CLICKHOUSE_PASSWORD_READONLY=your_password
  1. Generate config: Run mise run db-client:cloud

Skill chain: clickhouse-cloud-management.envclickhouse-pydantic-config

mise [env] as Single Source of Truth

All 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.

Credential Handling by Mode

ModeApproachRationale
LocalHardcode default user, empty passwordZero friction, no security concern
CloudPre-populate from .envRead 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.

Cloud Credentials Setup

# .env (gitignored)
CLICKHOUSE_USER_READONLY=readonly_user
CLICKHOUSE_PASSWORD_READONLY=your-secret-password

Repository Adaptation Workflow

Pre-Implementation Discovery (Phase 0)

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" .

Adaptation Decision Matrix

Discovery FindingAdaptation Action
Existing .mise.toml at repo rootExtend existing [env] section, don't create new file
Existing .dbeaver/ directoryMerge connections, preserve existing entries
Non-standard CLICKHOUSE_* varsMap to repository's naming convention
Multiple databases (local + cloud)Generate multiple connection entries
No ClickHouse availableWarn and generate placeholder config

Validation Checklist (Post-Generation)

The executor MUST verify:

  • Generated JSON is valid (jq . .dbeaver/data-sources.json)
  • DBeaver can import the config (launch and verify connection appears)
  • mise tasks execute without error (mise run db-client-generate)
  • .dbeaver/ added to .gitignore

Pydantic Model

The ClickHouseConnection model provides:

  • Type-safe configuration with Pydantic v2 validation
  • Computed fields for JDBC URL and connection ID
  • Mode-aware defaults (cloud auto-enables SSL on port 8443)
  • Environment loading via from_env() class method

See references/pydantic-model.md for complete model documentation.

DBeaver Format

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.

macOS Notes

  1. DBeaver binary: Use /Applications/DBeaver.app/Contents/MacOS/dbeaver (NOT open -a)
  2. Gitignore: Add .dbeaver/ to .gitignore

Related Skills

SkillIntegration
devops-tools:clickhouse-cloud-managementCredential retrieval for cloud mode
quality-tools:clickhouse-architectSchema design context
itp:mise-configurationSSoT environment variable patterns

Python Driver Policy

For Python application code connecting to ClickHouse (not DBeaver), use clickhouse-connect (official HTTP driver). See clickhouse-architect for:

  • Recommended code patterns
  • Why NOT to use clickhouse-driver (community)
  • Performance vs maintenance trade-offs

Additional Resources

ReferenceContent
references/pydantic-model.mdComplete model documentation
references/dbeaver-format.mdDBeaver JSON format spec

Troubleshooting

IssueCauseSolution
DBeaver can't connectPort mismatch (8123 vs 9000)HTTP uses 8123, native uses 9000 - check config
Credentials not loading.env not sourcedRun mise trust or source .env manually
JSON validation failsInvalid data-sources.jsonValidate with jq . .dbeaver/data-sources.json
Cloud SSL errorMissing SSL on port 8443Cloud mode auto-enables SSL - verify port is 8443
mise task not foundMissing task definitionAdd task to mise.toml [tasks] section
.dbeaver/ in gitMissing gitignore entryAdd .dbeaver/ to .gitignore
Connection ID conflictDuplicate connection namesEach connection needs unique ID (random hex)
Config not updatingDBeaver cachingRestart DBeaver to reload data-sources.json

Post-Execution Reflection

After this skill completes, check before closing:

  1. Did the command succeed? — If not, fix the instruction or error table that caused the failure.
  2. Did parameters or output change? — If the underlying tool's interface drifted, update Usage examples and Parameters table to match.
  3. Was a workaround needed? — If you had to improvise (different flags, extra steps), update this SKILL.md so the next invocation doesn't need the same workaround.

Only update if the issue is real and reproducible — not speculative.

Frequently asked questions

What to verify before installation and use

What does the clickhouse-pydantic-config source document cover?

Generate DBeaver database client configurations from Pydantic v2 models using mise [env] as Single Source of Truth (SSoT).

How do I install clickhouse-pydantic-config?

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.

Which permission-related actions were detected?

Static rules flagged write-files in the source; the page lists the matching lines and excerpts.

Alternatives

Compare before choosing