KS
Killer-Skills

clickhouse — how to use clickhouse how to use clickhouse, clickhouse vs postgresql, clickhouse install, clickhouse setup guide, what is clickhouse, clickhouse alternative, clickhouse squirrel query builder, clickhouse high-performance analytics, clickhouse ai agent integration

v1.0.0
GitHub

About this Skill

Perfect for Data Analysis Agents needing high-performance analytics queries with ClickHouse ClickHouse is a high-performance analytics database management system that utilizes the squirrel query builder for dynamic query construction

Features

Utilizes the squirrel query builder for dynamic query construction
Supports high-performance analytics queries
Integrates with the server/internal/telemetry package
Enables connections to 1st and 3rd party MCP servers
Does not use SQLc for auto-generated queries
Specifically designed for ClickHouse queries in the telemetry package

# Core Topics

speakeasy-api speakeasy-api
[0]
[0]
Updated: 3/6/2026

Quality Score

Top 5%
33
Excellent
Based on code quality & docs
Installation
SYS Universal Install (Auto-Detect)
Cursor IDE Windsurf IDE VS Code IDE
> npx killer-skills add speakeasy-api/gram/clickhouse

Agent Capability Analysis

The clickhouse MCP Server by speakeasy-api is an open-source Categories.community integration for Claude and other AI agents, enabling seamless task automation and capability expansion. Optimized for how to use clickhouse, clickhouse vs postgresql, clickhouse install.

Ideal Agent Persona

Perfect for Data Analysis Agents needing high-performance analytics queries with ClickHouse

Core Value

Empowers agents to construct dynamic queries using the squirrel query builder for high-performance analytics, leveraging ClickHouse's capabilities for fast data processing and visualization, and enabling connections to 1st and 3rd party MCP servers

Capabilities Granted for clickhouse MCP Server

Constructing dynamic queries for high-performance analytics
Connecting to 1st and 3rd party MCP servers for data analysis
Utilizing squirrel query builder for efficient query construction

! Prerequisites & Limits

  • Requires squirrel query builder for ClickHouse queries
  • Not compatible with SQLc for auto-generating queries
  • Specifically designed for ClickHouse, not PostgreSQL
Project
SKILL.md
2.4 KB
.cursorrules
1.2 KB
package.json
240 B
Ready
UTF-8

# Tags

[No tags]
SKILL.md
Readonly

ClickHouse Queries (Telemetry Package)

The server/internal/telemetry package uses ClickHouse for high-performance analytics queries. Unlike PostgreSQL queries, ClickHouse queries are NOT auto-generated by SQLc (SQLc doesn't support ClickHouse). We use the squirrel query builder for dynamic query construction.

CRITICAL: The squirrel query builder is ONLY permitted for ClickHouse queries in the telemetry package. DO NOT use squirrel for PostgreSQL queries - all PostgreSQL queries MUST use SQLc-generated code. This is the only acceptable exception to our "no query builders" policy.

File Structure

  • queries.sql.go: Query implementations using squirrel
  • pagination.go: Cursor pagination helpers (withPagination, withOrdering, etc.)
  • README.md: Detailed documentation and patterns specific to ClickHouse

Adding ClickHouse Queries

When asked to add a new ClickHouse query to the telemetry package:

  1. Create a params struct for query inputs

  2. Build the query using squirrel (the sq var in queries.sql.go is pre-configured for ClickHouse):

    go
    1type GetMetricsParams struct { 2 ProjectID string 3 DeploymentID string // optional 4 Limit int 5} 6 7func (q *Queries) GetMetrics(ctx context.Context, arg GetMetricsParams) ([]Metric, error) { 8 sb := sq.Select("id", "value", "timestamp"). 9 From("metrics"). 10 Where("project_id = ?", arg.ProjectID) 11 12 // Optional filters - explicit conditionals for clarity 13 if arg.DeploymentID != "" { 14 sb = sb.Where(squirrel.Eq{"deployment_id": arg.DeploymentID}) 15 } 16 17 sb = sb.Limit(uint64(arg.Limit)) 18 19 query, args, err := sb.ToSql() 20 if err != nil { 21 return nil, fmt.Errorf("building query: %w", err) 22 } 23 24 rows, err := q.conn.Query(ctx, query, args...) 25 // ... handle rows 26}
  3. Use pagination helpers from pagination.go:

    • withPagination(sb, cursor, sortOrder) - cursor pagination
    • withOrdering(sb, sortOrder, primaryCol, secondaryCol) - ORDER BY

Testing ClickHouse Queries

  • Use testenv.Launch() in TestMain for infrastructure setup
  • Add time.Sleep(100 * time.Millisecond) after inserts (ClickHouse eventual consistency)
  • Use table-driven tests with descriptive "it" prefix names
  • Create helper functions for test data insertion

See server/internal/telemetry/README.md for comprehensive documentation.

Related Skills

Looking for an alternative to clickhouse or building a Categories.community AI Agent? Explore these related open-source MCP Servers.

View All

widget-generator

Logo of f
f

widget-generator is an open-source AI agent skill for creating widget plugins that are injected into prompt feeds on prompts.chat. It supports two rendering modes: standard prompt widgets using default PromptCard styling and custom render widgets built as full React components.

149.6k
0
Design

chat-sdk

Logo of lobehub
lobehub

chat-sdk is a unified TypeScript SDK for building chat bots across multiple platforms, providing a single interface for deploying bot logic.

73.0k
0
Communication

zustand

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
Communication

data-fetching

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
Communication