Agent skill

Clickhouse Multi Env Setup

by jeremylongshore in jeremylongshore/tons-of-skills-marketplace

Configure ClickHouse across dev, staging, and production with environment-specific settings, secrets management, and infrastructure-as-code patterns.

MITAuto-check: notesDatabases

Install Clickhouse Multi Env Setup

skills CLI
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill clickhouse-multi-env-setup -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install jeremylongshore/tons-of-skills-marketplace clickhouse-multi-env-setup --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/.curated/clickhouse-multi-env-setup .claude/skills/clickhouse-multi-env-setup && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
clickhouse-multi-env-setup
GitHub stars
2.8k
Token cost
~1.6k tokens
SKILL.md length
491 words
Files
3 (incl. references)
Skills in repo
3,342
Repo updated
First seen
Licence
MIT

At a glance

Configure ClickHouse across dev, staging, and production with environment-specific settings, secrets management, and infrastructure-as-code patterns.

  • Works in 7 steps: Choose an environment strategy → Build a typed config module → Add a client factory → …
  • Setting up per-environment ClickHouse instances
  • SKILL.md covers Overview, Prerequisites, Instructions and Output, plus 4 more sections
  • Needs CLICKHOUSE_PASSWORD

What it does

Clickhouse Multi Env Setup is an agent skill from jeremylongshore/tons-of-skills-marketplace. Configure ClickHouse across dev, staging, and production with environment-specific settings, secrets management, and infrastructure-as-code patterns. Use when setting up per-environment ClickHouse instances, managing connection configs, wiring secrets per environment, or deploying to multiple environments. Trigger with "clickhouse environments", "clickhouse dev staging prod", "clickhouse multi-env", "clickhouse environment config", "clickhouse staging setup".

Its SKILL.md is about 1.6k tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files, including reference files (for example `references/examples.md` and `references/implementation.md`). Compatibility notes: Designed for Claude Code

It sits in Databases, covering Data warehousing, Secrets management and Infrastructure as code. It works with ClickHouse. The repository describes itself as: Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com. The licence is MIT.

When your agent uses it

  • Setting up per-environment ClickHouse instances
  • Managing connection configs
  • Wiring secrets per environment
  • Deploying to multiple environments

Example prompts

  • “clickhouse environments”
  • “clickhouse dev staging prod”
  • “clickhouse multi-env”
  • “/clickhouse-multi-env-setup”

Requirements

  • Docker
  • Compatibility (from SKILL.md): Designed for Claude Code
  • Pre-approved tools (allowed-tools): Read, Write, Edit, Bash(aws:*), Bash(gcloud:*), Bash(vault:*)

Workflow steps

7 steps, taken from the step headings in SKILL.md.

  1. Choose an environment strategy
  2. Build a typed config module
  3. Add a client factory
  4. Wire secrets per environment
  5. Apply schema deterministically
  6. Add environment guards
  7. Integrate with CI/CD

What it can do on your machine

Read from SKILL.md and the folder at commit cfae287. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Write
    • Edit
    • Bash(aws:*)
    • Bash(gcloud:*)
    • Bash(vault:*)

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are typescript).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • 12factor.net
    • clickhouse.cloud
    • aws.amazon.com
    • cloud.google.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • CLICKHOUSE_PASSWORD

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    Designed for Claude Code

    From compatibility in the SKILL.md frontmatter.

Context cost

Clickhouse Multi Env Setup loads about 1.6k tokens when it runs, and up to ~3.9k if it reads all its reference files. Until then it costs about 123 tokens; SKILL.md has 491 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~123
When it runs · the whole SKILL.md, loaded when a task matches
~1.6k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~3.9k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteMentions a .env fileSKILL.md:87
    Dev uses a git-ignored `.env.local`; every other tier pulls from a secret manager

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from jeremylongshore/tons-of-skills-marketplace at commit cfae287, republished under its MIT licence (© jeremylongshore). 491 words, ~1,566 tokens.

Download SKILL.mdSave it as .claude/skills/clickhouse-multi-env-setup/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
clickhouse-multi-env-setup
description
Configure ClickHouse across dev, staging, and production with environment-specific settings, secrets management, and infrastructure-as-code patterns. Use when setting up per-environment ClickHouse instances, managing connection configs, wiring secrets per environment, or deploying to multiple environments. Trigger with "clickhouse environments", "clickhouse dev staging prod", "clickhouse multi-env", "clickhouse environment config", "clickhouse staging setup".
allowed-tools
Read, Write, Edit, Bash(aws:*), Bash(gcloud:*), Bash(vault:*)
compatibility
Designed for Claude Code
version
1.7.0
license
MIT
author
Jeremy Longshore <jeremy@intentsolutions.io>
tags
saas, database, analytics, clickhouse, olap

ClickHouse Multi-Environment Setup

Overview

Configure separate ClickHouse instances for development, staging, and production with proper secrets management, environment detection, and infrastructure-as-code. A single typed config module resolves the right instance from NODE_ENV, so application code never branches on environment and destructive operations are blocked outside dev/staging.

The full code for every step lives in references/implementation.md; worked end-to-end flows are in references/examples.md.

Prerequisites

  • ClickHouse Cloud account or self-hosted instances per environment
  • Secret management solution (Vault, AWS Secrets Manager, GCP Secret Manager)
  • CI/CD pipeline with environment variables

Instructions

Step 1: Choose an environment strategy

Provision one instance per tier, isolated by data sensitivity:

EnvironmentInstancePurposeData
DevelopmentDocker localFast iterationSynthetic seed data
StagingClickHouse Cloud (Dev tier)Pre-prod validationSampled prod copy
ProductionClickHouse Cloud (Prod tier)Live trafficReal data
Step 2: Build a typed config module

Create src/config/clickhouse.ts with one ClickHouseEnvConfig per environment, keyed by NODE_ENV. Fail fast in non-dev environments — require a password and enforce HTTPS at startup:

typescript
export function getConfig(): ClickHouseEnvConfig {
  const env = process.env.NODE_ENV ?? 'development';
  const config = configs[env];
  if (!config) throw new Error(`Unknown environment: ${env}`);
  if (env !== 'development') {
    if (!config.password) throw new Error(`CLICKHOUSE_PASSWORD not set for ${env}`);
    if (!config.url.startsWith('https://')) {
      throw new Error(`ClickHouse ${env} must use HTTPS`);
    }
  }
  return config;
}

Full per-environment config table (pool sizes, timeouts, compression): references/implementation.md.

Step 3: Add a client factory

A lazily-initialized singleton in src/clickhouse/client.ts builds the pool once per process from the resolved config. Full code: references/implementation.md.

Step 4: Wire secrets per environment

Dev uses a git-ignored .env.local; every other tier pulls from a secret manager (AWS Secrets Manager, GCP Secret Manager, or Vault) — never commit credentials. CLI recipes for all three: references/implementation.md.

Step 5: Apply schema deterministically

Run sorted .sql files through a migration runner (scripts/apply-schema.ts). Fail hard in production, log-and-continue in dev/staging: references/implementation.md.

Step 6: Add environment guards

requireNonProduction blocks TRUNCATE/reset in prod and validateDatabaseName catches cross-environment queries. Full guards: references/implementation.md.

Step 7: Integrate with CI/CD

Auto-deploy staging; gate production behind needs: deploy-staging plus a manual-approval environment. Full workflow: references/examples.md.

Show full SKILL.md (201 more words)Show less

Output

Completing this workflow yields:

  • src/config/clickhouse.ts — typed, per-environment ClickHouse config with startup validation (password present, HTTPS enforced outside dev).
  • src/clickhouse/client.ts — a singleton client factory keyed off NODE_ENV.
  • scripts/apply-schema.ts — a deterministic, sorted migration runner.
  • Environment guards preventing destructive operations against production.
  • Secrets stored in a secret manager per environment (nothing committed).
  • A .github/workflows/deploy.yml pipeline that migrates schema and deploys staging automatically, production behind manual approval.

Application code then calls getClient() with zero environment branching.

Error Handling

IssueCauseSolution
Wrong database in prodEnv var not setValidate config on startup
TLS error in stagingUsing http:// for CloudForce https:// in non-dev
Schema driftApplied manuallyUse migration runner in CI
Secret not foundMissing env varCheck secret manager + CI config

Examples

Query from application code with no environment logic — getConfig() resolves the right instance from NODE_ENV:

typescript
import { getClient } from './clickhouse/client';

const rows = await getClient().query({
  query: 'SELECT count() AS c FROM events WHERE date = today()',
  format: 'JSONEachRow',
});
console.log(await rows.json());

More worked flows — the environment-strategy layout, the full CI/CD deploy pipeline, and end-to-end query usage — are in references/examples.md.

Resources

Next Steps

For monitoring and observability, see the clickhouse-observability skill, which covers query performance dashboards, slow-query logging, and alerting across the same dev/staging/production tiers you configured here.

© jeremylongshore, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files (references) in skills/.curated/clickhouse-multi-env-setup of jeremylongshore/tons-of-skills-marketplace.

  • SKILL.md
  • references/examples.md
  • references/implementation.md

Open the folder on GitHubat commit cfae287

Compare with similar skills

Clickhouse Multi Env Setup next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Clickhouse Multi Env Setup compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Clickhouse Multi Env Setup this skilljeremylongshore/tons-of-skills-marketplace2.8k—~1.6kAutomated safety check: NotesMIT
Datasources Provisioninggrafana/skills282—~2.8kAutomated safety check: PassApache-2.0
Releasehypequery/hypequery103—~623Automated safety check: PassCustom licence
Cloud SaaS Modechmonitor/chmonitor300—~2.5kAutomated safety check: NotesGPL-3.0
Incident Responsechmonitor/chmonitor300—~3.4kAutomated safety check: PassGPL-3.0
Keeper Stress AnalysisClickHouse/ClickHouse50k—~4.7kAutomated safety check: PassApache-2.0

Similar skills

  • Official

    Generate a copy-paste Grafana data source provisioning file (YAML or Terraform) for any plugin from its standardized settings schema on the plugins CDN.

    282 GitHub stars~2.8k tokensUpdated 2 days ago
    DevOps & CloudAuto-check passed
  • Release

    hypequery/hypequery

    Cut a stable hypequery release via Changesets, or explain/check the canary flow.

    103 GitHub stars~623 tokensUpdated today
    DatabasesAuto-check passed
  • Cloud SaaS Mode

    chmonitor/chmonitor

    Work on chmonitor's Cloud (SaaS) vs self-hosted (OSS) behaviour from ONE codebase.

    300 GitHub stars~2.5k tokensUpdated 5 days ago
    DatabasesAuto-check: notes
  • Incident Response

    chmonitor/chmonitor

    Structured triage recipes for common ClickHouse incidents: disk, errors, replication, mutations, cluster health, and slow queries.

    300 GitHub stars~3.4k tokensUpdated 5 days ago
    DatabasesAuto-check passed
  • Keeper Stress Analysis

    ClickHouse/ClickHouse

    Analyze ClickHouse Keeper stress-test results from play.clickhouse.com / keeperstresstests data warehouse.

    50k GitHub stars~4.7k tokensUpdated today
    DatabasesAuto-check passed
  • Perf Comparison

    ClickHouse/ClickHouse

    Evaluate ClickHouse performance test results from existing CI/dashboard data or local perf.py runs.

    50k GitHub stars~3.9k tokensUpdated today
    DatabasesAuto-check: notes

More from jeremylongshore/tons-of-skills-marketplace

All 3,342 skills in this repo
  • Performing Security Code Review

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill enables AI assistant to conduct a security-focused code review using the security-agent plugin.

    2.8k GitHub starsUsed in 2 repos~1.3k tokens
    Auto-check: notes
  • Adapting Transfer Learning Models

    jeremylongshore/tons-of-skills-marketplace

    Build this skill automates the adaptation of pre-trained machine learning models using transfer learning techniques.

    2.8k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Agent Context Loader

    jeremylongshore/tons-of-skills-marketplace

    Execute proactive auto-loading: automatically detects and loads agents.md files.

    2.8k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Aggregating Performance Metrics

    jeremylongshore/tons-of-skills-marketplace

    Aggregate and centralize performance metrics from applications, systems, databases, caches, and services.

    2.8k GitHub stars~1.2k tokensUpdated today
    Auto-check passed
  • Analyzing Capacity Planning

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill enables AI assistant to analyze capacity requirements and plan for future growth.

    2.8k GitHub stars~947 tokensUpdated today
    Auto-check passed
  • Analyzing Database Indexes

    jeremylongshore/tons-of-skills-marketplace

    Process use when you need to work with database indexing. An agent skill from jeremylongshore/tons-of-skills-marketplace.

    2.8k GitHub stars~2k tokensUpdated today
    Auto-check passed

Works with

Questions about Clickhouse Multi Env Setup

What does Clickhouse Multi Env Setup do?

Configure ClickHouse across dev, staging, and production with environment-specific settings, secrets management, and infrastructure-as-code patterns. Clickhouse Multi Env Setup is an agent skill from jeremylongshore/tons-of-skills-marketplace. Configure ClickHouse across dev, staging, and production with environment-specific settings, secrets management, and infrastructure-as-code patterns.

When should I use Clickhouse Multi Env Setup?

Clickhouse Multi Env Setup fits situations like: setting up per-environment ClickHouse instances; managing connection configs; wiring secrets per environment; deploying to multiple environments.

How do I install Clickhouse Multi Env Setup in Claude Code?

Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill clickhouse-multi-env-setup -a claude-code`. Or copy the skill folder (skills/.curated/clickhouse-multi-env-setup in jeremylongshore/tons-of-skills-marketplace) into .claude/skills/clickhouse-multi-env-setup in your project. Claude Code loads it when a task matches its description.

How do I install Clickhouse Multi Env Setup in Codex?

Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill clickhouse-multi-env-setup -a codex`. Or copy the skill folder (skills/.curated/clickhouse-multi-env-setup in jeremylongshore/tons-of-skills-marketplace) into .agents/skills/clickhouse-multi-env-setup in your project. Codex loads it when a task matches its description.

Can I use Clickhouse Multi Env Setup in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill clickhouse-multi-env-setup -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/clickhouse-multi-env-setup, .gemini/skills/clickhouse-multi-env-setup, .github/skills/clickhouse-multi-env-setup and .opencode/skills/clickhouse-multi-env-setup in your project.

What does Clickhouse Multi Env Setup need to run?

Going by SKILL.md and its folder, Clickhouse Multi Env Setup needs credentials named CLICKHOUSE_PASSWORD. Our summary lists: Docker. Its frontmatter pre-approves these tools: Read, Write, Edit, Bash(aws:*), Bash(gcloud:*), Bash(vault:*). Compatibility (from SKILL.md): Designed for Claude Code.

Does Clickhouse Multi Env Setup access the network?

SKILL.md names 4 domains. As links in the text: 12factor.net, clickhouse.cloud, aws.amazon.com and cloud.google.com. This is read from the text; nothing was executed.

Is Clickhouse Multi Env Setup safe to install?

Our automated static check of SKILL.md found notes only (mentions a .env file), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Clickhouse Multi Env Setup use?

Clickhouse Multi Env Setup is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Clickhouse Multi Env Setup use?

About 1.6k tokens (SKILL.md is roughly 6.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 2.3k tokens, read only when the agent opens those files.

What are the alternatives to Clickhouse Multi Env Setup?

Skills that share tags, products or a category with Clickhouse Multi Env Setup: Datasources Provisioning (grafana/skills, 282 stars), Release (hypequery/hypequery, 103 stars), Cloud SaaS Mode (chmonitor/chmonitor, 300 stars) and Incident Response (chmonitor/chmonitor, 300 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Clickhouse Multi Env Setup?

jeremylongshore (a GitHub user) maintains it in jeremylongshore/tons-of-skills-marketplace, which has 2,827 GitHub stars. The repository holds 3,342 skills in this directory. The repository was last updated on October 10, 2026.

Source: jeremylongshore/tons-of-skills-marketplace on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.