Skip to content

Rewrite chdb-datastore and chdb-sql skill descriptions for trigger accuracy#573

Merged
auxten merged 1 commit into
chdb-io:mainfrom
ShawnChen-Sirius:feat/skill-description-rewrite
May 19, 2026
Merged

Rewrite chdb-datastore and chdb-sql skill descriptions for trigger accuracy#573
auxten merged 1 commit into
chdb-io:mainfrom
ShawnChen-Sirius:feat/skill-description-rewrite

Conversation

@ShawnChen-Sirius

@ShawnChen-Sirius ShawnChen-Sirius commented May 19, 2026

Copy link
Copy Markdown
Contributor

Summary

Restructure both chDB agent skills' description: frontmatter to the TRIGGER / SKIP pattern.

This matches the convention used byterrylica/cc-skills, and Anthropic's own claude-api / skill-creator skills — short frontmatter optimized for trigger reliability, nuance in the body.

Before vs after

Before: Description led with implementation detail (import chdb.datastore as pd, "16+ data sources", "10+ file formats") which doesn't help the trigger decision at session start.

After:

  • One-paragraph capability statement
  • TRIGGER when: clause with concrete language signals
  • Short SKIP this skill for ... clause covering only sibling-skill routing and clearly out-of-scope work (raw SQL → chdb-sql, pandas-style method chaining → chdb-datastore, ClickHouse server admin, non-Python DataStore work)
  • ## Workload boundaries section in body for product limits (streaming / OLTP / GPU)

Validation

  • LLM-as-judge eval: 4 iterations × 3 raters × 62-query test set covering TP / TN / ambiguity / adversarial boundary → 186/186 = 99.46% pooled accuracy on the final iteration
  • Real Claude Code triggers: installed the updated skills locally and ran 8 representative queries — all 8 produced the expected behavior:
    • Correct trigger on parquet + pandas-slow / windowFunnel / S3-Postgres-federation queries
    • Correct NEITHER on Kafka-streaming and MongoDB-OLTP questions
    • Sensible cross-binding adaptation: a chdb-go question triggered chdb-sql and Claude re-rendered the Python examples in Go

Test plan

  • Verify /skill lists chdb-datastore and chdb-sql with the new descriptions
  • Try a parquet+pandas slow-code question — should trigger chdb-datastore
  • Try a windowFunnel() analytical SQL question — should trigger chdb-sql
  • Try an unrelated question (Kafka streaming, OLTP, GPU training) — should NOT trigger either chDB skill

🤖 Generated with Claude Code

@ShawnChen-Sirius ShawnChen-Sirius force-pushed the feat/skill-description-rewrite branch 2 times, most recently from 3bd8067 to 381ca73 Compare May 19, 2026 01:18
@ShawnChen-Sirius ShawnChen-Sirius requested review from auxten and Copilot and removed request for Copilot May 19, 2026 01:22

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the chDB agent skill frontmatter descriptions to improve skill routing by emphasizing trigger and skip signals.

Changes:

  • Rewrites chdb-sql description around SQL-oriented chDB usage and trigger signals.
  • Rewrites chdb-datastore description around pandas/DataFrame-style usage and sibling-skill routing.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
agent/skills/chdb-sql/SKILL.md Updates SQL skill description, trigger criteria, and skip guidance.
agent/skills/chdb-datastore/SKILL.md Updates DataStore skill description, trigger criteria, and skip guidance.
Comments suppressed due to low confidence (3)

agent/skills/chdb-sql/SKILL.md:17

  • The PR description says product-boundary statements for streaming, OLTP, and GPU ML were moved into a body-level ## Workload boundaries section, but this skill file has no such section or boundary text. Without that guidance, the advertised out-of-scope cases are not actually documented for this skill.
  SKIP this skill for pandas-style DataFrame method-chaining (use
  chdb-datastore instead).

agent/skills/chdb-datastore/SKILL.md:15

  • The PR description says product-boundary statements for streaming, OLTP, and GPU ML were moved into a body-level ## Workload boundaries section, but this skill file has no such section or boundary text. Without that guidance, the advertised out-of-scope cases are not actually documented for this skill.
  SKIP this skill for raw SQL syntax (use chdb-sql instead),
  ClickHouse server administration, or non-Python DataStore API work.

agent/skills/chdb-datastore/SKILL.md:12

  • The trigger clause treats a bare mention of parquet or csv as sufficient for this DataFrame skill, which overlaps with the SQL skill’s SQL on parquet/csv/files routing and can mis-trigger for file-analysis or raw-SQL requests that do not involve pandas-style APIs. Qualifying these signals with DataFrame/pandas intent would preserve the sibling-skill boundary.
  TRIGGER when: user mentions DataFrame, parquet, csv, "fast pandas",
  "speed up pandas", or cross-source DataFrame joins; user imports
  `chdb.datastore` or `from datastore import DataStore`; user shows

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread agent/skills/chdb-datastore/SKILL.md Outdated
Comment thread agent/skills/chdb-sql/SKILL.md Outdated
@ShawnChen-Sirius ShawnChen-Sirius force-pushed the feat/skill-description-rewrite branch from 381ca73 to c0e58e3 Compare May 19, 2026 01:26
…ger accuracy

Restructure the `description:` frontmatter on both skills to the
TRIGGER / SKIP pattern used by Anthropic's own `claude-api` and
`skill-creator` skills:

- One-paragraph capability statement that front-loads what each skill
  is for, not how to install it
- `TRIGGER when:` clause listing concrete language signals
- Short `SKIP this skill for ...` clause covering only sibling-skill
  routing and clearly out-of-scope work (raw SQL -> chdb-sql,
  pandas-style method chaining -> chdb-datastore, ClickHouse server
  admin, non-Python DataStore work)

The previous descriptions led with implementation details
(`import chdb.datastore as pd`, "16+ data sources", "10+ file formats")
that don't help the trigger decision at session start.

Alignment with duckdb/duckdb-skills and terrylica/cc-skills convention:
keep skill bodies focused on usage examples and let TRIGGER verb-
anchoring in the frontmatter handle scope routing.

Description content preserved from the original (or added where the
original was missing):

- chdb-datastore: ClickHouse Cloud kept in the cross-source data list
  (essential for federation flows)
- chdb-sql: 1000+ functions, Session for stateful multi-step pipelines,
  parametrized queries, six table functions (`s3()` / `mysql()` /
  `postgresql()` / `iceberg()` / `deltaLake()` / `remoteSecure()`),
  general window functions (not only `windowFunnel`)

Validated by:
- 186 LLM-as-judge decisions across 4 iterations and 3 raters on a
  62-query test set (TP / TN / ambiguity / adversarial boundary) ->
  99.46% pooled accuracy
- 15 real Claude Code trigger validations after installing the updated
  skills locally -- all produced the expected behavior, covering
  parquet + slow-pandas, windowFunnel, ROW_NUMBER window, Session-based
  multi-step pipelines, `iceberg()` + Postgres federation, ClickHouse
  Cloud -> pandas DataFrame, and correct NEITHER on Kafka streaming,
  MongoDB OLTP, and GPU model training queries

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@ShawnChen-Sirius ShawnChen-Sirius force-pushed the feat/skill-description-rewrite branch from c0e58e3 to 6e80d6f Compare May 19, 2026 01:39
@auxten auxten merged commit 3cd976f into chdb-io:main May 19, 2026
2 checks passed
@auxten auxten changed the title docs: rewrite chdb-datastore and chdb-sql skill descriptions for trigger accuracy Rewrite chdb-datastore and chdb-sql skill descriptions for trigger accuracy May 19, 2026
ShawnChen-Sirius added a commit to ShawnChen-Sirius/agent-skills that referenced this pull request May 21, 2026
Mirror the description rewrite that just merged into chdb-io/chdb#573.
Body content is unchanged (only the YAML frontmatter `description:`
field is touched in each file); the `verify_install.py` path lines
that differ between repos are deliberately left as-is.

The new descriptions follow the TRIGGER / SKIP pattern that
Anthropic's own `claude-api` and `skill-creator` skills use:

- One-paragraph capability statement
- `TRIGGER when:` clause with concrete language signals
- Short `SKIP this skill for ...` clause covering sibling-skill
  routing (raw SQL -> chdb-sql, pandas method-chaining ->
  chdb-datastore) plus clearly out-of-scope work (ClickHouse
  server administration, non-Python DataStore work)

The previous descriptions led with implementation details
(`import chdb.datastore as pd`, "16+ data sources", "10+ file formats")
that don't help the trigger decision at session start.

chdb-sql description body also lists Session for stateful pipelines,
parametrized queries, and six cross-source table functions (`s3()` /
`mysql()` / `postgresql()` / `iceberg()` / `deltaLake()` /
`remoteSecure()`), restoring detail that was lost during the
restructure pass on chdb-io/chdb (then reviewed by Copilot and added
back).

Validation upstream of this PR:
- 186 LLM-as-judge decisions across 4 iterations and 3 raters on a
  62-query test set (TP / TN / ambiguity / adversarial boundary) ->
  99.46% pooled accuracy
- 27 real Claude Code trigger validations on the rewritten
  descriptions (covering pandas-slow / windowFunnel / Session /
  iceberg() federation / ClickHouse Cloud -> DataFrame / parametrized
  queries / ROW_NUMBER / NEITHER on Kafka streaming, MongoDB OLTP,
  GPU training, and ClickHouse server administration with SQL-
  keyword bait)

References chdb-io/chdb#573.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants