मुख्य सामग्री पर जाएँ
Skillpedia
API और सर्वर (backend)41k · #6984

clickhouse-autoresearch-campaign

यह क्या करती है

यह स्किल एजेंट को ClickHouse में एक डेटाबेस क्वेरी की गति बढ़ाने के व्यवस्थित प्रयास में मार्गदर्शन देती है। यह उन इंजीनियरों के लिए है जो क्वेरी में कई बदलाव सुरक्षित रूप से टेस्ट करना और हर प्रयास का रिकॉर्ड रखना चाहते हैं।

कब इस्तेमाल करें

  • ✓जब आप बार-बार मापे गए प्रयोगों से एक ClickHouse क्वेरी को तेज़ करना चाहें।
  • ✓जब आप चाहें कि क्वेरी का हर प्रयोग अपनी git ब्रांच पर रहे।
  • ✓जब आप क्वेरी बदलावों के लिए शुरुआती समय और सही नतीजों की जाँच का रिकॉर्ड चाहें।

Skill का लिंक

https://github.com/PostHog/posthog/blob/master/tools/query-performance-ai/query_performance_ai/sandboxed_autoresearch_agent/pi_plugin/skills/clickhouse-autoresearch-campaign/SKILL.md

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/PostHog/posthog/blob/master/tools/query-performance-ai/query_performance_ai/sandboxed_autoresearch_agent/pi_plugin/skills/clickhouse-autoresearch-campaign/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“हमारी ClickHouse डैशबोर्ड क्वेरी बहुत धीमी है। क्या आप इसे अपनी ब्रांच पर तेज़ करने की मुहिम चला सकते हैं और हर प्रयास का रिकॉर्ड रख सकते हैं?”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

एजेंट एक अलग ब्रांच और वर्कस्पेस बनाता है, शुरुआती समय मापता है, और एक-एक करके अलग-अलग विचार आज़माता है। वह जाँचता है कि नतीजे सही रहें, और उन प्रयासों की पंक्तियों की समीक्षा करता है जो सुधार बंद कर देते हैं।

तकनीकी सामग्री (मूल SKILL.md)

लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।

ClickHouse Autoresearch Campaign

This skill packages the orchestration for optimizing one ClickHouse query on one git branch.

Required reads

Before taking action, read orchestration.md (sibling of this file) completely. Treat it as the operating contract.

Preconditions

This skill assumes:

  • pi-autoresearch is installed and its tools are available
  • the current directory is a git repository
  • you have a target query or enough context to identify one
  • the operator will provide or help configure .clickhouse-autoresearch/adapter.json

Branch rule

One campaign = one git branch.

If the current branch is not a dedicated campaign branch yet, create one before initializing the workspace.

Workspace rule

Use a single workspace at:

.clickhouse-autoresearch/

The branch is the campaign boundary. The workspace is just the artifact layout.

If autoresearch.config.json exists in the current working directory, read its workingDir field and use that path as the workspace instead of the default above. Automated orchestrators (for example PostHog's run_campaign.py) initialize the workspace at /tmp/autoresearch-campaign/ and write the config alongside it.

Pre-initialized workspace detection

Before doing anything in the Setup sequence, check whether the workspace has already been prepared by an external orchestrator. If the resolved workspace contains all of:

  • adapter.json
  • baseline/metrics.json
  • query/original.sql

…then the workspace is pre-initialized. In that case:

  • Skip the entire Setup sequence (steps 1–6). Do not ask the operator for a target query, connection details, or anything else — the orchestrator has already supplied them.
  • Jump directly to step 7 of the Setup sequence (read the baseline and seed the first lanes and hypotheses), then continue with steps 8–9 and the normal campaign loop.
  • Operate headlessly: at no point prompt the operator for input. If a decision requires judgment, apply the skill's default guidance and record the choice in state.json / autoresearch.md.

Only fall back to the interactive Setup sequence below when the workspace is empty or partially initialized.

Adapter capabilities (what you can and cannot run)

Campaign queries flow through the adapter configured in adapter.json. Every campaign script (ch_capture_baseline.py, ch_run_candidate.py, any ad-hoc probe) ultimately submits SQL through this adapter, and the adapter enforces what ClickHouse sees.

When adapter.json has type: "coordinator", your SQL is routed to whichever ClickHouse the host-side coordinator is pointed at — typically a read-only test cluster or a local dev ClickHouse. Either way the cluster runs SQL under a profile that pins readonly = 2, so writes (INSERT, ALTER, CREATE, OPTIMIZE, SYSTEM, TRUNCATE, DROP, ATTACH, DETACH) will fail with a ClickHouse error. Read GET /v1/info (or check autoresearch.md — the coordinator's prompt addendum is prepended there) before issuing any predicate that depends on a specific team_id: the prompt addendum tells you which team_id the target cluster has data for, and you must rewrite team_id predicates to match it. For experiments treat every read-only statement form as available:

  • SELECT … — arbitrary subqueries, CTEs, joins
  • WITH … SELECT …
  • EXPLAIN … — every variant ClickHouse supports. Use them before proposing rewrites:
    • EXPLAIN SELECT … (default: PLAN)
    • EXPLAIN AST SELECT …
    • EXPLAIN SYNTAX SELECT …
    • EXPLAIN QUERY TREE SELECT … (post-analyzer logical tree; invaluable on modern ClickHouse)
    • EXPLAIN PIPELINE SELECT … — processor-level pipeline, headers, expressions
    • EXPLAIN ESTIMATE SELECT … — per-part row/mark estimates before execution
    • EXPLAIN PLAN indexes = 1, actions = 1, json = 1 SELECT … — primary-key and skip-index use, JSON for machine parsing
    • EXPLAIN TABLE OVERRIDE …
  • SHOW … — SHOW CREATE TABLE events, SHOW COLUMNS FROM events, SHOW INDEX FROM events, SHOW SETTINGS ILIKE '%mark_cache%', etc.
  • DESCRIBE / DESC …

Timeout: every submission is wrapped with SETTINGS max_execution_time = 60. Keep ad-hoc probes short. If the target query itself routinely exceeds 60s, use range narrowing (see Setup step 6) and only then start the campaign.

Cluster scoping: depends on the coordinator's target. The prompt addendum prepended to autoresearch.md tells you which team_id the target cluster has data for and ask

अक्सर पूछे जाने वाले सवाल

क्या इसके लिए अपनी git ब्रांच चाहिए?

हाँ। हर मुहिम एक अलग git ब्रांच पर चलती है, और वही काम की सीमा है।

क्या यह जाँचती है कि क्वेरी के नतीजे सही रहें?

हाँ। समय के टेस्ट के साथ सही नतीजों की जाँच भी चलती है, इसलिए तेज़ क्वेरी को भी सही जवाब देना होगा।

यह किन टूल पर निर्भर है?

यह pi-autoresearch टूल के इंस्टॉल होने और लक्ष्य एडैप्टर की कॉन्फ़िगरेशन फ़ाइल पर निर्भर है।

जानकारी

लेखक का मूल विवरण

Run a ClickHouse query optimization campaign on one git branch using pi-autoresearch, dynamic lanes and hypotheses, baseline result capture, correctness checks, and stagnation-aware lane/campaign review.

repo: PostHog/posthog

लोकप्रियता

GitHub स्टार
41k
रैंकिंग में स्थान
#6984
लाइसेंस
—
अपडेट की गई
2/11/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

depot-ci

41k

यह आपके एजेंट को Depot CI वर्कफ़्लो सेट अप करने, चलाने और माइग्रेट करने में मदद करती है, साथ ही रन के लॉग पढ़ने में।

कोडिंगडिप्लॉय और क्लाउड (DevOps)

depot-container-builds

41k

यह आपके एजेंट को Depot के रिमोट बिल्डर पर Docker इमेज बनाने में मदद करती है, जिसमें मल्टी-प्लेटफ़ॉर्म इमेज और बिल्ड सुधार शामिल हैं।

कोडिंगडिप्लॉय और क्लाउड (DevOps)

depot-github-runners

41k

यह आपके एजेंट को GitHub Actions जॉब Depot के मैनेज्ड रनर पर ले जाने, रनर का साइज़ और लेबल चुनने, और रनर सेटअप की समस्याएँ ठीक करने में मदद करती है।

कोडिंगडिप्लॉय और क्लाउड (DevOps)

editing-agents-md

41k

यह आपके एजेंट को तय करने में मदद करती है कि कोई नियम AGENTS.md या CLAUDE.md में जाए या नहीं, और उसे ऐसे लिखे कि फ़ाइल भारी न हो।

AI और एजेंटएजेंट

मिलती-जुलती skills