clickhouse-js / examples
AGENTS.md331 starsChanged 33 days agoApache-2.0View on GitHub
Guidance for the example corpus. See the repo-root AGENTS.md for cross-cutting guidance. The examples directory is being refactored to be AI-agent-friendly. The goals of the refactor are: 1. Examples should be runnable right away, with no manual edits required to get them working against a local ClickHouse instance (use docker-compose up from the repo root for the default setup). 2. Examples are organized by client flavor and tailored to the corresponding runtime: - examples/node — examples for the Node.js client…
In this repository12 other files it gives its agents.
- AGENTS.mdAGENTS.md
- docs/AGENTS.mdAGENTS.md
- packages/AGENTS.mdAGENTS.md
- skills/AGENTS.mdAGENTS.md
- skills/clickhouse-js-node-rowbinary/AGENTS.mdAGENTS.md
- fix-release-prSkill
- releaseSkill
- setupSkill
- typescript-lspSkill
- clickhouse-js-node-codingSkill
- clickhouse-js-node-rowbinarySkill
- clickhouse-js-node-troubleshootingSkill
The file
Files
Recommendations for AI agents — examples/
Guidance for the example corpus. See the repo-root AGENTS.md for cross-cutting guidance.
The examples directory is being refactored to be AI-agent-friendly. The goals of the refactor are:
- Examples should be runnable right away, with no manual edits required to get them working against a
local ClickHouse instance (use
docker-compose upfrom the repo root for the default setup). - Examples are organized by client flavor and tailored to the corresponding runtime:
examples/node— examples for the Node.js client (@clickhouse/client). These may freely use Node.js-only APIs (file streams, TLS,http,node:*built-ins, etc.) and import Node built-ins using thenode:prefix (e.g.,node:fs,node:path,node:stream).examples/web— examples for the Web client (@clickhouse/client-web). These must only use Web-platform APIs (e.g.,globalThis.crypto.randomUUID()instead of Node'scryptomodule) and must not depend on Node.js-only modules.
examples/nodeandexamples/webare independent npm packages, each with its ownpackage.json,tsconfig.json, and ESLint config. Keep dependencies and configuration scoped to the relevant subpackage.- General-purpose scenarios (configuration, ping, inserts, selects, parameters, sessions, etc.) should
exist in both subdirectories where applicable, with the only differences being the
importstatement and any platform-specific adjustments. Examples that rely on Node.js-only APIs live only underexamples/node. - Within each subpackage, examples are split into intent-driven use-case folders so each folder
can back a focused AI agent skill:
coding/— day-to-day client API usage (configure, ping, basic insert/select, parameter binding, sessions, data types, custom JSON).performance/— async inserts, streaming with backpressure, file/Parquet streams, progress streaming, server-side bulk moves. Mostly Node-only;examples/web/performance/exists for the few perf scenarios that work in the browser (e.g. streamingJSONEachRow).troubleshooting/— cancellation, timeouts, long-running query progress, server error surfaces, number-precision pitfalls.security/— TLS, RBAC, SQL-injection-safe parameter binding.schema-and-deployments/—CREATE TABLEexamples for each deployment shape and deployment-shaped connection strings.
- A small number of examples are intentionally duplicated across folders so each folder is a
self-contained skill corpus. Each duplicated example has one primary location; the secondary
copies are excluded from the Vitest runner via the per-package
vitest.config.ts. When you edit a duplicated example, update all copies. The current duplicates and their primary locations are listed inexamples/README.md.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

